banish.shdocs
HomeGitHub
Reference / Built-in filters
View as Markdown

Built-in filters

banish ships with filters for the commands agents run all day. They are plain .bsh files embedded into the binary at build time, one per ecosystem.

What ships

EcosystemCommands compacted
gitstatus, diff, log, branch
dockerps, build, images, compose
kubectlget, describe, logs
nodenpm, yarn, pnpm install and run
rustcargo build, test, check
gogo build, test, vet
javamaven and gradle builds
pythonpytest, pip
cloudaws, terraform

Each filter targets the noisy, predictable output these tools print and returns just the part the model needs. For worked examples with before-and-after token counts, see the per-command guides: git, cargo, npm, kubectl, and go test.

Directive reference

A .bsh file is a list of directives. These are the ones you will use most:

DirectivePurpose
!extensionNames and versions an extension file.
!verbDeclares a command shortcut.
!argsNames the parameters a verb accepts.
!expandThe command a verb expands into.
!helpDescription shown to the agent.
!filterDeclares an output filter.
!matchSubstring that selects which commands the filter handles.
!compactShell one-liner that strips the noise from stdout.
!configOpens a block of runtime options.
!timeoutMaximum time a command may run.
!outputOutput format, for example json.

Add your own

Create a file in ~/.banish/ext:

!extension mytools v:1.0
 
!filter docker-build
!match docker build
!compact "grep -v '^Sending build' | grep -v '^---> ' | tail -20"

Save it and the filter is live. A new filter is about ten lines, which is why it is the most common first contribution. If a filter fails, banish falls back to raw output, so a work-in-progress filter never breaks anyone.

Built-in filters - compact git, npm, cargo, docker, kubectl output - banish