Skip to main content

A terminal based stopwatch and countdown timer

Project description

timeman

npm PyPI License: MIT

A terminal based stopwatch and countdown timer, built with OpenTUI and shipped as standalone binaries — no runtime required.

  • CLI interface (default): Lightweight inline mode that lives in your scrollback.
  • TUI interface: Full-screen terminal UI via -i/--interactive.
  • Notifications: Bell + toast when a countdown completes.
  • Session timeline: Stopwatch summary with per-session start/end times in your local time zone.
  • Drift-proof timing: Durations use a monotonic clock, so a system clock jump (DST, NTP sync) never corrupts them.

Stopwatch TUI Screenshot

Installation

npm:

npm install -g timeman-cli

bun:

bun add -g timeman-cli

pip / uv (same binary, published as time-manager for continuity with the original Python package):

pip install time-manager
# or
uv tool install time-manager

curl (Linux, macOS — downloads the binary from the latest GitHub release):

curl -fsSL https://raw.githubusercontent.com/rehanhaider/time-manager/main/install.sh | bash

Every method installs the tm command. npm/bun also install timeman, pip also installs time-manager, and curl installs just tm.

Supported platforms: Linux x64/arm64 (glibc and musl), macOS x64/arm64, Windows x64 (via npm/bun).

Usage

tm sw              # stopwatch            (also: tm stopwatch)
tm cd 5 m          # 5-minute countdown   (also: tm countdown 5 m)

Stopwatch

tm sw
tm sw -p "Project Alpha"   # name the session for the summary
tm sw -i                   # full-screen TUI

Keys: space start/stop · r reset · q quit.

On exit you get a session timeline — one bar per start/stop run, with total time:

╭──────────────── Project Alpha: 0 hrs 25 mins ────────────────╮
│   Session #1   13:53 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 14:03 IST  (0 hrs 10 mins) │
│                                                              │
│   Session #2   14:10 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 14:25 IST  (0 hrs 15 mins) │
╰──────────────────────────────────────────────────────────────╯

Countdown

tm cd 90 s         # units: s/sec/seconds, m/min/minutes, h/hr/hours
tm cd 5            # unit defaults to minutes
tm cd 1 h -i       # full-screen TUI

Keys: space pause/resume · q quit. The display turns yellow under 30 seconds and red under 10; when time is up you get a terminal bell and a toast.

Development

Requires Bun >= 1.3.14.

bun install                      # install dependencies
bun run dev sw                   # run from source
bun test                         # tests
bunx tsc --noEmit                # typecheck

Building distribution artifacts:

bun install --os="*" --cpu="*"   # stage native packages for every platform (one-time)
make build                       # compile binaries for all 7 targets into dist/bin
make package                     # assemble npm packages (dist/npm) + release tarballs (dist/release)

Releasing

Everything publishes locally from this machine — no CI, no secrets on GitHub.

  1. make bump (or TYPE=minor make bump), commit.
  2. make package — builds all binaries, npm packages, wheels, and release tarballs.
  3. make publish — rehearsal: npm --dry-run + TestPyPI.
  4. PROD=TRUE make publish — the real thing: npm packages, PyPI wheels, and a GitHub release v<version> with the binaries (which the curl installer downloads).

Credentials: npm token in ~/.npmrc, PyPI tokens in .env (PYPI_PUBLISH_TOKEN, TEST_PYPI_PUBLISH_TOKEN), and an authenticated gh CLI for the release upload.

History

This project was originally written in Python with Textual and published to PyPI as time-manager (last Python release: 0.3.1; the implementation is preserved in git history). From 0.4.0 on, the PyPI package ships the same compiled binary as the npm package — pip install time-manager keeps working with no Python runtime involved.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

time_manager-0.4.1-py3-none-win_amd64.whl (39.9 MB view details)

Uploaded Python 3Windows x86-64

time_manager-0.4.1-py3-none-musllinux_1_2_x86_64.whl (42.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

time_manager-0.4.1-py3-none-musllinux_1_2_aarch64.whl (42.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

time_manager-0.4.1-py3-none-manylinux_2_27_x86_64.whl (40.3 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ x86-64

time_manager-0.4.1-py3-none-manylinux_2_27_aarch64.whl (39.9 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ ARM64

time_manager-0.4.1-py3-none-macosx_12_0_x86_64.whl (28.0 MB view details)

Uploaded Python 3macOS 12.0+ x86-64

time_manager-0.4.1-py3-none-macosx_12_0_arm64.whl (25.5 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

File details

Details for the file time_manager-0.4.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e81fc051074dc9a68cf38125925fddea4d67d496d20d49c8551268ff683653c6
MD5 97f2c5a74bc01f15b16ab91b3963ff56
BLAKE2b-256 4e90a6fa5d9b773dd9dc7e5485776d84452c569d150092b968d27e97a61155d3

See more details on using hashes here.

File details

Details for the file time_manager-0.4.1-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c3063e92153df54ae19d435e9e7c4ed33b9633e7664bbb34f00abcca487ce416
MD5 d06b6ab9c71305c6751784de6e950e8f
BLAKE2b-256 04bd94bbc4654fd106d36dec332b31bbd5e054a0164ac10c1120d8005b99b790

See more details on using hashes here.

File details

Details for the file time_manager-0.4.1-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 bd24cd663b4b45bd0f82652578e4ad43b46fde299cbd239b97c8e2d95ef8d9d1
MD5 f07de2b98eee32b8479c7132db4b0317
BLAKE2b-256 8096c6bbcab2ed885abd082158c3d4db6924039ae3108d6e94a4a7203a8c51f0

See more details on using hashes here.

File details

Details for the file time_manager-0.4.1-py3-none-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 1833fce67fd085625feb98af9b2e85a4fa1df0eaeed8c53701eae0c47772406b
MD5 74d656cbc0ce001ad56342ef29c45c27
BLAKE2b-256 deb2d0644591987e99029555e5b050c1d0414d4f2fbbc28b60f079053e2cb4a5

See more details on using hashes here.

File details

Details for the file time_manager-0.4.1-py3-none-manylinux_2_27_aarch64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-manylinux_2_27_aarch64.whl
Algorithm Hash digest
SHA256 da476c04458ef5886b476141882b05d70b62bd831941057ace526ce301d0c7a6
MD5 b24affb3bd098cb2bb41a07990e12eb8
BLAKE2b-256 0d7e5aa8229446bd6fe775ede9f817a1963d1cb0c799fd539a51cb5d6da311d6

See more details on using hashes here.

File details

Details for the file time_manager-0.4.1-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 e79977e1c845808672c8ad2aea1aede3ed63585327a179ffa3ae3cfe83c12278
MD5 24559e52c06fd34a533099cf1b460eb8
BLAKE2b-256 c43476fd625c4a3126f2d7be22a4c6a631eb0412146748dd438eec079679d045

See more details on using hashes here.

File details

Details for the file time_manager-0.4.1-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for time_manager-0.4.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f2e1c3250da413fa5382418d34904b0b20c7e5ceb5e0757bc3538ed614bf7cbf
MD5 7c6ebc86f7f8ef69b27c6d7963c931e8
BLAKE2b-256 10b9d6f72e66864b91d3484984f42aabe49cc44f208a34a43a441d570fde9aea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page