sprag-cli weekly downloads statistics
By rootstudioyaml · npm · Claude Code
Model-delegation router for Claude Code and Codex: lookups, checks and test runs go to cheaper models, documents go in as compact Markdown, and a live statusline shows spend and savings.
sprag-cli has 5,325 recorded weekly downloads on npm, ranking #1242 of 2,687 tracked listings.
About sprag-cli
A model-delegation router for Claude Code and Codex: lookups, checks and test runs go to cheaper models, and the savings show up in your statusline.
<a href="https://github.com/rootstudioyaml/sprag#teams"><img src="https://raw.githubusercontent.com/rootstudioyaml/sprag/main/docs/plan-pro-en.gif" width="640" alt="A virtual office where every teammate sits as an animal character, then the organization dashboard with spend, savings, seats and a 30-day chart, then team rules approved once and picked up by every machine."></a>
Sprag Pro · for teams: your whole team's AI spend and savings, on one screen.<br> <sub>A virtual office with a character for every teammate, a seat roster, and rules the team approves once. <a href="https://github.com/rootstudioyaml/sprag#teams">See the team features</a> · <a href="mailto:support@sprag.io">support@sprag.io</a></sub>
<a href="https://sprag.io/assets/video/sprag-compare-en.mp4"><img src="https://raw.githubusercontent.com/rootstudioyaml/sprag/main/docs/sprag-compare-en.gif" width="760" alt="Two terminals receive the same twelve requests. With Sprag, lookups and test runs go to cheaper models and documents go in as Markdown; the day ends at $1.83 against $6.68 without Sprag."></a>
Same 12 requests, two terminals: $6.68 → $1.83 (−72.6%) with Sprag.<br> <sub>Example requests priced at public list rates. <a href="https://sprag.io/assets/video/sprag-compare-en.mp4">Full video (41s)</a></sub>
</div>Sprag routes each piece of work to the cheapest model that has never got it
wrong. Claude Code and Codex cannot switch models per prompt, so Sprag does it
the one way that works: rules in the main session hand lookups, status checks,
build and test runs and batch edits to sub-agents pinned to a cheaper model. The
rules come from your own session logs, you approve each one, and every delegated
run writes its price difference to a ledger. npm i -g sprag-cli sets it all
up; nothing to configure per project.
Two more things ride along. Documents reach the context as compact Markdown (a 540k-token deck becomes 23k tokens), and the statusline shows what each session spent and saved, with a warning chip in front when the cache, the context or a rate limit needs attention.
The name is the sprag clutch: forward motion passes, backspin locks. Repeated failures in your logs become rules loaded at session start, so the agent keeps working and only the regressions get caught.
Session analysis runs locally on the logs Claude Code and Codex already write. No extra model calls or API key are needed for analysis. Optional Codex gateway budget and price lookups contact your configured LiteLLM endpoint using its existing credentials. The CLI requires Node.js 20+ and one TOML parser dependency.
npm i -g sprag-cli # Claude Code, plus Codex when it is installed
If your package manager skips install scripts (pnpm, bun), run sprag install once after installing. The old claude-token-saver package stopped updating at 3.55.0, so move to sprag-cli.
After you install
- Run
npm i -g sprag-cli. Hooks, the statusline and the starter rules are set up for every project; there is nothing to configure per project. If you already have a statusline, the install asks whether to show both, replace yours, or keep yours. - Open Claude Code in any project and work as usual.
- Watch the statusline. It shows what the session spent and saved, and a warning chip leads the line when the cache, the context or a rate limit needs attention:
🔀 Routing saved $188 | opus→sonnet ×67 $93.4 · fable→sonnet ×26 $83.7 · opus→haiku ×25 $7.41 · fable→haiku ×6 $3.73
🧠 Cache hit 98.8% · ⏳ Cache expires 59:46 · 📦 Ctx 47% of 1M

Sprag never swaps the model you picked. Analysis reads your local session
logs only, with no extra model calls and no API key. sprag uninstall removes
everything it added and restores a statusline it merged with.
Using Codex? See Codex below.
How it works…
Description from the npm listing.
- claude-code
- claude
- anthropic
- codex
- token-usage
- token-saver
- reduce-tokens
- cost-savings
- claude-code-cost
- claude-code-statusline
- statusline
- model-routing
- model-router
- model-delegation
- llm-router
- claude-code-router
- subagent
- prompt-caching
- haiku
- cli
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (1)Similar npm Claude Code plugins
All 20 sprag-cli alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/sprag-cli. First seen Oct 30, 2026; last successful collection Oct 30, 2026. See the methodology.