testsAndMisc/python_pkg/token_audit/__init__.py
Krzysztof kuhy Rudnicki f7e8c59e8f
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Add token_audit package: per-session token attribution and reporting
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 22:20:44 +02:00

21 lines
633 B
Python

"""Measure what Claude Code sessions actually cost, from local transcripts.
Deterministic analysis with no model in the loop: the CLI parses
``~/.claude/projects/*/*.jsonl`` and ranks spend by project, tool, MCP server,
skill, subagent and session shape. Running the audit therefore costs nothing,
which is the point — an LLM summarising its own token usage would be the
expense it is trying to measure.
Usage::
python3 -m token_audit # rolling 7 days
python3 -m token_audit --days 30
python3 -m token_audit --json
"""
from __future__ import annotations
__all__ = ["__version__"]
__version__ = "0.1.0"