Four things CostHQ tracks
Every session CostHQ records covers four dimensions of cost and activity:- Time — Wall-clock duration from session start to end, measured to the second and displayed in a human-readable format (e.g.
14m). - Files — The number of files modified during the session, detected automatically from your working directory.
- Commits — Git commits made while the session is active, so you can correlate code output with AI spend.
- AI Cost — Token usage logged against 42+ built-in model prices from Anthropic, OpenAI, Codex, DeepSeek, Azure, Cohere, Google, and more.
How it works
CostHQ gives you four ways to track a session, so you can pick the method that fits your workflow without any forced migration.Zero-config wrap
Use
cs run <command> to start a session, launch a proxy, run your command, and print a cost summary — all in one step.Local proxy
Run
cs proxy start to spin up a local HTTP proxy on port 3739 that transparently intercepts Anthropic and OpenAI API calls and logs token usage automatically.Manual lifecycle
Use
cs start to open a session and cs end to close it, with full control over naming and notes. Ideal for scripting or multi-step workflows.OpenClaw / Claude Code
Install the CostHQ skill via
clawhub install costhq to add native session tracking inside Claude Code and other OpenClaw-compatible agents.Who it’s for
CostHQ is designed for three groups of people who all feel the same pain — invisible AI spend. Individual developers running Claude Code, Copilot, or custom agents who want a simple answer to “how much did that task cost me today?” Teams that need shared visibility into AI spend across members, with budget alerts and a centralized dashboard to prevent runaway costs on long-running agent jobs. Agent framework authors who want to instrument their SDKs and give end users first-class cost reporting without building infrastructure from scratch.Privacy & data
CostHQ is built on a local-first philosophy. Your session data never leaves your machine unless you explicitly opt in to a paid plan with cloud sync.All session data is stored in a local SQLite database at
~/.costhq/sessions.db. CostHQ collects no telemetry and makes no outbound network requests on the free tier..gitignore.