Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
## Unreleased

### Added (CLI)
- **Git cost attribution.** New `codeburn git-cost` command attributes local
AI coding spend to commits in the current git repository using a configurable
post-session attribution window, with text and JSON output for attributed
commits and unattributed sessions.
- **Multiple subscription plans can be tracked at the same time.**
`codeburn plan set` now stores plans in a provider-keyed `plans` map, so
setting a Codex custom plan no longer overwrites an existing Claude plan.
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ codeburn export -f json # JSON export
codeburn optimize # find waste, get copy-paste fixes
codeburn optimize -p week # scope the scan to last 7 days
codeburn compare # side-by-side model comparison
codeburn git-cost # attribute AI spend to local git commits
codeburn yield # track productive vs reverted/abandoned spend
codeburn yield -p 30days # yield analysis for last 30 days
codeburn models # per-model token + cost table (last 30 days)
Expand Down Expand Up @@ -236,6 +237,21 @@ Or press `c` in the dashboard to enter compare mode. Arrow keys switch periods,

Also compares per-category one-shot rates, delegation rate, planning rate, average tools per turn, and fast mode usage.

### Git Cost

```bash
codeburn git-cost # last 7 days in the current git repo
codeburn git-cost --since week # same 7-day window
codeburn git-cost --since 14days # custom lookback window
codeburn git-cost --provider claude # provider-scoped attribution
codeburn git-cost --window-minutes 60 # tighter post-session attribution window
codeburn git-cost --json # machine-readable output
```

`git-cost` attributes local AI spend to commits in the current repository. It matches only sessions whose recorded project path is inside the repo, then links each session to commits made between the session start and a configurable window after the session end. Commit matching uses git committer timestamps from the current checkout's `git log`, the same clock used by `git log --since/--until`. If a session maps to multiple commits, its cost is split evenly so totals are not double-counted. Sessions without matching commits are reported as unattributed spend.

Attribution is intentionally heuristic: it shows which commits are close to usage sessions, not proof that a commit was AI-authored. It also depends on providers recording usable project paths. If a provider only exposes a project name, several repos share the same final directory name, or a path is normalized differently by an upstream parser, those sessions may appear as unattributed.

### Yield

```bash
Expand Down
Loading
Loading