Skip to content

Add --json flag to vfs stats command #37

Description

@fuleinist

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions