A command-line Pomodoro timer to help you stay focused and productive. Work in focused intervals, take breaks, and optionally block distracting websites during your work sessions.
- โฐ Customizable work and break intervals - Set your own timing
- ๐ Multiple Pomodoro cycles - Run several rounds automatically
- ๐ Extended break after completion - Get a 3x longer break after finishing all cycles when running multiple intervals (e.g., 15-minute break if your standard break is 5 minutes, only applies with
-interval 2or higher) - ๐ซ Website blocking - Block distracting sites during work time (automatically unblocks during breaks)
- ๐ Audio feedback - Windup sound at start, ticking during work, and ding when complete
- ๐คซ Silent mode - Disable ticking sound if you prefer quiet focus
- ๐ Visual progress bar - countdown bar with progress indicator
- โจ๏ธ Graceful interruption - Cancel anytime with Ctrl+C and sites will be automatically unblocked
The Pomodoro Technique is a time management method that breaks work into focused intervals (traditionally 25 minutes) separated by short breaks (usually 5 minutes). This helps maintain high levels of focus and prevents burnout.
- macOS (this tool is designed for macOS only)
- Go 1.24+ (for building from source)
- sudo privileges (only needed if using the website blocking feature)
go install github.com/maiku1008/pomodoro-cli@latestThis will install the pomodoro-cli binary to your $GOPATH/bin directory (usually ~/go/bin). Make sure this directory is in your PATH.
# Clone the repository
git clone https://github.com/maiku1008/pomodoro-cli.git
cd pomodoro-cli
# Build the binary
go build -o pomodoro-cli
# Move to your PATH (optional)
sudo mv pomodoro-cli /usr/local/bin/Standard 25-minute Pomodoro with 5-minute break:
pomodoro-cliCustom timing - 45 minutes work, 10 minutes break:
pomodoro-cli -timer 45 -break 10Run 4 Pomodoro cycles in a row:
pomodoro-cli -interval 4Silent mode (no ticking sound):
pomodoro-cli -silentBlock distracting websites during work:
sudo pomodoro-cli -blocklist "twitter.com,reddit.com,youtube.com"Full-featured session:
sudo pomodoro-cli -timer 25 -break 5 -interval 4 -blocklist "twitter.com,facebook.com,reddit.com"Deep work session (2 hours of focused work):
sudo pomodoro-cli -timer 50 -break 10 -interval 2 -blocklist "twitter.com,reddit.com,news.ycombinator.com"Quick task sprint (15 minutes):
pomodoro-cli -timer 15 -break 3Study session with social media blocked:
sudo pomodoro-cli -timer 25 -break 5 -interval 4 -blocklist "instagram.com,tiktok.com,twitter.com,facebook.com"Late night coding (silent mode):
sudo pomodoro-cli -timer 30 -break 5 -silent -blocklist "youtube.com,reddit.com"| Flag | Default | Description |
|---|---|---|
-timer |
25 |
Work session duration in minutes |
-break |
5 |
Break duration in minutes |
-interval |
1 |
Number of Pomodoro cycles to complete |
-blocklist |
"" |
Comma-separated list of websites to block during work (e.g., "twitter.com,reddit.com") |
-hosts |
/etc/hosts |
Path to hosts file (only change if you know what you're doing) |
-silent |
false |
Disable the ticking sound during work sessions |
The website blocking feature works by temporarily adding entries to your system's /etc/hosts file, redirecting blocked sites to 127.0.0.1 (localhost).
- Requires sudo: You must run the command with
sudowhen using-blocklist - Automatic cleanup: Sites are automatically unblocked when:
- The work session ends (for your break)
- You press Ctrl+C to cancel
- The program exits for any reason
- Format: Just provide the domain name, don't include
http://orwww.(both will be blocked automatically) - DNS cache: Some browsers cache DNS. If a site isn't blocked immediately, try:
- Chrome/Brave: Open a new incognito window
- Firefox: Restart the browser
- Safari: Usually respects hosts file immediately
When you block example.com, both of these are blocked:
example.comwww.example.com
-blocklist "twitter.com,reddit.com,youtube.com,facebook.com,instagram.com,tiktok.com,news.ycombinator.com"The app includes three embedded sounds (macOS only, uses afplay):
- Windup ๐ฌ - Plays at the start of each work session
- Ticking โฑ๏ธ - Gentle ticking during work (can be disabled with
-silent) - Ding ๐ - Notification when a session completes
All sounds are embedded in the binary, so no external files are needed!
- Start with standard Pomodoros: Try the default 25/5 split before experimenting
- Use website blocking wisely: Block your biggest time-wasters during deep work
- Take your breaks seriously: Step away from your computer, stretch, hydrate
- Experiment with timing: Some tasks need longer focus periods (50 min), others benefit from shorter sprints (15 min)
- Silent mode for shared spaces: Use
-silentwhen working in libraries or offices - Chain multiple cycles: Use
-interval 4for a full work session without having to restart - Enjoy your extended break: When running multiple intervals (
-interval 2or higher), you'll get a 3x longer break after completing all cycles - perfect for a walk, meal, or longer rest
Problem: You're trying to modify /etc/hosts without sufficient permissions.
Solution: Run the command with sudo:
sudo pomodoro-cli -blocklist "twitter.com,reddit.com"Possible solutions:
- Make sure you're using
sudowith the-blocklistflag - Try flushing your DNS cache:
- macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Linux:
sudo systemd-resolve --flush-caches(if using systemd)
- macOS:
- Open an incognito/private browsing window
- Check that the sites are actually in your hosts file:
cat /etc/hosts | grep Pomodoro
This shouldn't happen, but if it does:
- Check your hosts file:
cat /etc/hosts - Manually remove the Pomodoro section between these markers:
### Pomodoro CLI - Begin Blocked sites ### ... ### Pomodoro CLI - End Blocked sites ### - Save the file and flush DNS cache (see commands above)
- Check your system volume
- Make sure no other audio is playing
- Verify
afplayworks:afplay /System/Library/Sounds/Ping.aiff
๐
Starting 2 Pomodoro cycle(s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐
Pomodoro 1 of 2
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โฐ Work session (25 minutes)
Blocking distracting sites...
๐
[โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 12:34 remaining
โ
Work session complete!
Unblocking sites for break...
โ Break time! (5 minutes)
Sites are now unblocked. Take a break!
โ [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 00:05 remaining
โฐ Break finished!
โจ Pomodoro 1 complete!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐
Pomodoro 2 of 2
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โฐ Work session (25 minutes)
๐
[โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 00:00 remaining
โ
Work session complete!
โ Interval completed, taking a longer break!
โ Break time! (15 minutes)
Sites are now unblocked. Take a break!
โ [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 00:00 remaining
โฐ Break finished!
โจ Pomodoro 2 complete!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ All 2 Pomodoro cycles complete!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Issues and pull requests are welcome! Feel free to:
- Report bugs
- Suggest new features
- Improve documentation
- Share your Pomodoro workflows
MIT License - feel free to use this however you'd like!
This program is inspired by TomatoBar, a neat Pomodoro timer for the macOS menu bar.
Timer sounds are licensed from buddhabeats.
Built with Go and inspired by the timeless Pomodoro Technique created by Francesco Cirillo.
Happy focusing! ๐ โจ
Remember: The best productivity tool is the one you actually use. Keep it simple, stay consistent, and take those breaks!