Which project is your Claude Code money going to?
Per-project cost is the question clients and finance ask. There are two good answers, depending on where the usage comes from. Here is what each one can and cannot tell you.
For Claude Code sessions: group locally
Claude Code keeps its logs in a folder per project under ~/.claude/projects/. The open source ccusage tool, which MyTokenTracker is built on, can group usage by those folders:
npx ccusage@latest claude daily --instances
This runs entirely on your machine. It covers what is still on disk, which is 30 days by default (Claude Code docs).
What MyTokenTracker's CLI does, and does not, send
npx mytokentracker reports by day, agent and model, and that is all it uploads after init. It does not send project or folder names.
That is a deliberate choice. Folder names often carry client names and internal code names, and a usage tracker does not need them to tell you whether your plan pays for itself.
For apps you build: tag usage with a project
If your own code calls the Claude or OpenAI API, send each call's usage to the events API with an optional project field, or use the Python and Node wrappers. You choose the name, so it can be a client code rather than a path.
Usage that arrives with a project appears in Insights under Project Economics: 30-day cost, tokens and the dominant model for each project, side by side.
Frequently asked questions
Can I see Claude Code cost per project?
Yes, with the right tool for the job. Claude Code stores its logs per project folder, and ccusage can group usage by project in the terminal with npx ccusage@latest claude daily --instances. MyTokenTracker shows a per-project breakdown in Insights for usage that arrives with a project name.
Does npx mytokentracker report by project?
No. The CLI reports by day, agent and model, and it uploads only those totals. It deliberately does not send project or folder names, which keeps file paths on your machine.
How does usage get a project name in MyTokenTracker?
Through the events API, which accepts an optional project field on every event, or the Python and Node wrappers that post to it. Usage recorded that way appears in Insights under Project Economics, with cost, tokens and the dominant model per project.
Why not upload project names from the CLI?
Project names come from folder paths, and folder paths often contain client names or internal code names. We would rather leave them on your machine by default than ask you to trust us with them.
What is the quickest way to answer "which project cost the most"?
For Claude Code on one machine, run the ccusage project report locally. For apps you build on the Claude or OpenAI API, tag each call with a project through the events API and use Insights.