codeburn/docs/guard.md
Resham Joshi f54345a5c3
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (22) (push) Waiting to run
Tests / test (22.13.0) (push) Waiting to run
Tests / test (24) (push) Waiting to run
Tests / test (26) (push) Waiting to run
Tests / test-platforms (macos-latest) (push) Waiting to run
Tests / test-platforms (windows-latest) (push) Waiting to run
Tests / desktop (push) Waiting to run
README: tell the story first, keep the manual in docs (#1527)
* docs: move the README reference manual into docs/

* assets: designed README images and their sources

* README: tell the story first, keep the manual in docs
2026-09-22 16:28:27 +02:00

1.2 KiB

Guard your budget

codeburn guard install            # hooks into this project's .claude/settings.json
codeburn guard install --global   # or into ~/.claude/settings.json
codeburn guard status             # caps, install locations, flagged projects
codeburn guard uninstall          # removes cleanly, leaves your own hooks alone

Guard installs opt-in hooks into Claude Code that watch session cost while you work:

  • Soft cap (default $5): a one-time in-session warning when a session passes it.
  • Hard cap (default $15): stops the session; codeburn guard allow lifts it for that session only.
  • Checkpoint (default $3): if a session ends past this with no edits and no commits, a nudge suggests starting fresh with a named deliverable.
  • Session openers: projects where optimize found waste get a one-line flag at session start.

Caps are edited in ~/.config/codeburn/guard.json (set a value to null to disable it). Add --statusline to show session cost in the Claude Code status line. Installs go through the same journal as everything else, so codeburn act undo removes them too. Hooks fail open: a broken guard never blocks a session.