Bough Work and Cost Explorer
Turn Claude Code, Codex CLI, and Pi histories into a browsable work map with per-task API-rate estimates.
- Source repo
- nickelsec/bough
- Stars
- ★ 118
- Last updated
- 10d ago
- License
- MIT
- Primary language
- Go
- FA score
- 77/100 · Good
At a glance
- How it runs
- Works with
- Portable with changesCodex · Claude Code
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A Claude Code user who wants to review prompts, failures, and estimated spend for a feature or afternoon of work.
- Not a fit if
- Teams that need costs to match subscription invoices
- Users who need extensively validated Codex or Pi metrics
- Source review
- 77/100 · Good
What does this agent do, and when should you use it?
Bough is a Go CLI that reads local session histories from Claude Code, OpenAI Codex CLI, and Pi, then organizes prompts into tasks and sittings. Running `bough` opens a local browser view bound to `127.0.0.1`, with a work diagram, full prompt records, estimated task costs, and Git commit details. It can also print a terminal list with `--text` or export the work structure without visual layout using `--json`. The single binary works offline by default, makes no model calls, and sends no data; it reads histories and project Git history without modifying them. Costs use published API rates and are not subscription invoices; the project is early, and its grouping thresholds were fitted to one developer's history.
When invoked, bough discovers histories for Claude Code, Codex CLI, and Pi and reads prompts, tools, files, commits, and token counts by project. It groups prompts into tasks and tasks into sittings; the browser view draws those levels, and selecting a node opens the corresponding untrimmed prompt record. Bough reads local Git history at paths named in the transcripts to check commits; --no-repo disables that read. It estimates task and project cost using published rates built into the binary. Models with no published rate or request-size pricing show token counts with NA for the amount. Use --agent to select a history source and --text, --json, or -o to choose an output path; --rename assigns a display name to a project.
- A Claude Code user who wants to review prompts, failures, and estimated spend for a feature or afternoon of work.
- A developer switching among Claude Code, Codex CLI, and Pi who wants those local project histories in one list.
- A user who needs to feed work records into another script or analysis flow can export the structure with
--json. - A terminal-focused developer can inspect task summaries with
--textor write output to a file. - A developer checking which commits appear in a session history can compare them with the local project Git history, or turn that read off.
How do you install or deploy this agent?
On macOS, install with Homebrew:
brew install nickelsec/tap/boughOn Linux or macOS without Homebrew, run:
curl -fsSL https://www.bough.run/install.sh | shOn Windows, run:
irm https://www.bough.run/install.ps1 | iexGo users can install with:
go install github.com/nickelsec/bough/cmd/bough@latestTo build from source:
git clone https://github.com/nickelsec/bough
cd bough
go build ./cmd/boughThe README says the install scripts check published checksums. No API key or model service is required. Building from source requires Go; the project lists one dependency, golang.org/x/term.
How do you use this agent?
First run:
boughBough discovers projects and opens its local browser view. Common options:
bough --text
bough --json
bough --agent=pi
bough --no-repo
bough --root DIR
bough project-one --rename "Portfolio site"--text prints a terminal list, --json exports the work structure, and --agent accepts claude, codex, pi, or all. Set --root to read histories from a different directory. Open a named project with bough project-one, or write output to a file with bough -o notes.txt.
What are this agent's strengths and limitations?
- Its prompts-to-tasks-to-sittings view makes individual pieces of work inspectable instead of treating a multiweek session as one unit.
- It automatically reads Claude Code, Codex CLI, and Pi histories and lets users filter by agent.
- Published rates are built into the binary for offline estimates; models it cannot price are marked NA.
- Users can inspect results in a local browser, as terminal text, or as JSON.
- Task-grouping thresholds were fitted to one developer's history and may place boundaries poorly for other workflows.
- The README describes Codex and Pi support as newer and less exposed, so their metrics warrant extra scrutiny.
- Cost figures use published API rates and do not represent a user's actual subscription or invoice.
- Models without published rates or with request-size pricing get token counts but no cost figure.
How does this agent compare with similar options?
The README distinguishes Bough from Claude Code's /stats: /stats covers usage statistics, while Bough groups work into tasks and estimates their costs. It also notes that usage tools generally stop at the session level; Bough attempts to split sessions into tasks.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Bough Work and Cost Explorer This agent | 77 · Good | CLIFree | ★ 118 | 10d ago | Go | Codex · Claude Code |
| ChatLab — Chat History Analyzer | 42 · Major gaps | Desktop appFree + model costs | ★ 7.5k | today | TypeScript | — |
| Principia | 66 · Some gaps | CLIFree + model costs | ★ 1.1k | 10d ago | Rich Text Format | — |
| optim-agent | 65 · Some gaps | Library / SDKFree + model costs | ★ 801 | 1mo ago | Python | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
Permissions and side effects: the README limits the tool to reading local Claude Code, Codex, and Pi history plus optional Git history; it says the server binds to 127.0.0.1, makes no network requests by default, and writes only to its own settings directory when a project is renamed. It also documents --no-repo, supporting least_privilege=3 and external_effects=3. The installer downloads and installs a binary and documents checksums, but runtime actions are not described as requiring step-by-step confirmation, so user_confirmation=2. Data flows are described in detail, but full prompts may contain sensitive information and the files show no redaction or sensitive-content protections, so sensitive_data_handling=1. The module declares only x/term and indirect x/sys; CI includes security scanning and CodeQL, but no dependency audit results are supplied, so dependency_security=2. Repository and agent directories are read-only and the rename file location is documented, but no restore or undo process is described, so rollback=2. The license names a copyright holder, but there is no verified publisher identity or broader evidence of maintainer attribution, so source_attribution=2.
The README, SECURITY file, and CI configuration are broadly consistent about local read-only behavior, loopback serving, and no data transmission. CI declares cross-platform builds, tests, static analysis, and fuzzing; this review does not treat those declarations as executed verification, so self_consistency=2. The Go module has few dependencies, while embedded pages and offline rates reduce runtime dependencies; building still requires Go dependency retrieval and installation channels rely on release hosting, so dependency_availability=2. The docs mention NA for unpriced models and continuing when Git history is unavailable, but give little detail about user-visible parse or permission errors, so failure_messages=1.
The intended audience and use are clear: individual developers using Claude Code, Codex CLI, or Pi who want project and task views of time, prompts, and estimated cost. The README covers GUI, text, JSON, and filtering use cases, so audience_and_scenarios=3. Boundaries are concrete: cost is not a bill, unsupported rates produce NA, only three agents are covered, and grouping thresholds are fitted to one person's history, so capability_boundaries=3. CLI options cover project selection, output modes, agent filtering, and disabling Git reads, but automatic discovery triggers and error paths are not fully specified, so trigger_precision=2. Install methods and CI cover macOS, Linux, and Windows, though some installation paths use shell or PowerShell and require network access, so environment_fit=2.
The README is organized around usage, features, limitations, formats, layout, and contribution, so information_architecture=3. Install guidance includes platform commands, manual and Go installs, upgrade behavior, and checksum notes, so install_notes=3. Core names and terms are reasonably stable, but there is no API or compatibility policy, so naming_stability=2. The README contains several command examples and detailed feature explanations but no dedicated FAQ or extensive troubleshooting section, so examples_and_faq=2. Limitations cover estimated costs, thresholds fitted on one history, supported agents, Git count discrepancies, and early status, so known_limitations=3. The repository contains the MIT license text, so license=3. SECURITY says there are no releases yet and fixes land on main; there is no changelog or explicit supported-version table, so versioning_changelog=1. Contribution guidance, issue/PR invitations, and a security reporting path provide maintenance entry points, but maintainer responsibility is not clearly assigned, so maintenance_responsibility=2.
The visual interface, records linked to original prompts, task-level pricing, and text/JSON exports support inspection and reuse, so output_usability=3. The tool turns scattered sessions into tasks, sittings, file activity, and costs, and explains the granularity gap in existing usage tools, demonstrating a clear added use, so marginal_value=3. A single binary, small dependency set, and local processing help keep operating costs low, but results depend on history formats and thresholds fitted to one person's data, so cost_benefit=2.
The docs point to in-repository format and tuning notes and explain differences between Git commits and agent records; many functional and security claims nevertheless rely primarily on the README, so claim_traceability=2. The README, SECURITY file, module manifest, and CI provide some corroboration on boundaries and design, but no independent audit results are supplied and CI files are configuration evidence only, so cross_source_corroboration=2. The docs distinguish agent records from surviving Git commits, estimated rates from actual bills, and fitted thresholds from established facts, handling fact/inference boundaries thoroughly, so fact_inference_separation=3.
- Costs use published API rates and are estimates, not bills; subscriptions, models without published rates, and request-size pricing may not be represented accurately.
- The tool reads and displays full prompts and local agent history. Make sure those records are appropriate to view in a local browser and handle histories that may contain sensitive information carefully.
- Task-grouping thresholds were fitted to one developer's history. The README says Codex and Pi support has had less exposure and their numbers deserve extra scrutiny.
FAQ
Is the displayed cost what I was billed?
Does it upload session history or repository contents?
names.json in Bough's own settings directory.Which coding assistants can it read?
--agent=claude, --agent=codex, --agent=pi, or --agent=all.Will it still work if a project moved or is not a Git repository?
--no-repo also disables repository reading.