Problem
The vfs stats command only outputs human-readable text, making it difficult to use in scripts, CI/CD pipelines, or automation tools.
Solution
Add a --json flag that outputs the lifetime statistics in JSON format:
- Invocations count
- Total tokens saved
- Total raw/vfs bytes and lines
- Average reduction percentage
- First/last recorded timestamps
Use Case
Users tracking token savings over time in dashboards, CI reports, or automation scripts could easily parse the output programmatically.
Example:
vfs stats --json
{
"invocations": 42,
"total_tokens_saved": 125000,
"total_raw_bytes": 1048576,
"total_vfs_bytes": 15360,
"avg_reduction_pct": 85.3,
"first_recorded": "2026-03-15T10:30:00Z",
"last_recorded": "2026-03-21T14:22:00Z"
}
Problem
The
vfs statscommand only outputs human-readable text, making it difficult to use in scripts, CI/CD pipelines, or automation tools.Solution
Add a
--jsonflag that outputs the lifetime statistics in JSON format:Use Case
Users tracking token savings over time in dashboards, CI reports, or automation scripts could easily parse the output programmatically.
Example:
vfs stats --json { "invocations": 42, "total_tokens_saved": 125000, "total_raw_bytes": 1048576, "total_vfs_bytes": 15360, "avg_reduction_pct": 85.3, "first_recorded": "2026-03-15T10:30:00Z", "last_recorded": "2026-03-21T14:22:00Z" }