Skip to content
dobbyBeta

For agents: an index of these docs is at /docs/llms.txt, and this page as markdown is at /docs/cap-spend.md.

Cap spend

Keep more of your Claude plan for yourself, switch to an API key with a dollar cap, limit one ticket, and see what each pull request cost.

Keep more of your weekly plan

Dobby stops starting work at this share of your week. The default is 95.

Terminal
dobby config set pacing.weekCap 80
dobby limits
Running · 5-hour 34% (cap 60%) · week 49% of 80%

Run on an API key

The quickest way is dobby init. When Claude Code is not signed in, it asks "Plan or API key?".

To set it up by hand:

  1. Add the key to your secrets file.

    ~/.config/dobby/secrets.env
    DOBBY_API_KEY=<key>
  2. Set the mode and the dollar caps.

    config.json
    { "billing": { "mode": "apiKey", "dailyUsd": 20, "weeklyUsd": 100 } }
  3. Check the key. The "API key" row makes one small real call.

    Terminal
    dobby doctor
Anthropic says "This API key is not scoped to a workspace"

Create the key inside a workspace in Console, or set the workspace id:

Terminal
dobby config set billing.workspaceId wrkspc_...

Cap one ticket

Set the most one ticket may spend, by size, in percent of your week. A ticket over it goes to you.

config.json
{ "ticketBudget": { "S": 1, "M": 3, "L": 8 } }

These numbers are an example. No ticket is capped until you set them.

See what a pull request cost

Each pull request Dobby opens gets a comment like this:

PR comment
Cost of this PR: 0.42% of your week
| Stage | Cost | Runs |
| Planning | 0.03% | 1 |
| Build | 0.30% | 2 (1 fix round) |
| Tester | 0.05% | 2 |
| Review | 0.04% | 2 heads |
Command Shows
dobby cost <id> The same table for one ticket.
dobby usage [days] Spend by model, from the Claude logs on this computer.
dobby receipt [days] A one-line receipt and an image card.