banish.shdocs
HomeGitHub
Getting started / Quick start
View as Markdown

Quick start

banish sits between your agent's Bash tool and the shell. It runs the real command, strips the noise from the output, and returns a compact version. Here is the whole loop in three commands.

1. Wire it into your agent

banish init claude-code

This adds the PreToolUse hook that rewrites shell commands to run through banish. For other agents, see set up an agent.

2. Run a command

Run anything your agent already runs. The same git status, before and after:

git status raw: 176 tokens
-----------------------------------
On branch main
Your branch is up to date with 'origin/main'.
 
Changes not staged for commit:
modified: cmd/banish/gain.go
modified: internal/runtime/fallback.go
...
 
git status via banish: 12 tokens (93% saved)
-----------------------------------
main
modified: cmd/banish/gain.go
modified: internal/runtime/fallback.go

3. Watch the savings add up

banish gain

banish keeps a running total across sessions. Run banish gain any time to see how many tokens it has saved you.

If a filter ever fails, banish returns the raw output and records zero savings for that run. A broken filter can never lose your data. And when a filter compacts a large output, the result ends with an audit footer - banish raw <hash> brings the original back byte for byte.

Quick start - cut token usage on your first command - banish