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.1.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.1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentrecap-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 df2b6ac1a58f4e1fce73adcbf0fd9e0de6d109211b86769e5323887f07fa66dd
MD5 384b28fbe57980d8c1751b1573d9cbd6
BLAKE2b-256 797f7137939752b62ffd5df135f90878513e12e635dc757fcddafaf8ffafc0c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentrecap-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f188ebb685bf5bab59ac563d031f9978f123fbc095e4b6ac2d44dfdb4377abf
MD5 a3a6e242b4dde5b0734c42d4f26ed49a
BLAKE2b-256 c6192b922528a15d7f73127d01e64563b7d4942b48ce8b9c4fe28b16f3879bfb

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