?: one command, explained first, which needs your approval
??: every way to do it, explained, so you can choose one, ask again or cancel
?x: injected at your prompt if every check passes
Contents
Why
You often know what you want ("restart the web container", "show what is using my disk space") but not the exact flags on this machine, such as BSD or GNU options, or ss or lsof. A chat window can give you the answer, but you then paste it into a shell without checking it.
This is not safe with small local models. In testing they wrote rm -rf ~/*, printed SSH keys and piped unknown scripts into a shell. The results are public. termite therefore treats every model as untrusted:
- Local by default. Your requests, folders and commands go to model servers on your own
machine (llama.cpp, Ollama, LM Studio). If you set a model or decision URL to another machine, they go there instead, with any decision token. Only do this with a server you trust.
- Checked. Every suggested command passes through tested Rust code before you see it.
- Never run. termite stops at your prompt, and only you can press Enter.
- Rated. Every command is marked in words and colour, and risky commands turn red whatever the model says.
What termite does
termite sits between a model and your shell, and catches a bad command before it runs. It does four things:
| What it does | How you use it |
|---|
| Ask | A local model writes the command or script for a job you describe | ?, ??, ?x, ?b |
| Check | Fixed rules rate any command or script, with no model | tmite check, or pipe text into tmite |
| Gate | Six levels decide what happens to a command. You decide for yourself. An agent is stopped at any known hazard, and anything else goes through | Always on |
| Test | Rates how models behave with dangerous requests, in a sandbox | The results |
Install
termite is at an early stage. You can download a signed release for macOS or Linux, or build it yourself with Rust 1.87 or newer:
cargo install --locked --git https://github.com/tanepiper/termite termite
You also need:
| What | Why | Options |
|---|
| A chat model server | writes the candidate commands | llama.cpp llama-server, Ollama, LM Studio, any OpenAI-compatible /v1/chat/completions |
| A decision model | ranks the candidates and judges ?x safety | a model served on /v1/systemone: llama.cpp, or Ollama 0.40+; for example Kev-4B or termite-decide-0.8b |
| zsh, bash 4+ or fish (optional) | the ? prompt widget saves copying. tmite does the same work in any shell | |