@thebuildshield/cli
v2.0.1
Published
TheBuildShield CLI - Analyze Claude Code session costs and token usage
Maintainers
Readme
@thebuildshield/cli
TheBuildShield CLI tool for analyzing Claude Code session costs.
Installation
npm install -g @thebuildshield/cliCommands
thebuildshield scan
Scan Claude Code sessions and display a cost breakdown by model.
thebuildshield scan
thebuildshield scan --path /custom/path/to/claude/projectsOutput:
┌──────────────────────┬────────┬────────┬─────────┐
│ Model │ Input │ Output │ Cost │
├──────────────────────┼────────┼────────┼─────────┤
│ claude-sonnet-4-6 │ 2.4M │ 890K │ $20.55 │
│ claude-opus-4-6 │ 1.1M │ 450K │ $16.75 │
├──────────────────────┼────────┼────────┼─────────┤
│ TOTAL │ 4.0M │ 1.54M │ $38.80 │
└──────────────────────┴────────┴────────┴─────────┘thebuildshield cost
Show a quick one-line cost summary for the current month.
thebuildshield costOutput:
March 2026: $38.80 across 3 modelsthebuildshield sync
Sync session data to ~/.thebuildshield/data.json for use with the browser extension.
thebuildshield syncDevelopment
cd packages/cli
npm install
npm run build
npm link # Install locally for testingSession Files
Claude Code stores session files at:
- macOS/Linux:
~/.claude/projects/*/sessions/*.jsonl - Windows:
%USERPROFILE%\.claude\projects\*\sessions\*.jsonl
Pricing
Uses Anthropic's official pricing per million tokens:
| Model | Input | Output | |-------|-------|--------| | Claude Opus 4 | $15.00 | $75.00 | | Claude Sonnet 4 | $3.00 | $15.00 | | Claude 3.5 Sonnet | $3.00 | $15.00 | | Claude 3.5 Haiku | $0.80 | $4.00 | | Claude 3 Haiku | $0.25 | $1.25 |
License
MIT
