diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-03 23:20:07 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-03 23:20:07 +0200 |
| commit | 2c414a53dc95c75584398246beb34f7ddf181448 (patch) | |
| tree | 493aff637f8e626c455d06e9ba874b352306ea65 | |
| parent | 09ee73b50f8500373ee9acb789f863982da6ca13 (diff) | |
docs: refresh README and keep version at v0.4.0
| -rw-r--r-- | README.md | 115 | ||||
| -rw-r--r-- | internal/version.go | 2 |
2 files changed, 62 insertions, 55 deletions
@@ -1,99 +1,106 @@ # timr -A simple command-line tool to track time spent on tasks. It has been primarily coded using Google Gemini CLI and Claude Code CLI. +`timr` is a terminal time-tracking tool that combines: -## About +- a stopwatch timer, +- worktime-style work log tracking, +- weekly reporting, +- and a Bubble Tea TUI. -`timr` is a minimalist stopwatch-style timer that runs in your terminal. It helps you track the time you spend on your work by allowing you to start, stop, and check the status of the timer. The timer's state is saved to your system, so you can pause your work and resume tracking later. - -It has been vibe coded! +Current version: `v0.4.0`. ## Installation -To build and install `timr`, you need to have Go installed on your system. The project uses [Mage](https://magefile.org/) for building. +Requirements: + +- Go (current project targets Go 1.24+) +- [Mage](https://magefile.org/) (optional, recommended) -### Using Mage (Recommended) +Build with Mage: ```bash -# Install mage if you haven't already go install github.com/magefile/mage@latest - -# Build the project mage build ``` -### Direct Go Build - -Alternatively, you can build directly with Go: +Or build directly: ```bash go build -o timr ./cmd/timr ``` -This will create a `timr` executable in the current directory. To make it accessible from anywhere, you can move it to a directory in your system's `PATH`, such as `/usr/local/bin`: +## CLI Overview + +`timr` now uses Cobra and supports global flags: ```bash -sudo mv timr /usr/local/bin/ +timr --version +timr --config /path/to/config.json ``` -## Usage - -`timr` provides the following commands: +Top-level command groups: -* `timr start`: Starts the timer. If the timer was previously stopped, it will resume from where it left off. -* `timr stop` or `timr pause`: Stops or pauses the timer. The elapsed time will be saved. -* `timr cont` or `timr continue`: Continues the stopped timer. -* `timr status`: Shows the current status of the timer (running or stopped) and the total elapsed time. -* `timr status raw`: Shows the current elapsed time in seconds, in a raw format. -* `timr status rawm`: Shows the current elapsed time in minutes, in a raw format. -* `timr reset`: Resets the timer. This will set the elapsed time to zero. -* `timr track <description>`: Saves the current elapsed time with a description and resets the timer. -* `timr live [-f|--font <font>]`: Shows a live, full-screen timer with keyboard controls and optional font selection. -* `timr prompt`: Shows a compact status for shell prompt integration. +- `timr timer ...` +- `timr work ...` +- `timr tui` -## Live Mode +### `timer` Commands -The live mode provides an interactive, full-screen timer display with the following features: +```bash +timr timer start +timr timer stop +timr timer continue +timr timer reset +timr timer status [--raw|--raw-minutes] +timr timer prompt +timr timer track <description> +timr timer live [-f|--font <font>] +``` -### Keyboard Controls +### `work` Commands -* `s`: Start/Stop the timer -* `r`: Reset the timer to zero -* `f`: Cycle through different display fonts -* `q` or `Ctrl+C`: Quit live mode +```bash +timr work login [-c|--category <cat>] [--at <time>] [-d|--descr <text>] [--start-timer] +timr work logout [-c|--category <cat>] [--at <time>] [-d|--descr <text>] [--stop-timer] +timr work add <duration> [-c|--category <cat>] [--at <time>] [-d|--descr <text>] +timr work sub <duration> [-c|--category <cat>] [--at <time>] [-d|--descr <text>] +timr work use-buffer <duration> [--at <time>] [-d|--descr <text>] +timr work status +timr work report [--verbose] [--no-color] +timr work edit +timr work import <file> +``` -### Font Options +## TUI -When you run `timr live` without specifying a font, it randomly selects from one of the available fonts. You can also specify a font explicitly: +Launch the TUI: ```bash -# Random font (different each time) -timr live - -# Specific fonts -timr live -f doom # Classic figlet style -timr live -f mono12 # Clean monospace blocks -timr live -f rebel # Stylized shaded blocks -timr live -f ansi # Simple block numerals -timr live -f ansiShadow # Box-drawing characters +timr tui ``` -While in live mode, press `f` to cycle through all available fonts in real-time. +The scaffold currently includes: -### Font Credits +- tab-based navigation (`Entries`, `Report`, `Timer`), +- vi-style global keys (`Tab`, `gt`, `gT`, `1/2/3`, `?`, `q`, `ZQ`), +- entries browsing/editing flows, +- report browsing, +- timer screen with work login/logout toggle (`l`). -The ASCII art fonts (mono12, rebel, ansi, ansiShadow) are adapted from the [pomo](https://github.com/Bahaaio/pomo) project by Bahaa El Deen Mohamed, licensed under the MIT License. +## TUI Screenshots -## Fish Shell Integration +Screenshots section (`v0.4.0` baseline): -`timr` can be integrated with the fish shell to display the current timer status in your prompt. +- Entries screen: _to be captured_ +- Report screen: _to be captured_ +- Timer screen: _to be captured_ -### Installation +## Fish Shell Integration -Run the installation script: +Install fish prompt helper: ```bash ./install-fish-integration.fish ``` -Then update your `fish_prompt` or `fish_right_prompt` function to include the `timr_prompt` function as shown in the script output. +Then add `timr_prompt` to your `fish_prompt` or `fish_right_prompt`. diff --git a/internal/version.go b/internal/version.go index 2137e45..95fdbad 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,3 +1,3 @@ package internal -const Version = "v0.3.0" +const Version = "v0.4.0" |
