What problem does it solve?
Provides a quick, scriptable way to extract and summarize per-model cost usage from CodexBar local cost logs so users can identify which models drive spending and view recent model-specific costs.
Core Features & Use Cases
- Per-model cost aggregation: Aggregates modelBreakdowns across daily rows to compute total cost per model.
- Current vs. all models: Detects the current (most recent/highest-cost) model or produces a full model breakdown across the dataset.
- Flexible input sources: Accepts codexbar CLI output, a JSON file path, or JSON via stdin and outputs human-readable text or structured JSON for scripting.
- Use case: Useful for developers and cost-ops engineers checking which Codex or Claude models are incurring the most local cost during audits or monthly reporting.
Quick Start
Run the model-usage script to summarize Codex or Claude cost data by invoking codexbar cost and feeding the JSON output to the script or by passing a saved codexbar cost JSON file.