TALLYGRAPHUNIFIED SPEND CONSOLE

Quickstart

Install nothing, run one command, and see your AI coding spend in TallyGraph.

TallyGraph reads the usage history that AI coding agents already keep on your machine (Claude Code, Codex, OpenCode and Pi), turns it into token and cost records, and sends only those numbers, plus the CLI and runtime versions, to your workspace. There is no SDK to add and no proxy to run.

copyHTTPSConnectors pagecreate a write tokenYour terminalnpx tallygraph collectIngest APIPOST /api/ingest/usageDashboardspend by model
One write token, one command. The dashboard updates as soon as the first batch lands.

Requirements

  • Node.js 22.13 or newer. The CLI reads local SQLite files with node:sqlite. Check with node --version.
  • A TallyGraph account and workspace.
  • At least one supported agent used on this machine (see sources).

Three steps

1. Create a write token

Open Connectors in the app and create a token. It is shown once. The command on that page already has it filled in.

2. Run the command

terminal
npx --yes tallygraph collect --token tg_xxxxxxxx

It finds the agents installed on this machine, reads their history read-only, and uploads the usage. The last line tells you what happened:

[tallygraph] delivered=1284 rejected=0 retained=0 status=ok

3. Keep it running (optional)

Install it as a background service so new usage keeps arriving every 15 minutes, starting at login:

terminal
npx --yes tallygraph service install --token tg_xxxxxxxx

Check it with tallygraph service status and remove it with tallygraph service uninstall.

Supported sources

The CLI looks in these default paths. Nothing is written there.

AgentRead fromOverride
Claude Code~/.claude/projects--claude-dir
Codex~/.codex/sessions--codex-dir
OpenCode~/.local/share/opencode/opencode.db--db
Pi~/.pi/agent/sessions--pi-dir
claude-tap~/.local/share/claude-tap/traces.sqlite3--db
Cursor, tokscalean export file you pass in--file

Troubleshooting

You seeWhat it meansFix
No local sources foundNone of the default paths exist on this machine.Use the agent at least once, or point the CLI at its folder with the override flag.
Node version errorNode is older than 22.13.Upgrade Node (nvm install 22, or your package manager).
auth failed (401/403)The token is wrong, revoked or expired.Create a new token. Rows stay in the local spool and go out on the next run.
retries exhaustedThe network or the API failed five times.Run the command again. Nothing was lost.
Dashboard still emptyThe upload has not landed yet.Wait a few seconds and reload. Check the last CLI line says status=ok.
Want to see what would be sent before sending anything? Run npx tallygraph read. It prints the events as JSON lines and makes no network calls.