Token Audit#
Analyze your OpenClaw workspace token consumption and costs across multiple models.
Usage#
Scan your workspace#
bash
python3 scripts/token-audit.py
Scan a specific path#
bash
python3 scripts/token-audit.py --workspace /path/to/workspace
JSON output#
bash
python3 scripts/token-audit.py --json
What It Finds#
- Total token count per model (GPT-4, Claude 3, Gemini, Llama 3, Mistral, Qwen)
- Per-file token breakdown sorted by size
- Estimated costs per model at current pricing
- Files that are disproportionately large vs their utility
- Optimization recommendations
Part of Caelguard#
Free, open-source agent security toolkit. See also: shellguard-scanner