{"id":47730083,"url":"https://github.com/sahil87/tu","last_synced_at":"2026-07-20T06:00:30.208Z","repository":{"id":348455648,"uuid":"1174311187","full_name":"sahil87/tu","owner":"sahil87","description":"AI coding assistant cost tracking CLI — track token usage across Claude Code, Codex, OpenCode","archived":false,"fork":false,"pushed_at":"2026-07-17T09:22:59.000Z","size":1016,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-17T11:13:23.652Z","etag":null,"topics":["agents","claude-code","cli","codex","cost-tracking","developer-tools","fab-kit","opencode","terminal","tokens"],"latest_commit_sha":null,"homepage":"https://shll.ai/tu","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sahil87.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":"2026-03-06T09:49:36.000Z","updated_at":"2026-07-17T09:23:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sahil87/tu","commit_stats":null,"previous_names":["sahil87/tu"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/sahil87/tu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Ftu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Ftu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Ftu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Ftu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahil87","download_url":"https://codeload.github.com/sahil87/tu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahil87%2Ftu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35675233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"ssl_error","status_checked_at":"2026-07-20T02:08:09.736Z","response_time":111,"last_error":"SSL_read: 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":["agents","claude-code","cli","codex","cost-tracking","developer-tools","fab-kit","opencode","terminal","tokens"],"created_at":"2026-04-02T21:22:26.534Z","updated_at":"2026-07-20T06:00:30.198Z","avatar_url":"https://github.com/sahil87.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tu\n\n\u003e Part of the [shll toolkit](https://shll.ai) — see all projects there.\n\n[![Latest release](https://img.shields.io/github/v/release/sahil87/tu)](https://github.com/sahil87/tu/releases) [![Downloads](https://img.shields.io/github/downloads/sahil87/tu/total)](https://github.com/sahil87/tu/releases) [![Stars](https://img.shields.io/github/stars/sahil87/tu?style=social)](https://github.com/sahil87/tu/stargazers)\n\nAI coding assistant cost tracking CLI.\nTrack your token usage in style!\n\n## Install\n\n```sh\ncurl -fsSL https://shll.ai/install | sh -s -- tu\n```\n\nInstalls tu (plus the shll meta-CLI) via Homebrew, handling tap trust automatically. To install the entire shll toolkit instead:\n\n```sh\ncurl -fsSL https://shll.ai/install | sh\n```\n\n\u003e 📖 Full walkthrough: the [install guide](docs/site/install.md) covers install, shell completions, and multi-machine setup in depth.\n\n\u003cimg width=\"1025\" height=\"675\" alt=\"tu terminal output showing today's AI coding assistant costs across Claude Code, Codex, OpenCode, Gemini, and Copilot\" src=\"https://github.com/user-attachments/assets/d6d1c930-8230-4910-ba1b-985e7df17e7c\" /\u003e\n\n### Shell completions\n\n```bash\n# bash\necho 'eval \"$(tu shell-init bash)\"' \u003e\u003e ~/.bashrc\n\n# zsh\necho 'eval \"$(tu shell-init zsh)\"' \u003e\u003e ~/.zshrc\n\n# fish\ntu shell-init fish \u003e ~/.config/fish/completions/tu.fish\n```\n\n\u003e 💡 Have other shll tools? [`shll shell-install`](https://github.com/sahil87/shll#shll-shell-install--wire-the-rc-file-recommended) handles all of their shell integrations and autocompletions at once.\n\n## Update\n\n```bash\ntu update\n# brew update\n# brew upgrade tu\n```\n\n## Usage\n\n\u003e 📖 See [workflows](docs/site/workflows.md) for end-to-end recipes, and the full [command reference](https://shll.ai/tu/commands/) for every command and flag.\n\n```bash\ntu                   # Today's cost, all tools\ntu cc                # Today's cost, Claude Code\ntu h                 # Daily cost history, all tools\ntu cc mh             # Monthly cost history, Claude Code\ntu m                 # This month's cost, all tools\n```\n\nSources: `cc` (Claude Code), `codex`/`co` (Codex), `oc` (OpenCode), `gemini`/`gem` (Gemini), `copilot`/`cop` (Copilot), `all` (default)\n\n### Flags\n\n```\n  --json / -j          Output data as JSON (data commands only)\n  --csv                Output data as CSV (data commands only)\n  --md                 Output data as Markdown (data commands only)\n  --since / -s \u003cdate\u003e  Only include entries on/after date (YYYY-MM-DD or YYYYMMDD, history display)\n  --until \u003cdate\u003e       Only include entries on/before date (YYYY-MM-DD or YYYYMMDD, history display)\n  --full               Show full history (default: last 3 months for daily/weekly history)\n  --sync               Sync metrics before fetching (multi mode)\n  --dry-run            Preview sync without writing (tu sync only)\n  --fresh / -f         Bypass cache, fetch fresh data (data commands only)\n  --watch / -w         Persistent polling mode with live display (data commands only)\n  --interval / -i \u003cs\u003e  Poll interval in seconds (default: 10, range: 5-3600)\n  --user / -u \u003cuser\u003e   Show usage for a specific user (multi mode only)\n  --by-machine         Show per-machine cost breakdown (data commands only)\n  --no-color           Disable ANSI color output\n  --no-rain            Disable matrix rain animation in watch mode\n```\n\n### Setup (multi-machine sync)\n\n```bash\ntu init-conf         # Scaffold ~/.tu.conf\ntu init-metrics      # Clone metrics repo\ntu sync              # Push/pull metrics\ntu status            # Show config and sync state\n```\n\nFor end-to-end recipes — daily snapshots, history pivots, multi-machine sync, and watch mode — see [workflows](docs/site/workflows.md).\n\n## CI / branch protection\n\n`main` is gated by a required status check named **`ci-gate`**. The\n[`CI` workflow](https://github.com/sahil87/tu/blob/main/.github/workflows/ci.yml) runs the build and the test suite on\nevery pull request targeting `main` (and on pushes to `main`); the aggregating\n`ci-gate` job passes only when `build-and-test` succeeds. A branch ruleset on\n`main` requires `ci-gate` to be green before a PR can be merged.\n\nReproduce CI locally before opening a PR:\n\n```bash\nnpm ci \u0026\u0026 npm run build \u0026\u0026 npm test\n# or, with the task runner:\njust test\n```\n\nApplying or adjusting the ruleset is an admin action (needs a `gh` token with\nadmin scope on the repo). The exact, idempotent command is captured in\n[`scripts/ci-gate-ruleset.sh`](https://github.com/sahil87/tu/blob/main/scripts/ci-gate-ruleset.sh):\n\n```bash\nscripts/ci-gate-ruleset.sh           # dry-run: preview the ruleset payload\nscripts/ci-gate-ruleset.sh --apply   # create/update the ruleset (admin only)\n```\n\nThe script degrades gracefully — if `gh` is missing, unauthenticated, or lacks\nadmin scope, it prints the manual steps instead of failing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil87%2Ftu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahil87%2Ftu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahil87%2Ftu/lists"}