/ashlr-savings
Show estimated tokens and cost saved by the ashlr-plugin this session and lifetime.
When to use
Any time you want to see the ledger, for example at the end of a session. The status line shows a live counter; this command shows the full breakdown.
What it does
Calls the ashlr__savings MCP tool and shows its report verbatim in a code block. The report is built from ~/.ashlr/stats.json, ~/.ashlr/session-log.jsonl and ~/.ashlr/calibration.json, and covers:
- Session age and the pricing model in use
- This session next to all-time: calls, tokens saved, estimated cost
- A today-vs-yesterday line, when the difference is worth noting
- Per-tool breakdown for the current session
- The last 7 days as bars, and a last-30-days summary with the best day
- Top projects by call count, from the session log
- The best day compared with your recent daily average
- Top opportunities, such as initializing the genome when you grep often without one
- Calibration state of the grep baseline
- Upgrade nudge counts, once the nudge has been shown at least once
Each run also bumps a weekly counter (savings_invocations_by_week) in stats.json.
Output
Rendered from a small sample stats file, with NO_COLOR=1:
The real report opens with a small ashlr wordmark above the first line.
Savings methodology
Token counts are estimated at about 4 bytes per token unless API-measured counts are available; see How session savings are counted. A genome-routed ashlr__grep call is credited against an estimate of the raw ripgrep output it replaced: 4× its own output by default, or the measured ratio in ~/.ashlr/calibration.json once you run bun run scripts/calibrate-grep.ts from the plugin directory. Cost uses the input price of ASHLR_PRICING_MODEL, then CLAUDE_CODE_MODEL, then sonnet-4.6 ($2.50 per million tokens); see Environment variables. See Stats schema for how the counters are stored.
"Why are my savings lower than the headline?"
A session can show small absolute savings even when every tool is wired correctly, usually because the work was small-file edits, ops-heavy Bash, or sub-agent driven. See How session savings are counted for what counts and what doesn't.
Related
/ashlr-dashboard: multi-panel view with sparklines and a projection- How session savings are counted: what does and doesn't credit your ledger
- Stats schema: on-disk format of
~/.ashlr/stats.json