Skip to content

Commit 048005d

Browse files
Add comprehensive documentation and update gitignore
- Update README.md with detailed project overview, features, and installation instructions - Add installation methods: source, global install, and pre-built executables - Include usage examples, CLI options, and use cases - Add project structure and development instructions - Update .gitignore to exclude bin/ directory (compiled executables) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 40acdbb commit 048005d

File tree

2 files changed

+203
-5
lines changed

2 files changed

+203
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules
44
# output
55
out
66
dist
7+
bin
78
*.tgz
89

910
# code coverage

README.md

Lines changed: 202 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,212 @@
1-
# interval-timer
1+
# ⏰ Interval Timer
22

3-
To install dependencies:
3+
A beautiful, terminal-based interval timer that syncs to the hour. Built with [Bun](https://bun.sh), React (Ink), and TypeScript.
4+
5+
![License](https://img.shields.io/badge/license-MIT-blue.svg)
6+
7+
## ✨ Features
8+
9+
- 🕐 **Hour-Synced Intervals** - Aligns to clock times (e.g., 15-min intervals at :00, :15, :30, :45)
10+
- 🎨 **Beautiful Terminal UI** - Gradient text, progress bars, and responsive layout
11+
- 📊 **Session Statistics** - Track completed intervals and total duration
12+
- 🎉 **Celebration Messages** - Motivating messages at milestones
13+
- 🔔 **Audio Notifications** - Sound alerts when intervals complete
14+
-**Fast & Lightweight** - Built with Bun for blazing performance
15+
- 🎯 **Customizable Intervals** - Set any interval from 1-60 minutes
16+
17+
## 📸 Preview
18+
19+
```
20+
═══════════════ ⏰ INTERVAL TIMER ⏰ ═══════════════
21+
22+
⏳ Time Remaining: 14:23
23+
24+
[████████████████████████░░░░░░░░░░░░░░░░░░░░░░] 96%
25+
26+
┌────────────────────────────────────────────┐
27+
│ ⏰ Current Time: 11:45:37 AM │
28+
│ 🎯 Next Interval: 12:00:00 PM │
29+
│ ⚡ Interval Duration: 15 minutes │
30+
└────────────────────────────────────────────┘
31+
32+
┌─────────── 📊 Session Statistics ──────────┐
33+
│ 🎯 Completed: 5 ⏱️ Duration: 75 min │
34+
│ 🔄 Current: Interval 6 │
35+
└─────────────────────────────────────────────┘
36+
```
37+
38+
## 🚀 Installation
39+
40+
### Option 1: Run from Source (Requires Bun)
441

542
```bash
43+
# Clone the repository
44+
git clone https://github.com/yourusername/interval-timer.git
45+
cd interval-timer
46+
47+
# Install dependencies
648
bun install
49+
50+
# Run the timer
51+
bun run index.tsx
52+
```
53+
54+
### Option 2: Install Globally with Bun
55+
56+
```bash
57+
# Install globally
58+
bun install -g interval-timer
59+
60+
# Run from anywhere
61+
interval-timer
62+
```
63+
64+
### Option 3: Use Pre-built Executables
65+
66+
Download the pre-built executables from the [Releases](https://github.com/yourusername/interval-timer/releases) page:
67+
68+
**Linux:**
69+
```bash
70+
# Download (replace URL with actual release URL)
71+
curl -L -o interval-timer-linux https://github.com/yourusername/interval-timer/releases/latest/download/interval-timer-linux
72+
73+
# Make executable
74+
chmod +x interval-timer-linux
75+
76+
# Run
77+
./interval-timer-linux
78+
```
79+
80+
**Windows:**
81+
```powershell
82+
# Download from releases page and run
83+
interval-timer-windows.exe
84+
```
85+
86+
## 📖 Usage
87+
88+
### Basic Usage
89+
90+
```bash
91+
# Run with default 15-minute intervals
92+
bun run index.tsx
93+
94+
# Or if installed globally
95+
interval-timer
96+
```
97+
98+
### Custom Intervals
99+
100+
```bash
101+
# 10-minute intervals
102+
bun run index.tsx --interval 10
103+
104+
# 5-minute intervals (short form)
105+
bun run index.tsx -i 5
106+
107+
# 30-minute intervals
108+
bun run index.tsx --interval 30
7109
```
8110

9-
To run:
111+
### Help
10112

11113
```bash
12-
bun run index.ts
114+
bun run index.tsx --help
13115
```
14116

15-
This project was created using `bun init` in bun v1.2.23. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
117+
## ⚙️ Options
118+
119+
| Option | Short | Description | Default |
120+
|--------|-------|-------------|---------|
121+
| `--interval <minutes>` | `-i` | Set interval duration (1-60 minutes) | `15` |
122+
| `--help` | `-h` | Show help message | - |
123+
124+
## 🔧 Requirements
125+
126+
- **For running from source:** [Bun](https://bun.sh) v1.2.23 or higher
127+
- **For executables:** No dependencies required (standalone binaries)
128+
129+
### Installing Bun
130+
131+
```bash
132+
# macOS, Linux, and WSL
133+
curl -fsSL https://bun.sh/install | bash
134+
135+
# Or with npm
136+
npm install -g bun
137+
```
138+
139+
## 🎯 Use Cases
140+
141+
- **Pomodoro Technique** - Use 25-minute intervals for focused work
142+
- **Break Reminders** - Set 15-minute intervals to remember to stretch
143+
- **Meeting Timers** - Track meeting durations with custom intervals
144+
- **Study Sessions** - Use 50-minute intervals with breaks
145+
- **Fitness** - Interval training with custom workout/rest periods
146+
147+
## 🛠️ Development
148+
149+
```bash
150+
# Clone the repository
151+
git clone https://github.com/yourusername/interval-timer.git
152+
cd interval-timer
153+
154+
# Install dependencies
155+
bun install
156+
157+
# Run in development
158+
bun run index.tsx
159+
160+
# Build executables
161+
bun build --compile --target=bun-linux-x64 ./index.tsx --outfile bin/interval-timer-linux --external react-devtools-core
162+
bun build --compile --target=bun-windows-x64 ./index.tsx --outfile bin/interval-timer-windows.exe --external react-devtools-core
163+
```
164+
165+
## 📂 Project Structure
166+
167+
```
168+
interval-timer/
169+
├── index.tsx # Entry point & CLI argument parser
170+
├── components/
171+
│ ├── App.tsx # Main application component
172+
│ ├── CountdownDisplay.tsx
173+
│ ├── ProgressBar.tsx
174+
│ └── InfoPanel.tsx
175+
├── utils/
176+
│ ├── timer.ts # Timer logic & state management
177+
│ └── sound.ts # Audio notification system
178+
├── package.json
179+
├── tsconfig.json
180+
└── README.md
181+
```
182+
183+
## 🤝 Contributing
184+
185+
Contributions are welcome! Feel free to:
186+
187+
1. Fork the repository
188+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
189+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
190+
4. Push to the branch (`git push origin feature/amazing-feature`)
191+
5. Open a Pull Request
192+
193+
## 📝 License
194+
195+
This project is licensed under the MIT License - see the LICENSE file for details.
196+
197+
## 🙏 Acknowledgments
198+
199+
- Built with [Bun](https://bun.sh) - The fast all-in-one JavaScript runtime
200+
- UI powered by [Ink](https://github.com/vadimdemedes/ink) - React for CLIs
201+
- Styled with [chalk](https://github.com/chalk/chalk) and [gradient-string](https://github.com/bokub/gradient-string)
202+
203+
## 💡 Tips
204+
205+
- Press `Ctrl+C` to exit at any time
206+
- The timer automatically syncs to clock times for consistent scheduling
207+
- Audio notifications work on most systems with default audio output
208+
- Use in fullscreen terminal for best experience
209+
210+
---
211+
212+
Made with ❤️ using [Bun](https://bun.sh) and [Claude Code](https://claude.com/claude-code)

0 commit comments

Comments
 (0)