{"id":35794192,"url":"https://github.com/kriuchkov/tock","last_synced_at":"2026-04-02T22:01:30.790Z","repository":{"id":328151064,"uuid":"1113746923","full_name":"kriuchkov/tock","owner":"kriuchkov","description":"Tock is a powerful time tracking tool for the command line.","archived":false,"fork":false,"pushed_at":"2026-04-01T20:19:24.000Z","size":2255,"stargazers_count":388,"open_issues_count":2,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-04-02T07:36:41.858Z","etag":null,"topics":["cli","command-line","openclaw","openclaw-skill","productivity","time-tracking","time-tracking-app","timewarrior","todotxt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kriuchkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T12:07:24.000Z","updated_at":"2026-04-01T20:13:26.000Z","dependencies_parsed_at":"2026-01-29T22:01:45.799Z","dependency_job_id":null,"html_url":"https://github.com/kriuchkov/tock","commit_stats":null,"previous_names":["kriuchkov/tock"],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/kriuchkov/tock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriuchkov%2Ftock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriuchkov%2Ftock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriuchkov%2Ftock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriuchkov%2Ftock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kriuchkov","download_url":"https://codeload.github.com/kriuchkov/tock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriuchkov%2Ftock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31317831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T21:35:00.834Z","status":"ssl_error","status_checked_at":"2026-04-02T21:34:59.806Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","openclaw","openclaw-skill","productivity","time-tracking","time-tracking-app","timewarrior","todotxt"],"created_at":"2026-01-07T09:20:28.180Z","updated_at":"2026-04-02T22:01:30.783Z","avatar_url":"https://github.com/kriuchkov.png","language":"Go","readme":"# Tock\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kriuchkov/tock/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/kriuchkov/tock?style=flat-square\" alt=\"Release\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/kriuchkov/tock?style=flat-square\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/kriuchkov/tock/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/kriuchkov/tock?style=flat-square\" alt=\"Stars\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"go.mod\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/kriuchkov/tock?style=flat-square\u0026logo=go\u0026label=Go\" alt=\"Go Version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/kriuchkov/tock/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/kriuchkov/tock/ci.yml?style=flat-square\u0026label=tests\" alt=\"CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"docs/openclaw.md\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/OpenClaw-ready-0A84FF?style=flat-square\" alt=\"OpenClaw\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003e\u003cstrong\u003eFeatures\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#quick-start\"\u003e\u003cstrong\u003eQuick Start\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#commands\"\u003e\u003cstrong\u003eCommands\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#openclaw\"\u003e\u003cstrong\u003eOpenClaw\u003c/strong\u003e\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"#configuration\"\u003e\u003cstrong\u003eConfiguration\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#theming\"\u003e\u003cstrong\u003eTheme\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#file-format\"\u003e\u003cstrong\u003eFile Format\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#shell-completion\"\u003e\u003cstrong\u003eShell\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#inspiration\"\u003e\u003cstrong\u003eInspiration\u003c/strong\u003e\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;•\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"#license\"\u003e\u003cstrong\u003eLicense\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n\u003cimg src=\"assets/demo.png\" width=\"820px\" /\u003e\n\n**Tock** is a powerful time tracking tool for the command line. It saves activity logs as plaintext files and provides an interactive terminal UI for viewing your time.\n\nFeatures include:\n\n- **Simple plaintext format** - Activities stored in human-readable files (default)\n- **Multiple Backends** - Support for flat files, TodoTXT, TimeWarrior, and SQLite databases\n- **Notes \u0026 Tags** - Attach detailed notes and tags to activities\n- **Interactive TUI** - Beautiful terminal calendar view using Bubble Tea\n- **Fast \u0026 Lightweight** - Single binary, no dependencies\n- **Compatible** - Reads/writes Bartib file format, TodoTXT-compatible lines, and TimeWarrior data files\n- **Customizable Themes** - Multiple color themes and custom color support\n- **Report Export** - Export report data as text, CSV, or JSON\n- **iCal Export** - Generate .ics files for calendar integration, or sync with system calendars (macOS only)\n\n\u003chr clear=\"right\"/\u003e\n\n## Quick Start\n\n### Installation\n\n#### Homebrew (macOS)\n\n```bash\n# https://formulae.brew.sh/formula/tock\n# Install from official repository (build from source)\nbrew install tock\n\n# Install pre-built binary via latest release (Goreleaser)\nbrew install kriuchkov/tap/tock\n```\n\n#### Go Install\n\n```bash\ngo install github.com/kriuchkov/tock/cmd/tock@latest\n```\n\n#### Build from source\n\n```bash\ngo build -o tock ./cmd/tock\n```\n\n#### Install Script (Linux \u0026 macOS)\n\n```bash\ncurl -sS https://raw.githubusercontent.com/kriuchkov/tock/master/install.sh | sh\n```\n\n#### Download Binary\n\nDownload the latest release from the [Releases](https://github.com/kriuchkov/tock/releases) page.\n\n### Basic Usage\n\n\u003cimg src=\"assets/demo.gif\" width=\"820px\" /\u003e\n\u003chr clear=\"right\"/\u003e\n\nStart tracking time:\n\n```bash\ntock start # Interactive mode (requires no arguments)\ntock start \"My Project\" \"Implementing features\" # Quick start with arguments\ntock start \"My Project\" \"Implementing features\" \"Some notes\" \"tag1,tag2\"  # Quick start with arguments + notes/tags\ntock start -d \"Implementing features\" -p \"My Project\" # Start with flags\ntock start -d \"Implementing features\" -p \"My Project\" -t 14:30 --note \"Some notes\" --tag \"afternoon\" # Start with flags + time + notes/tags\n```\n\nStop the current activity:\n\n```bash\ntock stop # Stop now\ntock stop -t 17:00 # Stop at specific time\ntock stop --note \"Finished for the day\" # Stop with a note\ntock stop --tag \"end-of-day\" # Stop with a tag\n```\n\nContinue a previous activity (Create a new entry with the same project/description):\n\n```bash\ntock continue  # Continue the last activity\ntock continue 1   # Continue the 2nd to last activity\ntock continue -d \"New\" # Continue last activity but with new description\ntock continue -p \"New Project\" # Continue last activity but with new project\ntock continue -t 14:00 # Continue last activity but with specific start time\ntock continue --note \"Resuming work\" --tag \"resumed\" # Continue last activity with a note and tag\n```\n\nView activities in interactive calendar:\n\n```bash\ntock list\n```\n\nCalendar controls:\n\n- `Arrow Keys` / `h,j,k,l`: Navigate days\n- `n`: Next month\n- `p`: Previous month\n- `q` / `Esc`: Quit\n\n```bash\ntock calendar\n```\n\n\n## Configuration\n\nTock supports a flexible configuration system using YAML files and environment variables.\n\n**Priority Order:**\n\n1. Command-line flags\n2. Environment variables\n3. Configuration file (`~/.config/tock/tock.yaml` or `./tock.yaml`)\n4. Default values\n\n### Configuration File\n\nExample `tock.yaml`:\n\n```yaml\nbackend: file\nfile:\n    path: /Users/user/tock.txt\ntodotxt:\n  path: /Users/user/todo.txt\nsqlite:\n    path: /Users/user/tock.db\ntime_format: \"24\"\ntheme:\n    faint: '#404040'\n    highlight: '#FFFF00'\n    name: custom\n    primary: '#FF00FF'\n    secondary: '#00FFFF'\n    sub_text: '#B0B0B0'\n    text: '#FFFFFF'\ntimewarrior:\n    data_path: /Users/user/.timewarrior/data\ncalendar:\n    time_spent_format: \"15:04\"\n    time_start_format: \"15:04\"\n    time_end_format: \" • 15:04\"\nexport:\n    ical:\n        file_name: \"tock_export.ics\"\nweekly_target: \"40h\"\ncheck_updates: true\n```\n\nYou can specify a custom config file path with the `--config` flag:\n\n```bash\ntock --config /path/to/tock.yaml list\n```\n\nExample a config file [tock.yaml.example](tock.yaml.example).\n\n### Environment Variables\n\nAll settings can be overridden with environment variables (prefix `TOCK_`).\n\n- `TOCK_BACKEND`: `file`, `todotxt`, `timewarrior`, or `sqlite`\n- `TOCK_EXPORT_ICAL_FILE_NAME`: Custom filename for bulk iCal export (default: `tock_export.ics`)\n- `TOCK_FILE_PATH`: Path to activity log\n- `TOCK_TODOTXT_PATH`: Path to TodoTXT activity log\n- `TOCK_TIME_FORMAT`: Time display format (`12` or `24`)\nNotes are stored as individual files in `~/.tock/notes/` (or relative to your configured file path).\n\n- `TOCK_THEME_NAME`: Theme name (`dark`, `light`, `custom`)\n- `TOCK_WEEKLY_TARGET`: Weekly workload target as a duration (e.g., `40h`, `37h30m`)\n- `TOCK_CHECK_UPDATES`: Check for updates (default: `true`)\n\n### Storage Backends\n\nTock supports multiple storage backends.\n\n## OpenClaw\n\nTock includes a workspace-ready OpenClaw skill in `skills/tock`.\n\nThis integration model uses the local `tock` CLI instead of coupling Tock to OpenClaw internals. For agent-safe flows, use machine-readable commands where possible:\n\n```bash\ntock current --json\ntock last --json -n 10\ntock export --today --format json --stdout\ntock start -p \"Backend\" -d \"Implement OpenClaw skill\" --json\ntock stop --json\n```\n\nSetup details are documented in [docs/openclaw.md](docs/openclaw.md).\n\n### 1. Flat File (Default)\n\nStores activities in a simple plaintext file.\n\n```bash\nexport TOCK_FILE_PATH=\"$HOME/.tock.txt\"\n```\n\n### 2. TodoTXT\n\nStores activities in a TodoTXT-compatible file. Tock keeps exact timestamps and full field fidelity in `tock_*` key:value extensions, so round-tripping remains lossless even though base TodoTXT has date-only task metadata.\n\n```bash\n# Enable TodoTXT backend\nexport TOCK_BACKEND=\"todotxt\"\n\n# Optional: Specify custom TodoTXT file path (default: ~/.tock.todo.txt)\nexport TOCK_TODOTXT_PATH=\"$HOME/.tock.todo.txt\"\n```\n\n### 3. TimeWarrior\n\nIntegrates with [TimeWarrior](https://timewarrior.net/) data files.\n\n```bash\n# Enable TimeWarrior backend\nexport TOCK_BACKEND=\"timewarrior\"\n\n# Optional: Specify custom data directory (default: ~/.timewarrior/data)\nexport TOCK_TIMEWARRIOR_DATA_PATH=\"/path/to/timewarrior/data\"\n```\n\n### 4. SQLite\n\nStores activities in an SQLite database file.\n\n```bash\n# Enable SQLite backend\nexport TOCK_BACKEND=\"sqlite\"\n\n# Optional: Specify custom database file path (default: ~/.tock.db)\nexport TOCK_SQLITE_PATH=\"/path/to/tock.db\"\n```\n\nOr use flags:\n\n```bash\ntock --backend timewarrior list\n```\n\n### Calendar View\n\nCustomize the time format in the calendar view (`tock calendar`).\n\n```yaml\ncalendar:\n  # Format for duration display (Go time syntax)\n  time_spent_format: \"15:04\" # Default\n\n  # Format for start time (Go time syntax)\n  # Default: uses global time_format\n  time_start_format: \"15:04\"\n\n  # Format for end time (appended to duration)\n  # Includes separators or icons.\n  # Default: \" • \" + global time_format\n  # Example: \" 🏁 15:04\"\n  time_end_format: \" • 15:04\"\n\n  # Format for total daily duration.\n  # Defaults to time_spent_format.\n  time_total_format: \"15:04\"\n\n  # Align duration to the left side in the details view\n  # true:  \"01:30 Project Name\"\n  # false: \"- Project Name: 01:30\" (Default)\n  align_duration_left: false\n```\n\n## Theming\n\nTock supports customizable color themes for the calendar view.\n\nYou can configure the theme in `tock.yaml`:\n\n```yaml\ntheme:\n  name: custom\n  primary: \"#ff0000\"\n```\n\nOr use environment variables:\n\n### Theme Name\n\nSet `TOCK_THEME_NAME` (or `theme.name` in config) to one of:\n\n- `dark`: Standard 256-color dark theme\n- `light`: Standard 256-color light theme\n- `ansi_dark`: 16-color dark theme\n- `ansi_light`: 16-color light theme\n- `custom`: Use custom colors defined by environment variables\n\n### Auto-detection\n\nIf `theme.name` is not set, Tock automatically selects the best theme:\n\n1. Detects terminal capabilities (TrueColor/256 vs ANSI).\n2. Detects background color (Light vs Dark).\n3. Selects the appropriate theme (e.g. `light` for light background, `ansi_dark` for dark ANSI terminal).\n\n### Custom Colors\n\nWhen `theme.name` is `custom`, you can override specific colors using these variables (accepts ANSI color codes or hex values):\n\n```bash\nexport TOCK_THEME_NAME=\"custom\"\nexport TOCK_COLOR_PRIMARY=\"63\"   # Blue\nexport TOCK_COLOR_SECONDARY=\"196\" # Red\nexport TOCK_COLOR_TEXT=\"255\"     # White\nexport TOCK_COLOR_SUBTEXT=\"248\"  # Light Grey\nexport TOCK_COLOR_TAG=\"34\"       # Green\n```\n\n### Example: Cyberpunk / Fuchsia Theme\n\n\u003cimg src=\"assets/demo_2.png\" width=\"820px\" /\u003e\n\n```bash\nexport TOCK_THEME_NAME=\"custom\"\nexport TOCK_COLOR_PRIMARY=\"#FF00FF\"   # Fuchsia\nexport TOCK_COLOR_SECONDARY=\"#00FFFF\" # Cyan\nexport TOCK_COLOR_TEXT=\"#FFFFFF\"      # White\nexport TOCK_COLOR_SUBTEXT=\"#B0B0B0\"   # Light Grey\nexport TOCK_COLOR_FAINT=\"#404040\"     # Dark Grey\nexport TOCK_COLOR_HIGHLIGHT=\"#FFFF00\" # Yellow\nexport TOCK_COLOR_TAG=\"#00FF00\"       # GreenGrey\nexport TOCK_COLOR_FAINT=\"#404040\"     # Dark Grey\nexport TOCK_COLOR_HIGHLIGHT=\"#FFFF00\" # Yellow\n```\n\n### Time Format\n\nConfigure how times are displayed and input via config file or environment variable:\n\n```yaml\n# In tock.yaml\ntime_format: \"12\"  # Use 12-hour format with AM/PM\ntime_format: \"24\"  # Use 24-hour format (default)\n```\n\n```bash\n# Or via environment variable\nexport TOCK_TIME_FORMAT=\"12\"  # Use 12-hour format with AM/PM\nexport TOCK_TIME_FORMAT=\"24\"  # Use 24-hour format (default)\n```\n\n#### 12-Hour Format Examples\n\n```bash\ntock start -p Project -d Task -t \"3:04 PM\"   # or \"03:04 PM\"\ntock start -p Project -d Task -t \"3PM\"       # Minutes optional\ntock add -s \"9:00 AM\" -e \"5:00 PM\"\ntock stop -t \"4:45pm\"                        # Case insensitive\n\n# Times display as: \"03:04 PM\" instead of \"15:04\"\n# Input accepts both \"3:04 PM\" and \"03:04 PM\" formats\n```\n\n#### 24-Hour Format (Default)\n\n```bash\ntock start -p Project -d Task -t 15:04\ntock stop -t 17:30\n\n# Times display as: \"15:04\"\n```\n\nNotes:\n\n- Times display with zero-padded hours (e.g., \"08:12 AM\") for better alignment\n- Input accepts both zero-padded (\"03:04 PM\") and non-padded (\"3:04 PM\") formats\n- 24-hour input (e.g., \"15:04\") is still accepted in 12-hour mode as a fallback\n\n## Commands\n\n```bash\n\nA simple timetracker for the command line\n\nUsage:\n  tock [command]\n\nAvailable Commands:\n  add         Add a completed activity\n  analyze     Analyze your productivity patterns\n  calendar    Show interactive calendar view\n  completion  Generate the autocompletion script for the specified shell\n  continue    Continues a previous activity\n  current     Lists all currently running activities\n  export      Export report data to file\n  help        Help about any command\n  ical        Generate iCal (.ics) file for a specific task, all tasks in a day, or all tasks.\n  last        List recent unique activities\n  list        List activities (Calendar View)\n  remove      Remove an activity\n  report      Generate time tracking report\n  start       Start a new activity\n  stop        Stop the current activity\n  version     Print the version info\n  watch       Display a full-screen stopwatch for the current activity\n\nFlags:\n  -b, --backend string   Storage backend: 'file' (default), 'todotxt', 'timewarrior', or 'sqlite'\n      --config string    Config file path (default is $HOME/.config/tock/tock.yaml)\n  -f, --file string      Path to the activity log file (or data directory for timewarrior)\n  -h, --help             help for tock\n  -v, --version          version for tock\n\nUse \"tock [command] --help\" for more information about a command.\n```\n\n[**→ Commands Reference**](docs/commands.md)\n\n### Start tracking\n\nStart a new activity. You can provide project and task as arguments, use flags, or use the interactive mode.\n\n```bash\ntock start                                             # Interactive mode\ntock start \"Project Name\" \"Task description\"           # Positional arguments\ntock start \"Project\" \"Desc\" \"My note\" \"tag1, tag2\"     # Positional notes/tags\ntock start -p \"Project\" -d \"Task\" -t 14:30             # Start at specific time\ntock start --note \"Meeting notes\" --tag \"meeting\"      # Start with note \u0026 tag flags\n```\n\n**Flags:**\n\n- `-d, --description`: Activity description\n- `-p, --project`: Project name\n- `-t, --time`: Start time (format depends on TOCK_TIME_FORMAT: HH:MM or \"h:mm AM/PM\", optional, defaults to now)\n- `--note`: Activity notes\n- `--tag`: Activity tags (can be used multiple times)\n\n### Stop tracking\n\nStop the currently running activity.\n\n```bash\ntock stop\ntock stop -t 17:00                          # Stop at specific time\ntock stop --note \"Done for today\"           # Stop and append a note\ntock stop --tag \"coding,feature\"            # Stop and add tags\n```\n\n**Flags:**\n\n- `-t, --time`: End time (format depends on TOCK_TIME_FORMAT: HH:MM or \"h:mm AM/PM\", optional, defaults to now)\n- `--note`: Activity notes\n- `--tag`: Activity tags (can be used multiple times)\n\n### Add past activity\n\nAdd a completed activity manually. You can use flags or the interactive wizard.\n\n```bash\ntock add                                         # Interactive wizard\ntock add -p \"Project\" -d \"Task\" -s 10:00 -e 11:00\ntock add -p \"Project\" -d \"Task\" -s 14:00 --duration 1h30m\ntock add -p \"Project\" -d \"Task\" -s 10:00 -e 11:00 --note \"Fixed bug #123\" --tag \"bugfix\"\n```\n\n**Flags:**\n\n- `-d, --description`: Activity description\n- `-p, --project`: Project name\n- `-s, --start`: Start time (format depends on TOCK_TIME_FORMAT: HH:MM/YYYY-MM-DD HH:MM or \"h:mm AM/PM\"/\"YYYY-MM-DD h:mm AM/PM\")\n- `-e, --end`: End time (format depends on TOCK_TIME_FORMAT: HH:MM/YYYY-MM-DD HH:MM or \"h:mm AM/PM\"/\"YYYY-MM-DD h:mm AM/PM\")\n- `--duration`: Duration (e.g. 1h, 30m). Used if end time is not specified.\n- `--note`: Activity notes\n- `--tag`: Activity tags (can be used multiple times)\n\n### Remove activity\n\nRemove a previously tracked activity.\n\n```bash\ntock remove                      # Remove the last activity (asks for confirmation)\ntock remove -y                   # Remove the last activity without confirmation\ntock remove 2025-12-10-01        # Remove a specific activity by ID\n```\n\n**Flags:**\n\n- `-y, --yes`: Skip confirmation\n\n### Continue activity\n\nContinue a previously tracked activity. Useful for resuming work on a recent task.\n\n```bash\ntock continue          # Continue the last activity\ntock continue 1        # Continue the 2nd to last activity\ntock continue -d \"New\" # Continue last activity but with new description\ntock continue --note \"Starting phase 2\" --tag \"phase-2\" # Continue with notes/tags\n```\n\n**Flags:**\n\n- `-d, --description`: Override description\n- `-p, --project`: Override project\n- `-t, --time`: Start time (format depends on TOCK_TIME_FORMAT: HH:MM or \"h:mm AM/PM\")\n- `--note`: Activity notes\n- `--tag`: Activity tags (can be used multiple times)\n\n### Current activity\n\nShow the currently running activity and its duration.\n\n```bash\ntock current\ntock current --format \"{{.Project}}: {{.Duration}}\" # Custom format (1h30m)\ntock current --format \"{{.Project}}: {{.DurationHMS}}\" # Custom format (01:30:00)\n```\n\n### Stopwatch (Watch Mode)\n\nDisplay a full-screen stopwatch for the current activity.\n\n```bash\ntock watch\ntock watch --stop  # Stop the activity when quitting watch mode\n```\n\n**Flags:**\n\n- `-s, --stop`: Stop the activity when exiting watch mode (default false)\n\n**Controls:**\n\n- `Space`: Pause/Resume\n- `q` / `Ctrl+C`: Quit\n\n### Recent activities\n\nList recent unique activities. Useful to find the index for `tock continue`.\n\n```bash\ntock last\ntock last -n 20  # Show last 20 activities\n```\n\n**Flags:**\n\n- `-n, --number`: Number of activities to show (default 10)\n\n### Calendar View (TUI)\n\nOpen the interactive terminal calendar to view and analyze your time.\n\n```bash\ntock calendar\n```\n\n**Controls:**\n\n- `Arrow Keys` / `h,j,k,l`: Navigate days\n- `n`: Next month\n- `p`: Previous month\n- `q` / `Esc`: Quit\n\n### Text Report\n\nGenerate a simple text report for a specific day.\n\n```bash\ntock report --today\ntock report --yesterday\ntock report --date 2025-12-01\ntock report -p \"My Project\" -d \"Fixing bugs\" # Filter by project and description\ntock report --summary        # Show project totals only\ntock report --json           # Output in JSON format\n```\n\n**Flags:**\n\n- `--today`: Report for today\n- `--yesterday`: Report for yesterday\n- `--date`: Report for specific date (YYYY-MM-DD)\n- `-p, --project`: Filter by project and aggregate by description\n- `-d, --description`: Filter by description (case-insensitive substring)\n- `-s, --summary`: Show only project summaries\n- `--json`: Output report as JSON\n\n### Report Export\n\nExport report data as text, CSV, or JSON.\n\n```bash\ntock export --today                             # Export today's report as a text file\ntock export --yesterday --format csv           # Export yesterday's report as CSV\ntock export --date 2026-01-29 --fmt json       # Export a specific day as JSON\ntock export -p \"Work\" -d \"meeting\" -m csv      # Export filtered activities as CSV\ntock export --today --stdout                   # Print the export to stdout\ntock export --today -o ./exports               # Write the export file to a specific directory\n```\n\n**Flags:**\n\n- `--today`: Export data for today\n- `--yesterday`: Export data for yesterday\n- `--date`: Export data for a specific date (YYYY-MM-DD)\n- `-p, --project`: Filter by project\n- `-d, --description`: Filter by description\n- `-m, --format`: Export format: `txt`, `csv`, or `json` (default `txt`)\n- `--fmt`: Alias for `--format`\n- `-o, --path`: Output directory\n- `--stdout`: Print output to stdout instead of writing a file\n\n### Calendar Integration (iCal)\n\nGenerate iCalendar (.ics) files for your tracked activities, compatible with Google Calendar, Apple Calendar, Outlook, etc.\n\n**Single Activity Export:**\n\nUse the unique key shown in `tock list` or `tock report` (format `YYYY-MM-DD-NN`).\n\n```bash\ntock ical 2026-01-07-01                    # Print ICS to stdout\ntock ical 2026-01-07-01 \u003e meeting.ics      # Save to file\ntock ical 2026-01-07-01 --open             # Open in default calendar app (macOS)\n```\n\n**Bulk Export (All activities):**\n\n```bash\ntock ical --path ./export                # Export all activities to a single ICS file\ntock ical --open                         # Export all and open in calendar app (macOS)\ntock ical 2026-01-07 --path ./export     # Save all tasks for a specific day to a single ICS file\n```\n\n**Flags:**\n\n- `--path`: Output directory for .ics files (required for bulk export unless --open is used)\n- `--open`: Automatically open generated file(s) in system calendar (macOS only)\n\n### Productivity Analysis\n\n\u003cimg src=\"assets/demo_3.png\" width=\"280px\" align=\"left\" style=\"margin-right: 20px; margin-bottom: 10px;\"/\u003e\n\nGenerate an analysis of your work habits, including Deep Work Score, Chronotype estimation, and Context Switching metrics.\n\n**Metrics:**\n\n- **Deep Work Score**: Percentage of time spent in focused sessions (\u003e1h).\n- **Chronotype**: Estimates your peak productivity time (Morning Lark, Night Owl, etc.).\n- **Context Switching**: Measures fragmentation of your workday.\n- **Session Distribution**: Breakdown of work sessions by duration.\n\n\u003cbr\u003e\n\n```bash\ntock analyze\ntock analyze --days 7\n```\n\n**Flags:**\n\n- `-n, --days`: Number of days to analyze (default 30)\n\n## Update Check\n\nTock automatically checks for updates once a week. When a new version is available, you will see a notification after running commands like `start` or `stop`.\n\nYou can disable this check by setting `check_updates: false` in your configuration file or using the environment variable `TOCK_CHECK_UPDATES=false`.\n\n## File Format\n\nActivities are stored in plaintext format (compatible with Bartib):\n\n```\n  2025-12-10 09:00 - 2025-12-10 11:30 | Project Name | Task description\n  2025-12-10 13:00 | Another Project | Ongoing task\n```\n\nYou can edit this file manually with any text editor.\n\n## Shell Completion\n\nTock supports shell completion for Bash, Zsh, Fish, and PowerShell. This includes basic command completion and **intelligent suggestions** for:\n\n- **Projects**: Suggests existing project names when using `-p` / `--project`.\n- **Descriptions**: Suggests recent activity descriptions when using `-d` / `--description`.\n  - Suggestions are context-aware: if a project is selected, it only suggests descriptions previously used for that project.\n- **Continue IDs**: Suggests valid activity IDs (with details) for the `tock continue` command.\n\n### Installation\n\nTo enable shell completion (e.g. for Oh My Zsh):\n\n1. Create a directory for the plugin:\n\n```bash\nmkdir -p ~/.oh-my-zsh/custom/plugins/tock\n```\n\n1. Generate the completion script:\n\n```bash\ntock completion zsh \u003e ~/.oh-my-zsh/custom/plugins/tock/_tock\n```\n\n1. Add `tock` to your plugins list in `~/.zshrc`:\n\n```bash\nplugins=(... tock)\n```\n\n1. Restart your shell:\n\n```bash\nexec zsh\n```\n\n## Shell Integration\n\nYou can display the current tracked activity directly in your shell prompt.\n\n### Zsh / Oh My Zsh\n\nAdd the following function to your `~/.zshrc`:\n\n```zsh\nfunction tock_info() {\n    # Returns empty string if no activity is running\n    tock current --format \"{{.Project}}: {{.Duration}}\" 2\u003e/dev/null\n}\n```\n\nThen add `$(tock_info)` to your prompt (PROMPT/PS1) or `RPROMPT`.\n\n**Example:**\n\n```zsh\nPROMPT='$(tock_info) %~ \u003e '\n```\n\n### Starship\n\nIf you use [Starship](https://starship.rs), add this to your `starship.toml`:\n\n```toml\n[custom.tock]\ncommand = \"tock current --format '{{.Project}}: {{.Duration}}'\"\nwhen = \"tock current \u003e /dev/null 2\u003e\u00261\"\nformat = \"[$output]($style) \"\nstyle = \"bold yellow\"\nshell = [\"bash\", \"--noprofile\", \"--norc\"]\n```\n\n### Technology Stack\n\n- **CLI Framework**: [Cobra](https://github.com/spf13/cobra)\n- **TUI Components**: [Bubble Tea](https://github.com/charmbracelet/bubbletea), [Bubbles](https://github.com/charmbracelet/bubbles), [Lipgloss](https://github.com/charmbracelet/lipgloss)\n- **Go Version**: 1.25+\n\n### Project Structure\n\n- `cmd/tock/main.go` - Entry point with DI setup\n- `internal/core/` - Domain layer (models, interfaces, DTOs)\n- `internal/services/` - Business logic\n- `internal/adapters/repositories/file/` - File storage implementation\n- `internal/adapters/repositories/timewarrior/` - TimeWarrior storage implementation\n- `internal/adapters/repositories/sqlite/` - SQLite storage implementation\n- `internal/adapters/cli/` - CLI commands and TUI\n- `internal/config/` - Configuration loading and management\n- `internal/extras/` - Extra utilities (e.g., iCal export)\n\n## Inspiration\n\nTock is inspired by and compatible with [Bartib](https://github.com/nikolassv/bartib) - an excellent time tracking tool written in Rust by Nikolas Schmidt-Voigt. It's saved me countless hours and helped me stay organized, so I wanted to create a similar tool in Go with a clean architecture approach and an interactive terminal UI.\n\n## License\n\nGPL-3.0-or-later\n","funding_links":[],"categories":["Productivity","Table of Contents","Go"],"sub_categories":["Time Tracking"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkriuchkov%2Ftock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkriuchkov%2Ftock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkriuchkov%2Ftock/lists"}