Skip to content

Add JSON output format for gitintel stats #19

Description

@arunroyjhs

Summary

gitintel stats currently outputs human-readable tables. Adding a --format json flag would enable piping output to jq, dashboards, CI/CD pipelines, and other tooling.

What needs to happen

  1. Add a --format flag to the stats subcommand (default: table, options: json, csv)
  2. Structure the JSON output to include all current stats fields
  3. Ensure backward compatibility — default output unchanged
  4. Add integration tests for JSON output parsing

Example output

{
  "summary": {
    "total_commits": 234,
    "ai_commits": 47,
    "ai_percentage": 20.1,
    "agents": {
      "claude-code": 31,
      "cursor": 12,
      "copilot": 4
    }
  },
  "period": "30d",
  "scanned_at": "2026-03-29T12:00:00Z"
}

Good first issue because

  • Isolated to the output formatting layer
  • Rust's serde_json makes this straightforward
  • Doesn't touch core scanning logic

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions