🛡 Termaxa
日本語
A gate between an AI coding agent and your shell. Before a command runs, Termaxa shows what it would destroy, takes a backup it can restore, and asks or refuses by a policy you can read. For people running Claude Code, Codex, Cursor, Copilot CLI or Hermes Agent, alone or unattended.
Try it in ten seconds: play.termaxa.com runs the real gate on a throwaway project. Install: brew install termaxa/tap/termaxa or cargo install termaxa.
A real Claude Code session, approvals off: the inspection runs, the rm -rf is stopped with its reason and its blast radius, and the agent declines to route around it. Recorded on Claude Code 2.1.283.

The problem
A coding agent runs shell commands on its own, and the damage rarely comes from a clever attack. It comes from an ordinary chore done with the most forceful spelling available: rm -rf for a cleanup, --force for a push, reset --hard for an undo. Your choices have been to supervise every command, which defeats the point of an agent, or to trust it blindly, which works until it doesn't.
It isn't a rare failure. Measured in October 2026 across 36 models: asked to "undo my last commit", 19 of them ran git reset --hard and destroyed uncommitted work in a file nobody had mentioned (the benchmark, the write-up).
What Termaxa does
Termaxa is a single Rust binary that sits in the agent's hook path, with no model, no service and no account. For every command:
- Decides by a policy in your repository: allow, ask or deny. First matching rule wins; unmatched commands ask.
- Previews the consequence, not the text: the files a delete takes, the commit a force push loses, the rows a
DROP removes, the uncommitted edits a reset --hard discards.
- Insures before anything runs: copies the files, pins the ref, dumps the table, snapshots the edits, so
termaxa rollback can undo it.
- Escalates an agent that keeps trying: a circuit breaker counts destructive intent across spellings and shells, and trips.
- Records every decision in an append-only, hash-chained log: in the default mode the chain shows corruption and casual edits, and in supervised mode the agent cannot reach the log at all.
$ termaxa check "rm -rf ./scratch"
command rm -rf ./scratch
decision deny
rule *rm -rf*
reason Recursive force delete blocked by default policy.
context destructive flag detected: -rf ⚠
delete impact
target : /home/dev/proj/scratch
contains : 12 files across 1 directory
insurance : copy 1 path(s) to .termaxa/backups before deletion (automatic on run/hook)
Every console sample on this page was captured from the binary on a fixture. Paths are shortened, and the doctor and report outputs are abridged.
Why not the prompt you already have?
The agent's own prompt shows you the command. Termaxa shows you what the command would do, and stops the dangerous few even when nobody is watching the prompt. The recording above is a session with the agent's approvals switched off.
A sandbox contains what a command can reach. Termaxa judges what a command would destroy inside the reach you gave it: a sandbox that includes your repository lets rm -rf ./src through. They're complementary; use both when you need hard guarantees.
A policy engine (OPA and friends) evaluates a string against rules. Termaxa adds the three things a string doesn't carry: the consequence, the backup, and the record. The policy is still a file in your repo, reviewable in a pull request.
Quick start
The order that works: judge your past, observe your present, then enforce.
1. Install.
brew install termaxa/tap/termaxa # macOS / Linux (prebuilt, sha256-pinned)
cargo install termaxa # any OS, with a Rust toolchain
winget install Termaxa.Termaxa # Windows (the winget manifest can lag a release)
scoop bucket add termaxa https://github.com/termaxa/scoop-bucket && scoop install termaxa # Windows, always current