# See Claude Code Cost per Project on Mac

> Which repository used your Claude Code plan this week? How to break usage down by project, from a quick terminal report to a full drilldown.

- Canonical URL: https://getedith.pro/guides/claude-code-cost-per-project
- Published: 2026-12-03
- Updated: 2026-12-03

## The short answer

Claude Code writes a transcript for every session on your Mac, and each transcript records the folder it ran in and the tokens every request used. Group those by repository and you have cost per project. Claude Code's own `/usage` shows the current session; the free ccusage tool groups Claude Code usage by project in the terminal; Edith's [Usage](https://getedith.pro/extensions/claude-code-usage) extension groups every session, worktree and chat under its GitHub repository and keeps a drilldown you can filter by day, model and agent.

Estimates, not a bill

On a Pro, Max or Ultra plan you pay a flat price, so a per-project cost is an estimate: tokens priced at public API rates. It is still the best measure of which project used the plan. With an API key, the same figure is close to what you are charged, but your invoice from Anthropic is the real number.

## Who needs this

- **Freelancers and agencies** who want to show a client how much agent work went into their project, or to pass on API costs.
- **Teams on API keys** who split spend between products.
- **Anyone who ran out of a weekly limit** and wants to know which repository did it. See [how to pace the Claude Code weekly limit](https://getedith.pro/guides/claude-code-weekly-limit) for the other half of that problem.

## Method 1: /usage in each session

Built into Claude Code

### Check the session cost before you exit

`/usage` (also `/cost`) shows the cost of the current session alongside your plan limits, as listed in Anthropic's [commands reference](https://code.claude.com/docs/en/commands). If you run one session per project and write the number down, that is a per-project cost. It does not add sessions up, and it forgets them once they end.

## Method 2: ccusage project reports

Free, open source

### Group a report by project

[ccusage](https://github.com/ccusage/ccusage) is free and MIT licensed. Its README (checked December 2026) documents a `--instances` flag that groups Claude Code usage by project, a `--project` filter for one project, and `--json` output for scripts:

Terminal

Shell

```
npx ccusage claude daily --instances
npx ccusage claude daily --project myproject --json
```

It is a good fit for a quick report or an invoice script, and it costs nothing. It groups by the project folder Claude Code recorded, so whether worktrees and second clones of one repository end up together depends on how Claude Code named them.

## Where these fall short

- **Worktrees split a project.** Parallel agents in `.claude/worktrees` or sibling folders can show up as different projects.
- **Folders are not repositories.** The same repository cloned twice, or on two machines, is two folders.
- **Claude Code is not the only agent.** If Codex also worked on the project, a Claude-only project view leaves it out.

## The Edith way: the project drilldown

Usage reads the transcripts Claude Code keeps on your Mac, plus Codex, Cursor, OpenCode and other agents, and matches each session's folder to its GitHub repository. Every worktree and every clone of a repository rolls up into one row. Only token counts, model names, timestamps, folders and short chat titles are used; your prompts and code are not.

1. **Install Usage and collect your history**
   Open Library in Edith, find Usage and press Install. Open the Usage page and press the refresh button in the page header. The first run reads every transcript on this Mac and can take a few minutes.
2. **Open the By project card**
   Pick a range in the filters at the top of the page, then scroll to By project and press Show repositories. Each row is one repository with its Tokens, Cost, % share, Days, Time spent and Last used. Click a column header to sort, for example by Cost to put the most expensive project first.
3. **Drill into one repository**
   Expand a repository to see its folders, worktrees and individual chats, each with tokens and estimated cost, so you can see which branch or which agent run was the expensive one.
4. **Act on a row**
   Right-click a repository for Open repository or Copy repository link, or a chat for Copy chat ID, handy when you write up a client report.

## Folders without a GitHub remote

Not every folder is a clean clone. After each refresh, Usage moves a folder with no GitHub remote under a repository when its name or path clearly names exactly one of your known repositories, ignoring suffixes such as `-main` or `-fix`. Moved folders are marked attributed by name in the drilldown. If you set up the optional [Jev](https://getedith.pro/extensions/jev) extension, it can suggest a match for the rest. Moving a folder only moves its cost between rows; the overall total never changes.

Anything that cannot be tied to a folder reliably, such as some Cursor usage that has no local chat on this Mac, stays in an Unattributed row, so the project list always adds up to the same total as the rest of the page.

## Projects across agents and machines

Because Usage reads more than Claude Code, the project row for a repository includes Codex, OpenCode and other agents that worked in it. Use the agent filter at the top of the page to show only Claude Code. And if the same repository is cloned on a server you added in [Machines](https://getedith.pro/extensions/ssh-machines), ticking that machine under Collected over SSH in Usage settings and pressing Collect now adds its sessions to the same row.

### From the terminal

For invoice scripts and spreadsheets, the same drilldown prints JSON with `--json`, and `attribution` shows or resets how folders were matched:

Terminal

Shell

```
ed usage projects list --range month --limit 10
ed usage projects show my-app --range month
ed usage projects list --range month --json
ed usage attribution ls
```

## Common questions

### Can Claude Code show cost per project by itself?

Not across sessions. `/usage` covers the session you are in. You need a tool that reads the saved transcripts to total past sessions by project.

### Does a subscription make the cost meaningless?

No. You do not pay it, but it is a consistent measure of how much of your plan each project used, and it is what the same work would cost on an API key.

### Are worktrees counted under their repository?

Yes. Worktrees from `claude --worktree`, git worktrees and clones with the same GitHub remote all roll up into one repository row, with each worktree listed underneath.

## Get started

Usage is included with Edith, a Mac app for macOS 14 or later on Apple silicon, sold as a [one-time purchase](https://getedith.pro/pricing). Pair it with [Code Review](https://getedith.pro/extensions/code-review) to read what the agents changed in each worktree, see [how to track every coding agent in one view](https://getedith.pro/guides/track-ai-coding-agent-usage-mac), or compare with the free terminal route on our [ccusage alternative page](https://getedith.pro/alternatives/ccusage).

## Edith extensions used

- [Claude Code Usage Tracker for Mac: Codex, Cursor](https://getedith.pro/extensions/claude-code-usage): See what your coding agents cost and how close you are to their limits.
- [Run Multiple Claude Code and Codex Agents on Mac](https://getedith.pro/extensions/coding-agents): See every coding agent on your Macs in one board, and step in when one needs you.
- [Review Pull Requests on Mac in a Terminal Workspace](https://getedith.pro/extensions/code-review): Review GitHub pull requests and code changes in a focused terminal workspace.

## Related guides

- [Claude Code Weekly Limit: Pace It on Your Mac](https://getedith.pro/guides/claude-code-weekly-limit): How the Claude Code weekly limit works, where to see it, and how to pace a week of agent work on your Mac so you do not run out on a Wednesday.
- [Track AI Coding Agent Token Usage on Mac](https://getedith.pro/guides/track-ai-coding-agent-usage-mac): Track token usage and estimated cost across Claude Code, Codex, Cursor, OpenCode, Gemini and other coding agents on your Mac, in one view instead of five.

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
