tallybook is a local cost tracking tool for Claude Code and Codex users, with the core goal of turning the session records (transcripts) already on disk into readable spending reports.
In terms of purpose, tallybook prices every Claude Code and Codex session on disk, shows how much each agent costs over any time period, and explains in plain English which practices would have been cheaper. It is suitable for developers who want to understand their actual spending on AI coding assistants and find more economical ways to use them.
Main capabilities include: counting costs by session, sub-agent, and model dimension; supporting week-over-week comparisons; providing findings and suggested patches. The tool offers three usage forms: a CLI command line, a browser UI, and an MCP server.
In terms of usage, it can be run directly as a CLI; using tallybook --serve opens the same report in a browser; tallybook-mcp can also be added to Claude Code or Codex so the agent itself can query current costs and more cost-saving options. tallybook-mcp is released together with tallybook and does not need to be installed separately. For Codex, it can be added to ~/.codex/config.toml. In addition, it can also be installed via go install github.com/magna-nz/tallybook/cmd/tallybook@latest, or by downloading a release version.
In terms of privacy and platform, tallybook requires no proxy, no API keys, and no data leaves the local machine. It supports macOS, Linux, and Windows.
For more details about the command reference, the MCP server's tools, configuration, and the privacy model, the official documentation is located on its documentation site.