You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: unify command surface in ccusage style (flags/ergonomics, not scope) #4
Part of #2 (umbrella). Layer-1 CLI is merged (#1): src/cli/analyzeSession.ts and src/cli/sessionInventory.ts each carry their own ad-hoc flag grammar. This issue aligns the command surface with ccusage conventions so both tools feel like one CLI — without importing ccusage's scope.
Scope boundary (hard)
ccusage = macro usage aggregates (daily/weekly/monthly/blocks) across many agent sources, statusline.
claude-devtools = deep per-session audit of Claude Code sessions (ledger, waste findings, subagents, inventory).
Do not add: daily/monthly/blocks aggregates, multi-agent sources, statusline hooks, pricing-sync network logic. Complementary tools, zero feature mixing.
What to do
Unified flag grammar across both commands, matching ccusage semantics:
--json — already present in both; keep as the single machine-readable mode
Shared arg parsing + help/exit-code/table conventions so both commands behave identically (small shared module under src/cli/, no new dependencies). Keep script names analyze:session / analyze:sessions stable — issue [FEAT] Layer 2: package the CLI as a Claude Code plugin (marketplace + plugin.json + skills) #3's skills reference them; a unified analyze entrypoint is optional only if it is near-zero extra code.
README section for the CLI: usage, examples, and explicit positioning vs ccusage (one paragraph, the boundary above).
Tests: extend test/main/cli/analyzeSession.test.ts, add coverage for inventory flags (test/main/cli/sessionInventory.test.ts).
README documents both commands + ccusage positioning
pnpm typecheck && pnpm lint && pnpm test green; no app-build changes; existing pnpm analyze:* invocations keep working
Implementation
Use the ponytail skill (/ponytail): shortest working diff, no new dependencies, no speculative abstractions — shared parser only if it measurably removes duplication.
Part of #2 (umbrella). Layer-1 CLI is merged (#1):
src/cli/analyzeSession.tsandsrc/cli/sessionInventory.tseach carry their own ad-hoc flag grammar. This issue aligns the command surface with ccusage conventions so both tools feel like one CLI — without importing ccusage's scope.Scope boundary (hard)
What to do
--json— already present in both; keep as the single machine-readable mode--breakdown— per-model token/cost breakdown (new)--since/--until— date-range filtering (new; applies toanalyze:sessionslist andanalyze:sessionturn filtering)--last N— relative shortcut for--since(new)--no-cost— hide cost columns / JSON cost fields (new)--project,--min-minutes,--sort,--limit,--subagent-min-minutessrc/cli/, no new dependencies). Keep script namesanalyze:session/analyze:sessionsstable — issue [FEAT] Layer 2: package the CLI as a Claude Code plugin (marketplace + plugin.json + skills) #3's skills reference them; a unifiedanalyzeentrypoint is optional only if it is near-zero extra code.test/main/cli/analyzeSession.test.ts, add coverage for inventory flags (test/main/cli/sessionInventory.test.ts).Files
src/cli/analyzeSession.ts,src/cli/sessionInventory.tssrc/cli/args.ts(or similar shared parser) only if it removes duplicationtest/main/cli/analyzeSession.test.ts,test/main/cli/sessionInventory.test.tsREADME.mdAcceptance criteria
pnpm analyze:session --help/pnpm analyze:sessions --helpconsistent (usage, exit codes, table rendering)pnpm typecheck && pnpm lint && pnpm testgreen; no app-build changes; existingpnpm analyze:*invocations keep workingImplementation
Use the ponytail skill (
/ponytail): shortest working diff, no new dependencies, no speculative abstractions — shared parser only if it measurably removes duplication.Оценка