SuperAPIAI Directory

bough

github.com · AI developer platforms

bough is a locally running command-line tool for reading session history from Claude Code, OpenAI Codex CLI, and Pi, visualizing your work, and estimating costs. It runs as a single Go binary, sends no data, supports viewing the hierarchy of projects, tasks, and prompts in a browser, and calculates the cost of each task according to public API rates.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

bough is an open-source tool designed to answer the question "What did you build, and how much did each part cost?" It reads session records from Claude Code, OpenAI Codex CLI, and Pi, reconstructs the structure of your work, and estimates costs according to public API rates. All processing happens locally; no data is sent and no models are called.

Purpose

bough focuses on analyzing AI coding assistant session history, organizing scattered session records into understandable units of work and calculating the cost of each unit. Unlike simple statistics tools (such as Claude Code's built-in /stats), it digs deeper into the work content itself.

Main capabilities

  • Read session history: Automatically discover and read session records from Claude Code, OpenAI Codex CLI, and Pi.
  • Reconstruct work structure: Divide history records into three levels: prompts (each prompt you enter), tasks (a unit of work composed of a series of related prompts), and sittings (a day or a period within a day).
  • Visualization: Open a local page in the browser (127.0.0.1) to graphically display projects, sittings, tasks, and prompts. Each task uses circle size to represent cost; hover to view details.
  • Cost estimation: Calculate the cost of each task and project according to public API rates, displayed in tokens and dollars. Supports filtering by cost or token count.
  • Git integration: Read Git history under the project path and associate tasks with commits (read-only, no writes).
  • Text and JSON output: Supports --text to output an indented list and --json to output structured data for further processing.
  • Project renaming: Custom names can be set for projects and saved in the local settings folder.

Usage

Installation: Can be installed via script (Linux or macOS), or using Homebrew (brew install nickelsec/tap/bough), or using Go (go install github.com/nickelsec/bough@latest), or built yourself.

Run: Run the bough command directly; it automatically discovers history records, starts a local server, and opens the page in the browser. Use --text or --json to get text output. UseUse --no-repo to disable Git reading. Use --rename to rename a project.

Use cases

  • Developers want to understand their time investment and cost distribution in AI-assisted programming.
  • Need to review project progress and identify which tasks cost more.
  • Want to turn AI session history into analyzable data.

Limitations

  • Currently only supports Claude Code, OpenAI Codex CLI, and Pi; other agents are not yet supported.
  • Cost estimates are based on public rates, not actual bills; actual spending for subscription users may differ.
  • The thresholds for dividing tasks and sittings are fitted based on a single developer's historical data and may not apply to everyone.
  • In an early stage; some features (such as the struggle score) are disabled by default.
  • Does not write to history or repositories, only reads; the only file written is names.json in the settings folder (when renaming).
  • Requires local session history files, and only supports Linux and macOS (Windows may run via WSL, but this is not explicitly stated).
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools