Claude Introspective Analysis — token usage, cost, and environmental impact for Claude Code, from your own local session logs. Plus a containerized dev environment and a git hook that tags every commit with the coding agent that produced it.
uv tool install . # or: cp claudia.py /usr/local/bin/claudia
claudia # per-project summary of turns, tokens, cost
claudia --by week --env # weekly view with estimated energy/water/carbon
claudia index # agent-agnostic session token ledger (Claude + OpenCode)- Offline-first — reads
~/.claude/projects/**/*.jsonl(and OpenCode's SQLite database forclaudia index); no telemetry. Only--verifyand thehaikuclassifier touch the network, and only with an explicit API key. - Stdlib-only, single file — runs on
/usr/bin/python3, no dependencies.
Start with the docs index:
| Doc | Covers |
|---|---|
| installation.md | Installing the CLI, container env, git hook |
| usage.md | Every command, filters, env-var overrides |
| container-env.md | Containerized Claude Code + OpenCode environment |
| agent-tagging.md | Coding-Agent: and Model: commit trailers |
| troubleshooting.md | Common problems and fixes |
| filing-issues.md | Filing issues + contributor workflow |
claudia # summary report
claudia --since 2026-07-01 --by week # weekly totals since July
claudia --env --cost # impact + cost breakdown
claudia --snapshot && claudia --install-cron # keep daily snapshots
# container dev environment
cd containerconf && ./setup.sh && ./build.sh && ./run-daily.sh
# tag commits with their producing agent
claudia --install-git-hook- stdlib-only, single file —
claudia.pyruns on the system Python with no third-party dependencies. - No auth by default — core reporting reads local files only.
- Estimates are estimates — cost/energy/water/carbon derive from published prices and hardware benchmarks (ADR-002); guidance, not billing.
Read CLAUDE.md for conventions and filing-issues.md for the ADR → Issue → Todo → branch → PR workflow. Tests:
python3 -m unittest tests.test_claudia