Workflow profile cards for CLI coding agents. Local, private by default.
Most usage tools answer "how much did I spend?". cli-agent-stats answers "how do I work with AI agents?": which MCP servers, skills, plugins, and tools you reach for, and when you work. It writes SVG cards, JSON, and Markdown that you commit to your GitHub profile yourself.
Example cards rendered from fake data.
- Workflow, not spend. Shares of MCP servers, skills, plugins, and tools, plus an hour-by-weekday heatmap. No tokens, no cost.
- Nothing leaves your machine. No service, no account, no telemetry, no network calls. You decide what to commit.
- Hide what is not yours to share. Strip and rename internal names, and a deny list fails the run before an employer or client name reaches any output.
- One static binary. Linux, macOS, Windows; amd64 and arm64.
Supported agents: Claude Code. Codex CLI and Gemini CLI are planned; see CONTRIBUTING.md to add one.
Download a binary from Releases, or:
go install github.com/michaelact/cli-agent-stats/cmd/cli-agent-stats@latestcli-agent-stats render --out assets/ai --format svg,json,markdownThen add the cards to your profile README:
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/ai/overview-dark.svg">
<img alt="How I work with AI" src="assets/ai/overview-light.svg">
</picture>To publish a refresh:
cli-agent-stats render --out assets/ai --check README.md \
&& git add assets/ai && git commit -m "chore: sync agent stats" && git pushcli-agent-stats render --out DIR [--format svg,json,markdown] [--config PATH] [--check FILE]...
cli-agent-stats version
| Flag | Default | Meaning |
|---|---|---|
--out |
required | Output directory |
--format |
svg |
Any of svg, json, markdown, comma-separated |
--config |
~/.config/cli-agent-stats/config.yaml |
Config file. When given explicitly, it must exist. |
--check |
none | Extra file to scan for deny terms, e.g. your README. Repeatable. |
Exit codes: 0 success, 1 error or deny hit, 2 usage error.
| Format | Files |
|---|---|
svg |
overview, toolbox, rhythm, each as -dark.svg and -light.svg |
json |
profile.json (schema 1): window, overview, shares per group, 7×24 heatmap scaled 0–1 |
markdown |
profile.md: the same content as tables and a text heatmap |
Every output shows percentages, never raw counts. Re-running on unchanged data produces identical files.
Optional. See examples/config.example.yaml.
timezone: Europe/Berlin
window_days: 90
top_n: 6
scrub:
strip_prefixes: ["contoso-"]
rename: {"incident-report-contoso": "incident-report"}
deny: ["contoso"]Unknown keys are errors, so a typo cannot silently disable deny.
- cli-agent-stats only reads local agent files (for Claude Code:
~/.claude). It never makes network calls. - It stores daily counters (names and counts, no prompts, no file paths) in
~/.local/share/cli-agent-stats/ledger.json. - Names are scrubbed when drawing, so rule changes apply to all history.
- The deny check runs twice: on every name before drawing (so clipped or escaped names cannot slip through), and on every written file plus
--checkfiles.
Why does my history stop after 30 days? Claude Code deletes transcripts older than cleanupPeriodDays (default 30) in ~/.claude/settings.json. cli-agent-stats keeps every day it has seen in its ledger, so run it at least that often, or raise cleanupPeriodDays.
Why don't the numbers match ccusage? cli-agent-stats counts tool calls, skills, and sessions, not tokens or cost. The two tools answer different questions and work well side by side: ccusage tells you what you spent, cli-agent-stats tells you how you work. ccusage keeps its reports focused on tokens and cost and has chosen not to add tool, MCP, plugin, or skill breakdowns (#688, #1692); that is the gap cli-agent-stats fills.