# How to see ongoing project costs across all your Claude Code branches

> 3-minute setup. Most days you have eight branches in flight, two parallel Claude Code sessions, and no idea which one is bleeding money. This tutorial wires BudgetClaw into your Claude Code status line, adds a `/budget` slash command, and runs the watcher as a launchd agent so the data is always live. Zero keys, zero prompts, zero latency added.

- HTML version: https://roninforge.org/tutorials/how-to-see-ongoing-project-costs
- Tool used: BudgetClaw - https://roninforge.org/budgetclaw.md
- Audience: developers using Claude Code daily across multiple projects and branches
- Last updated: 2026-04-29 against BudgetClaw v0.1.5

## Why this matters

The default Claude Code status line tells you what the current conversation costs. That's not what you actually need. You need to see what every project on your laptop has cost today, all at once, while you context-switch between them.

Two specific failure modes the default status line has:

1. **Single-session view.** The number resets the moment you start a fresh session. Yesterday's $80 agentic refactor on the same branch is invisible.
2. **Hardcoded model pricing.** Most community status-line scripts ship with Sonnet 4.5 rates baked in (`$3 / $15` per MTok). Run them on Opus 4.7 (`$5 / $25`) and the displayed cost is silently wrong by ~5x.

This tutorial replaces that with a BudgetClaw-backed status line that shows your top spending projects today, sorted descending, color-coded. Plus a `/budget` slash command for the full per-branch table. Plus a macOS launchd agent so the watcher runs whether you remember to start it or not.

## Step 1 - Install BudgetClaw (if you don't already have it)

    curl -fsSL https://roninforge.org/budgetclaw/install.sh | sh

Or via Homebrew:

    brew install roninforge/tap/budgetclaw

Verify:

    budgetclaw version

If you've never run BudgetClaw before, also run `budgetclaw init` to create the config and state directories.

## Step 2 - Install the Claude Code integration

One command installs the status line, the `/budget` slash command, the macOS launchd watcher, and patches your `~/.claude/settings.json`:

    curl -fsSL https://roninforge.org/claude/install.sh | sh

The installer:

- Backs up your existing `~/.claude/statusline-command.sh` to a timestamped `.bak` file.
- Writes the new BudgetClaw-driven status line in its place.
- Drops `~/.claude/commands/budget.md` so `/budget` is registered.
- On macOS: writes `~/Library/LaunchAgents/org.roninforge.budgetclaw.plist`, loads it with `launchctl`, and starts the watcher in the background. Logs go to `~/Library/Logs/budgetclaw.log`.
- Patches `~/.claude/settings.json` so `statusLine.command` points to the new script. Other keys are untouched.
- Installs `jq` via Homebrew if it's missing. The status-line script needs it to parse the JSON Claude Code sends on stdin.

Linux: the launchd step is skipped. Use a systemd user unit to run `budgetclaw watch` permanently. See the [systemd snippet in the spend-cap tutorial](https://roninforge.org/tutorials/how-to-set-a-hard-spend-cap-on-claude-code#step-5).

## Step 3 - Backfill historical data

If the watcher hasn't been running, today's column starts at $0.00. Backfill walks every JSONL file in `~/.claude/projects/` and seeds the rollup database:

    budgetclaw backfill

It dedupes on event UUIDs, so re-running is safe. After this, your status line shows real numbers immediately.

## Step 4 - Open Claude Code and look at the bottom

Open a new Claude Code session. The status line at the bottom now reads:

    ~/development/myapp (main) | Opus 4.7 | MyClient $78.56 · myapp $8.88 · ronin $5.93

Reading right to left: every project that has spent money today, sorted descending, with the dollar amount. Color thresholds:

- **Red** when a single project crosses $50 today
- **Yellow** when it crosses $10
- **Dim** below that

Top five projects shown. If you have more, the line ends with `+N more` so you don't lose layout to a wide table.

## Step 5 - Type `/budget` for the full per-branch table

The status line is the ambient view. When you actually want to drill in - "which feature branch on which project ate $40 this week?" - type `/budget` inside any Claude Code session. It runs `budgetclaw status` and prints the full table:

    PROJECT          BRANCH                     TODAY    WEEK     MONTH
    MyClient         29323-limit-meetups        $61.20   $61.20   $61.20
    MyClient         29387-guest-attendance     $17.36   $17.36   $17.36
    RoninForge.org   main                       $8.88    $85.38   $510.32
    budgetclaw       main                       $3.05    $43.64   $158.11
    TOTAL                                       $90.49   $207.58  $746.83

Pass an argument and it filters by substring on project or branch:

    /budget MyClient

That returns only the MyClient rows. Useful when one project has 30 active branches and you want a focused view.

## Step 6 - Verify the watcher is running

On macOS:

    launchctl list | grep budgetclaw

Expected output (the first column is the PID, the second is the last exit code, third is the label):

    8609   0   org.roninforge.budgetclaw

If it's not listed, reload the agent:

    launchctl unload ~/Library/LaunchAgents/org.roninforge.budgetclaw.plist
    launchctl load   ~/Library/LaunchAgents/org.roninforge.budgetclaw.plist

The watcher restarts on login automatically (`KeepAlive=true`, `RunAtLoad=true`).

## Step 7 - Tune color thresholds (optional)

The defaults are dim under $10, yellow at $10-$50, red over $50. To change them, edit `~/.claude/statusline-command.sh` and find this awk block:

    if (amt >= 50) col = "\033[31m"      # red
    else if (amt >= 10) col = "\033[33m" # yellow

Adjust the numbers to match your spend rhythm. The script is read on every status-line render so changes take effect immediately.

## Plugin alternative (no launchd, no statusline)

If you don't want the system-level integration and only want the `/budget` slash command, you can install the BudgetClaw plugin via your Claude Code marketplace. The plugin ships:

- `/budget` - the same per-branch table
- `/budgetclaw-setup` - bridges to the curl installer above when you decide you do want the full integration

Plugins can't override the global status line or install launchd agents on their own. That's by design - one status line per machine, configured by the user. So the curl installer remains the path for the full setup.

## Trust pledge

BudgetClaw never sits between your editor and the Anthropic API. The status line reads BudgetClaw's local SQLite rollup database. BudgetClaw reads JSONL files Claude Code already writes to disk. No prompts captured, no API keys held, no latency added on the inference path.

## Uninstall

One command rolls everything back, including restoring your original status line from the most recent `.bak` file:

    curl -fsSL https://roninforge.org/claude/uninstall.sh | sh

BudgetClaw itself, its config, and its rollup database are untouched.

## Troubleshooting

**Status line shows `BC: no spend today`.** The watcher hasn't recorded events yet. Run `budgetclaw backfill` once to seed historical data.

**Status line is blank or shows raw escape codes.** `jq` is missing. Run `brew install jq` (macOS) or `apt install jq` (Linux), then start a fresh Claude Code session.

**Watcher not running after reboot.** Check `launchctl list | grep budgetclaw`. If empty, reload the plist as in Step 6. Check the watcher's stderr at `~/Library/Logs/budgetclaw.err` for crashes.

**`/budget` command doesn't appear.** Restart your Claude Code session. The `~/.claude/commands/` directory is read at session startup.

**The numbers don't match `/cost`.** They shouldn't. `/cost` is the current session only. BudgetClaw is everything attributed to that project + branch over the day, week, or month.

## Source

- BudgetClaw: https://github.com/RoninForge/budgetclaw
- Integration installer source: https://roninforge.org/claude/install.sh
- This tutorial: https://roninforge.org/tutorials/how-to-see-ongoing-project-costs
