codexmate icon indicating copy to clipboard operation
codexmate copied to clipboard

feat(analytics): export usage data as CSV or JSON

Open SurviveM opened this issue 6 months ago • 1 comments

Requirements

Export usage data (token consumption, session count, model breakdown) as CSV or JSON for external BI analysis or archival. Support filtering by date range and model type.

Verification

  1. Run /analytics export --format csv --from 2026-05-01 --to 2026-05-06
  2. Verify a CSV file is downloaded with correct columns (date, model, tokens, sessions)
  3. Import the CSV into a spreadsheet tool and verify all rows are present and correctly formatted
  4. Run /analytics export --format json and verify JSON structure matches the CSV data
  5. Verify the command handles empty data gracefully (empty file, no crash)

SurviveM avatar May 06 '26 14:05 SurviveM

This feature request has been reviewed and prioritized.

Assessment:

  • High value for power users and data analysis workflows
  • Implementation complexity: Low-Medium - export functionality exists in other modules
  • Dependencies: Analytics data collection (partially in place)

Proposed approach:

  • Add CSV/JSON export endpoint to analytics API
  • Support date range and model filtering
  • Include token consumption, session count, and model breakdown

Will be considered for next sprint planning.

ymkiux avatar May 17 '26 18:05 ymkiux