Skip to main content

Simple tool to analyze your local Claude Code and Codex sessions

Project description

agentrecap

Generate a local, metadata-only HTML report from your Codex and Claude Code sessions.

uvx agentrecap
# or
pipx run agentrecap

By default, agentrecap reads active and archived sessions from ~/.codex and Claude Code sessions from ~/.claude/projects, then writes the report to ~/.agentrecap/reports/<timestamp>/index.html. When it finishes, it asks whether you want to open the report in your browser. Use --open to open it immediately without the prompt.

agentrecap \
  --codex-input /path/to/codex/home \
  --claude-input /path/to/claude/projects \
  --output-dir /path/to/report \
  --title "My agent usage report"

The report includes:

  • Headline recent, month-to-date, and all-time estimated API costs alongside usage metrics.
  • Codex and Claude comparisons.
  • Model usage, cache ratios, reasoning-token metrics, and monthly estimated API costs.
  • Run-duration, response-gap, thread-length, token, cache, and tool-call charts.
  • Human-readable, metadata-only CSV files under the report's data/ directory.

The generated report does not include transcript contents. Thread, run, event, agent, and tool-call identifiers are hashed before they are written.

The report's data/threads.csv is the complete metadata-only event export used to generate every analysis table. It is retained unchanged so it can be shared as a single portable input; the one-row-per-thread aggregate is written separately as data/thread_summary.csv.

Cost estimates

For cost estimation, agentrecap uses the pricing catalog from models.dev

Costs use standard API rates per million tokens for uncached input, cache reads, five-minute and one-hour cache writes, output, and separately priced reasoning when available. They do not include subscriptions, discounts, batch pricing, or long-context tiers. Unknown model IDs remain unmatched instead of receiving a guessed price.

Development

The project requires Python 3.10 or newer and uses uv for dependency and environment management.

uv sync
uv run agentrecap --help

To generate a report from local session data while developing:

uv run agentrecap --output-dir ./report

Build the source distribution and wheel with:

uv build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentrecap-0.2.0.tar.gz (106.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentrecap-0.2.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file agentrecap-0.2.0.tar.gz.

File metadata

  • Download URL: agentrecap-0.2.0.tar.gz
  • Upload date:
  • Size: 106.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for agentrecap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 88c1707f94af99308ad9925a11aff6887e6d2c21e27ba6cdef0a860d999aaeba
MD5 09ebeb177bf6b734fb1c30b20cba5bb8
BLAKE2b-256 16e637746bb3ed818a391be617630e2a990c7870006d0e36e589260ffc072679

See more details on using hashes here.

File details

Details for the file agentrecap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentrecap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for agentrecap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f0a22f19425bf3054e3d46602dd2ed06fb5e22f27d5344986addf78a354e81f
MD5 798c5a6ed7ee85a658a2a4544d0f19d3
BLAKE2b-256 1ea1d50d9917bf9145eb649d91209b34064760792910be84a9dbde8103de8097

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page