Skip to content

feat(cli): add stats command - #40

Open
yan-ad wants to merge 3 commits into
Blankeos:mainfrom
yan-ad:feat/stats-command
Open

feat(cli): add stats command#40
yan-ad wants to merge 3 commits into
Blankeos:mainfrom
yan-ad:feat/stats-command

Conversation

@yan-ad

@yan-ad yan-ad commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add crabcode stats with an OpenCode-compatible terminal layout
  • support --days, --tools, --models [N], and --project [PROJECT]
  • aggregate persisted sessions, messages, output tokens, cost, model usage, and tool calls
  • add CLI parsing, aggregation, formatting, and rendering tests

Validation

  • cargo fmt
  • focused unit and CLI parser tests
  • cargo check
  • manual crabcode stats output comparison against opencode stats

Notes

Crabcode currently does not persist input/cache token breakdowns or per-message model cost, so those fields remain zero until that data is recorded. Existing output token, session cost, model, and tool-call data are reported from SQLite.

image

@yan-ad
yan-ad marked this pull request as draft August 31, 2026 08:57
@yan-ad
yan-ad marked this pull request as ready for review August 31, 2026 09:34
@Blankeos

Copy link
Copy Markdown
Owner

super nice! thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants