A dead simple and customizable, easy to setup/use timer, stopwatch and clock that runs in your terminal.
Install globally (this is all you need):
npm i -g bash-timer
# or
bun add -g bash-timerThen use commands anywhere:
timer 5 min
stopwatch
clockTo use the stopwatch, simply run the following command:
stopwatchTo use the timer, run the following command with the desired duration:
timer <number> <hr/hrs/min/sec> [<number> <hr/hrs/min/sec> ...]For example:
timer 5 min 2 secTo show the current time, run the following command:
clockThe clock shows 24-hour time (HH:MM:SS) and updates every second. It uses the same font and display settings as the timer and stopwatch.
By default, timer, stopwatch and clock output is centered in the terminal.
To update globally and verify you are on latest:
timer updatetimer update auto-detects whether your current install came from Bun, npm, or pnpm, runs the matching global update command, then checks your installed version against npm latest.
porSpacebar: Pause/Resumer: Restartf: Random fontq,eorCtrl+C: Exit
The clock only uses f and the exit keys, since it cannot be paused or restarted.
You can view and set the ASCII font used for the timer, stopwatch and clock display.
To list all available fonts:
timer fontThis is instant and lists all figlet fonts.
timer font --all is supported as an explicit alias.
To list only timer-compatible fonts (fonts that render 01:23:45 visibly):
timer font --compatibleTo set a random font:
timer font randomTo set your preferred font:
timer font <font>Replace <font> with any font name from the list shown by timer font.
If a font is missing native timer digits, CLI Timer now substitutes close glyphs so the display stays stylized instead of falling back to plain text.
Open interactive settings UI:
timer settingstimer settings ships with prebuilt Bubble Tea binaries for:
- Linux x64 / arm64
- macOS x64 / arm64
- Windows x64 / arm64
If your platform is unsupported, it falls back to running the Go source (go run) when Go is installed.
This launches a Bubble Tea based screen where you can change:
- Font
- Center display
- Show header
- Show controls
- Tick rate (50-1000 ms)
- Completion message
- System notification on completion (default On)
- Completion sound/alarm on completion (default Off)
- Pause key / pause alt key
- Restart key
- Font key
- Exit key / exit alt key
When completion sound/alarm is enabled, it plays 5 terminal bell beeps.
Controls in settings UI:
Enter: select/toggleCtrl+S: save and exit/: filter fonts in font picker/: filter keys in key pickerEsc/q: back/cancel
Note for macOS: If system notifications are inconsistent with built-in AppleScript notifications, install terminal-notifier (brew install terminal-notifier) for improved reliability.
Notification notes by platform:
- Windows: notifications depend on OS notification permissions and whether your desktop session allows toasts/balloons.
- Linux: notifications require a running desktop notification daemon (
notify-sendtalks to that daemon over D-Bus).