Description
burn0 currently outputs cost data in a human-readable format to the terminal. It would be great to have a --json flag for npx burn0 report that outputs structured JSON, making it easy to integrate with CI/CD pipelines, dashboards, or custom tooling.
Expected behavior
Should output something like:
{
"total": 4.32,
"calls": 47,
"services": {
"openai": { "cost": 3.80, "calls": 35 },
"anthropic": { "cost": 0.52, "calls": 12 }
},
"period": "today"
}
Implementation hints
- The report command likely lives in
src/ — find the current report formatter
-
- Add a
--json CLI flag that switches the output formatter
-
-
- Reuse existing cost aggregation logic, just serialize as JSON instead of formatted text
-
-
-
- Add a test that verifies JSON output is valid and contains expected fields
This is a good first issue because
- Clear input/output specification
-
- Doesn't require understanding the core cost-tracking internals
-
-
- Great way to learn the CLI architecture
Description
burn0 currently outputs cost data in a human-readable format to the terminal. It would be great to have a
--jsonflag fornpx burn0 reportthat outputs structured JSON, making it easy to integrate with CI/CD pipelines, dashboards, or custom tooling.Expected behavior
Should output something like:
{ "total": 4.32, "calls": 47, "services": { "openai": { "cost": 3.80, "calls": 35 }, "anthropic": { "cost": 0.52, "calls": 12 } }, "period": "today" }Implementation hints
src/— find the current report formatter--jsonCLI flag that switches the output formatterThis is a good first issue because