-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
pkg:clipackages/cli - commandspackages/cli - commands
Description
Branch: feat/cli-rich-stats
Priority: Highest
Parent Epic: #145
Type: Story
Dependencies: #146 (Data Collection Infrastructure)
Description
Enhance the dev stats command to display rich, formatted statistics in the terminal. Replace plain text output with tables, colors, and organized sections. Add language breakdown, component type counts, and package-level insights for monorepos.
This provides immediate value to users without requiring a web browser.
Acceptance Criteria
-
dev statsdisplays language breakdown in a formatted table - Component type counts shown with visual formatting
- Package-level stats displayed for monorepos (auto-detected)
- Health indicators use colors (green/yellow/red)
- Tables use appropriate column widths and alignment
- Optional
--format jsonflag maintains JSON output - New
dev dashboardcommand as alias for enhanced stats - Output is readable on various terminal widths (min 80 cols)
- Help text updated with new features
Technical Requirements
Dependencies:
{
"cli-table3": "^0.6.3",
"chalk": "^5.3.0",
"terminal-size": "^4.0.0"
}Output Sections:
- Overview (files, components, vectors, last scan)
- Languages (formatted table with files, components, LOC)
- Component Types (formatted table)
- Packages (if monorepo detected)
- Health (color-coded indicators)
Monorepo Detection:
- Check for
package.jsonwithworkspacesfield - Check for
pnpm-workspace.yaml - Check for
lerna.json
Testing:
- Unit tests for formatting functions
- Integration tests with real indexer output
- Snapshot tests for output format
- Test on various terminal widths
Files to Create:
packages/cli/src/commands/dashboard.tspackages/cli/src/utils/formatters.tspackages/cli/src/utils/__tests__/formatters.test.ts
Files to Modify:
packages/cli/src/commands/stats.tspackages/cli/src/index.tspackages/cli/package.json
Metadata
Metadata
Assignees
Labels
pkg:clipackages/cli - commandspackages/cli - commands