{"_id":"@andymlandai/token-tracker-cli","name":"@andymlandai/token-tracker-cli","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@andymlandai/token-tracker-cli","version":"1.0.0","description":"Ink (React-based) CLI companion for Token Tracker - Exact local token and cost tracking","publishConfig":{"access":"public"},"type":"module","bin":{"token-tracker":"bin/token-tracker.js","tt":"bin/tt.js"},"main":"dist/cli.js","scripts":{"build":"tsc","prepack":"tsc","prepublishOnly":"tsc","start":"node ./bin/token-tracker.js"},"keywords":["token-tracker","cli","ink","react-cli","ai-tokens","llm-costs","claude-code","antigravity","cline"],"author":"","license":"MIT","dependencies":{"ink":"^7.1.1","ink-table":"^3.1.0","react":"^19.2.8"},"devDependencies":{"@types/node":"^26.4.1","@types/react":"^19.2.18","typescript":"^5.8.2"},"engines":{"node":">=22.5.0"},"gitHead":"d8dc544982a980d7e4a2622874dc095befeb5a2c","_id":"@andymlandai/token-tracker-cli@1.0.0","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-uTN4OtWrsaSa/vC6bsM/CcW9BDEsKzZhmw8E5ryW/9Tt8KApvJRT5MXafEcxgMO081GhcX1LnT68GgE+THBPRA==","shasum":"93c50e86230f32589d32297ea3a1c3132cb911fb","tarball":"https://registry.npmjs.org/@andymlandai/token-tracker-cli/-/token-tracker-cli-1.0.0.tgz","fileCount":14,"unpackedSize":36005,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCeImEmKbvno8EbSteCIr67LKxarlPcoui0TZhJl+lWAgIgChwdByMk8jn2Icp5GNDbFl7w7HcF785m304uMjlXDus="}]},"_npmUser":{"name":"andymlandai","email":"adhirajbhopne@gmail.com"},"directories":{},"maintainers":[{"name":"andymlandai","email":"adhirajbhopne@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/token-tracker-cli_1.0.0_1788779791149_0.08098192873280619"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T11:16:30.898Z","1.0.0":"2026-09-07T11:16:31.278Z","modified":"2026-09-07T11:16:31.630Z"},"maintainers":[{"name":"andymlandai","email":"adhirajbhopne@gmail.com"}],"description":"Ink (React-based) CLI companion for Token Tracker - Exact local token and cost tracking","keywords":["token-tracker","cli","ink","react-cli","ai-tokens","llm-costs","claude-code","antigravity","cline"],"license":"MIT","readme":"# Token Tracker CLI Companion\n\nLightweight, high-performance terminal companion for **Token Tracker** built with **[Ink](https://github.com/vadimdemedes/ink)** (React for interactive CLIs).\n\nThe CLI connects directly to the desktop app's local SQLite database (`node:sqlite`) in **read-only mode**, providing instant visibility into your AI token consumption, model costs, and project metrics right from your terminal without opening the desktop GUI.\n\n---\n\n## Features\n\n- **Ink (React) Terminal UI**: Beautiful interactive dashboard with rounded-border metric cards and clean Unicode box-drawing tables.\n- **Top / Htop Style Live Monitor**: `tt watch` updates in place using React hooks (`useState`, `useEffect`) without terminal scrolling or flickering.\n- **Global Shorthand**: Run commands via either `token-tracker` or the concise `tt` alias.\n- **Zero-Bloat Architecture**: Powered by Node.js v22+ built-in `node:sqlite` engine (no C++ compilers or native rebuilds needed).\n- **Zero Write Contention**: Always opens SQLite in read-only mode (`PRAGMA query_only = ON;`), safely running concurrently while the desktop app ingests active turns.\n- **Scripting Friendly**: Full `--json` flag support across every command for clean raw JSON piping into `jq` or CI logs.\n\n---\n\n## Installation & Usage\n\n### 1. Global Installation (npm)\n```bash\nnpm install -g @andymlandai/token-tracker-cli\n```\n\n### 2. Instant Run via npx\n```bash\nnpx @andymlandai/token-tracker-cli status\n```\n\n---\n\n## Commands\n\nBoth `token-tracker` and `tt` work interchangeably:\n\n### `tt` or `tt status`\nDisplays today's usage (last 24 hours), 7-day totals, lifetime token/cost metrics, and top active projects.\n```bash\ntt status\n```\nOutput as pure JSON:\n```bash\ntt status --json\n```\n\n### `tt watch`\nInteractive live monitor that updates in place every 2 seconds with a pulsing live indicator.\n```bash\ntt watch\n```\n*(Press `q` or `Ctrl+C` to cleanly exit).*\n\n### `tt projects`\nLists all active tracked projects sorted by token volume with session counts, turns, cost, and last-active timestamps (filtering out empty/null projects).\n```bash\ntt projects\n```\n\n### `tt project <name>`\nInspects a specific project, listing individual chat sessions, AI model names, turn counts, and cost breakdown.\n```bash\ntt project \"Token_Tracker\"\ntt project \"Spartan\"\n```\n\n---\n\n## Environment Variables\n\n- `TOKEN_TRACKER_DB`: Optional override path to a custom `token_tracker.db` SQLite database file.\n  *(Default automatically discovers standard desktop app locations across Windows `%APPDATA%`, `~/.token_tracker`, and Linux/macOS paths).*\n","readmeFilename":"README.md","_rev":"1-87d77d634868608337788149b99b94a1"}