A colorful, feature-rich command-line Pomodoro timer with text-to-speech announcements and auto-cycling capabilities. Perfect for productivity enthusiasts who use the terminal.
This script runs in the background with no input needed once started.
- β Simple work/break timer functionality
- β
Colorful output with
lolcat - β Text-to-speech announcements
- β Session completion tracking and statistics
- β Motivational summary displays
- β Lightweight and minimal
- β Perfect for users who prefer manual session control
- β All basic features plus:
- β Auto-cycling mode - continuous work/break cycles
- β Session tracking - numbered sessions with progress display
- β End time calculation - shows when current session will finish
- β Enhanced TTS - different announcements for work/break transitions
- β Cross-platform TTS - Linux (espeak/spd-say) + Windows (PowerShell)
- β Session completion tracking - tracks completed vs interrupted sessions
- β Productivity statistics - historical session counts with motivational messages
π§ 1. Better Focus and Concentration
Working in short, timed intervals (usually 25 minutes) helps you stay locked in on a single task. Knowing there's a break coming reduces mental resistance.
π 2. Reduces Mental Fatigue
Frequent breaks (5 minutes after each session, longer after four) prevent burnout and help your brain reset, especially during long workdays.
π 3. Helps You Start Tasks Youβre Avoiding
Committing to "just 25 minutes" feels manageable, making it easier to beat procrastination and overcome task inertia.
β±οΈ 4. Tracks Time and Boosts Awareness
Each Pomodoro is a unit of time you can measure. Over time, it helps you understand how long things really take and manage your time more realistically.
π― 5. Encourages Single-tasking
It forces you to commit to one task per session, helping you avoid the productivity drain of multitasking.
π 6. Builds a Sense of Accomplishment
Each completed Pomodoro is a small win, giving you a mental reward and momentum to keep going.
βοΈ 7. Improves Work-Life Balance
By structuring your day into focused work blocks and scheduled breaks, it prevents overworking and encourages healthier rhythms.
- Zsh Shell - This tool is designed for Zsh
- Timer CLI - Core timing functionality
- Lolcat - Colorful text output
- Text-to-Speech Engine - For audio announcements
# Update package list
sudo apt update
# Install lolcat for colorful output
sudo apt install lolcat
# Install speech dispatcher for text-to-speech
sudo apt install speech-dispatcher
# Install espeak-ng for enhanced speech synthesis
sudo apt install espeak-ng
# Install timer CLI tool
# Option 1: Using Go (if you have Go installed)
go install github.com/caarlos0/timer@latest
# Option 2: Download binary from GitHub releases
wget https://github.com/caarlos0/timer/releases/latest/download/timer_Linux_x86_64.tar.gz
tar -xzf timer_Linux_x86_64.tar.gz
sudo mv timer /usr/local/bin/# Install Homebrew if you haven't already
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install lolcat
brew install lolcat
# Install timer
brew install caarlos0/tap/timer
# Install espeak for text-to-speech
brew install espeak
# Note: macOS has built-in 'say' command, but the script uses Linux-style commands# First, ensure you have WSL2 with Ubuntu installed
# Then follow the Linux installation steps above
# Additionally, ensure PowerShell is available (usually pre-installed on Windows)git clone https://github.com/Kxvin1/pomodoro-cli.git
cd pomodoro-cliDownload pomo-basic.zshrc and pomo-with-auto.zshrc from the repository.
Choose Basic Version if you:
- Prefer manual control over sessions
- Want minimal resource usage
- Like simple, straightforward functionality
- Don't need auto-cycling features
Choose Enhanced Version if you:
- Want continuous work/break cycles
- Like detailed session tracking
- Need cross-platform TTS support
- Want advanced timer features
For Basic Timer:
# If you're using Zsh or Bash, run this to start the timer
source ./pomo-basic.zshrc
# Refer to usage commands below for usage under 'Usage'For Enhanced Timer:
# If you're using Zsh or Bash, run this to start the timer
source ./pomo-with-auto.zshrc
# Refer to usage commands below for usage under 'Usage'Note: You can switch between versions anytime by commenting out one source line and uncommenting the other in your ~/.zshrc.
wo
# or
pomodoro workbr
# or
pomodoro breakpc
# Starts continuous work/break cycles
# Use Ctrl+C to stopsummary
# Shows productivity statistics including:
# - Current session completion count
# - Total historical session count
# - Motivational messages based on progressreset-pomo
# Resets all session history with confirmation prompt
# Use this to start fresh or clear old data# Start a work session
$ wo
work
β° Expected end time: 14:30
Timer: 30m 0s
β
Session completed and recorded!
# After work session completes, take a break
$ br
break
β° Expected end time: 14:40
Timer: 10m 0s
β
Session completed and recorded!
# Check your productivity statistics
$ summary
π Fetching your productivity statistics...
π
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ π
POMODORO SUMMARY
π
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ π
π Current Session: 2 completed
π Total Historical: 15 completed
πͺ You're developing excellent focus habits!
π‘ Each completed session brings you closer to your goals!
π
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ π
# Or use auto-cycling for continuous sessions
$ pc
π Starting auto-cycle pomodoro
π‘ Each session runs normally - use Ctrl+C to stop the cycle
--- Session 1 ---
Starting work session...
work
β° Expected end time: 14:30Both versions now include comprehensive session tracking to help you monitor your productivity progress:
- Completion Detection: Only sessions that run for their full duration are counted as "completed"
- Interrupted Sessions: Sessions stopped early (Ctrl+C) are not counted toward your totals
- Persistent Storage: Session counts are stored in
~/.pomo_sessions.datand persist across terminal sessions - Current vs Historical: Track both your current session's completions and your all-time total
- Session Confirmation: Each completed session shows a confirmation message
- Motivational Messages: Progress-based encouragement based on your total session count
- π± Beginner (0 sessions): Ready to start your productivity journey!
- π Getting Started (1-4 sessions): Great start! Keep building that focus muscle!
- πͺ Developing (5-24 sessions): You're developing excellent focus habits!
- π₯ Champion (25-99 sessions): Impressive dedication! You're a productivity champion!
- π Master (100+ sessions): Legendary focus master! Your discipline is inspiring!
- Storage Location: Session data is stored in your home directory:
~/.pomo_sessions.dat - File Format: Simple text file containing a single number (total completed work sessions)
- Persistence: Data survives terminal restarts, system reboots, and script reloads
- Current vs Historical:
- Current Session: Resets each time you start a new terminal session
- Historical Total: Persists forever until manually reset
# Easy way (with confirmation prompt)
reset-pomo
# Manual way (immediate reset)
rm ~/.pomo_sessions.dat
# Or reset to specific number
echo "50" > ~/.pomo_sessions.dat- Work sessions: 30 minutes
- Break sessions: 10 minutes
Edit the session times in your chosen .zshrc file:
# Modify these values in pomo-basic.zshrc or pomo-with-auto.zshrc
pomo_options["work"]="25" # 25 minutes for work
pomo_options["break"]="5" # 5 minutes for breakIf you want to disable TTS announcements, comment out the speech lines:
In pomo-basic.zshrc:
# Comment out this line:
# spd-say "'$val' session done"In pomo-with-auto.zshrc:
# Comment out these lines:
# powershell.exe -Command "Add-Type βAssemblyName System.Speech; ..."You can add new session types by modifying the pomo_options array:
# Add custom sessions
pomo_options["longbreak"]="15" # 15-minute long break
pomo_options["focus"]="45" # 45-minute deep focus session
# Then create aliases
alias lb="pomodoro 'longbreak'"
alias focus="pomodoro 'focus'"After installation, test that everything works correctly:
# Check if timer is installed
timer --version
# Check if lolcat is installed
echo "test" | lolcat
# Check if speech tools are available (Linux)
spd-say "test" 2>/dev/null || echo "TTS not available"# Test a short work session (1 minute for testing)
# First, temporarily modify the work duration in your .zshrc file:
# pomo_options["work"]="1"
# Then test:
wo
# You should see:
# - Colorful "work" text
# - Expected end time
# - Timer countdown
# - TTS announcement when complete# Test auto-cycling with short durations
# Modify both work and break to 1 minute for testing
pc
# Use Ctrl+C to stop after testingSolution: Install the timer CLI tool following the installation steps above.
Solution: Install lolcat using your package manager:
# Linux
sudo apt install lolcat
# macOS
brew install lolcatLinux: Ensure speech-dispatcher is installed and running:
sudo apt install speech-dispatcher
systemctl --user start speech-dispatchermacOS: The script uses Linux-style TTS commands. You may need to modify the script to use say command instead.
Windows: Ensure you're running in WSL and PowerShell is accessible.
Solution: Ensure you're using Zsh shell:
# Check current shell
echo $SHELL
# Switch to Zsh if needed
chsh -s $(which zsh)Solution: This is usually due to shell job control. Use Ctrl+C to properly stop the cycle, then restart if needed.
- Shell Compatibility:
- β Bash (fully supported β default on most Linux systems, including WSL)
- β Zsh (fully supported β originally written with Zsh syntax, but Bash-compatible)
β οΈ Other shells (e.g., fish, tcsh): not tested and likely incompatible
- OS Compatibility:
- β Linux (Full support)
- β macOS (TTS may need slight script tweaks β uses say instead of spd-say or PowerShell)
- β Windows (WSL) (Full support using PowerShell for TTS)
- β Windows Command Prompt/PowerShell directly (Not supported β use WSL instead)
- Use in a dedicated terminal: Keep the timer running in its own terminal window
- Customize durations: Adjust work/break times to match your productivity style
- Use auto-cycling: Great for deep work sessions where you don't want to manually restart
- Terminal notifications: The colorful output makes it easy to see session status at a glance
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is open source. Please check the repository for license details.
Happy Productivity! π β¨


