banish.shdocs
HomeGitHub
Reference / Methodology
View as Markdown

Methodology

Every savings figure on this site comes from real command output run through banish, counted with the same tokenizer your agent uses. This page explains how the numbers are produced and how to reproduce them.

How tokens are counted

banish counts tokens on both the raw command output and the compacted output, then reports the difference. Counting uses the tokenizer that matches your agent, so a token here is the same unit your agent is billed for.

  • Raw output is captured exactly as the command prints it, including trailing whitespace.
  • Compacted output is the text banish returns after the matching filter runs.
  • If a filter fails, banish returns the raw output and records zero savings for that run.

banish never estimates. If a number appears on this page, it was measured on a real command. Run banish gain to see the same measurement on your own machine.

The test commands

The figures below come from a fixed set of commands in a sample repository. Token counts vary with repository state, so treat these as representative, not guaranteed.

CommandRawCompactedSaved
git status (clean)40392 percent
git diff --stat127298 percent
npm install200598 percent
cargo build (ok)150497 percent
git status (clean)
40 tokens
3 tokens, 93 percent
git diff --stat
127 tokens
2 tokens, 98 percent
npm install
200 tokens
5 tokens, 98 percent
cargo build (ok)
150 tokens
4 tokens, 97 percent

Reproduce the numbers

For the full per-command table across 43 fixtures, see the benchmarks page, or reproduce it directly with banish bench. To measure your own workload instead, install banish, route a few commands through it, and read the cumulative report. The counter persists across sessions.

$ banish init claude-code
$ git status
$ npm install
$ banish gain
Tokens saved: 405
Commands routed: 2
Avg compaction: 73 percent
Benchmark methodology - how banish token savings are measured - banish