Commit 1122431
committed
feat(cli): add stats compare and export subcommands
- Restructure stats command to support subcommands:
- 'dev stats' or 'dev stats show' - Show current stats (default)
- 'dev stats compare <before> <after>' - Compare two stat snapshots
- 'dev stats export [--format json|csv|markdown]' - Export stats
Features:
- Compare shows overall changes, trend analysis, and per-language/component diffs
- Export supports JSON, CSV, and Markdown table formats
- Rich visual comparison with color-coded changes and percentages
- Helper function for human-readable duration formatting
Benefits:
- Users can track codebase evolution over time
- Dashboard-ready data export for visualization
- Clean CLI UX with consistent formatting
- Maintains backward compatibility (stats show is default)
All 736 tests passing (including updated CLI structure tests).1 parent 63a2d36 commit 1122431
2 files changed
Lines changed: 317 additions & 68 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
| |||
0 commit comments