Corral is an agent that operates your terminal — one command at a time, in a disposable sandbox it can't escape. It sees the result of everything it runs and corrects course. Point it at a folder and let it work on your real files, contained.
$ corral --workdir ./project "fix the failing test and re-run it"
The loop
One command at a time — read the result, decide the next step, stop when it's done. No firing a wall of commands and hoping.
The agent issues a single command as strict JSON — with its reasoning and whether it needs root.
The exact stdout, stderr, and exit code stream back live and feed the next decision, so it corrects instead of guessing.
It finishes when the goal is met — or tells you plainly what it's missing, instead of flailing.
The pen
The whole idea: give the agent room to be autonomous because it can't reach anything it shouldn't. The sandbox is the fence.
Real work
The middle ground between an empty sandbox and handing over your whole machine: mount one project directory and the agent works on your actual files — still with no network, still capped. Changes land on your host, in that folder, and nowhere else.
works in the REPL too — open a session against a project and iterate, with the sandbox kept warm and context carried across goals.
More
Point it at Ollama, vLLM, or LM Studio and inference never leaves your machine. The command contract is guaranteed on every backend.
A handful of small files, zero dependencies, MIT-licensed, with 93 tests run in CI — including tests that prove the sandbox really contains the agent. You trust it because you can see it.
Run with no goal to start a session: the sandbox stays warm and context carries across goals, so work builds up conversationally.
Output appears live as each command runs — not dumped at the end. You see exactly what's happening, as it happens.
On real-file targets, obviously destructive commands (rm -rf, dd, curl | sh) are flagged and need confirmation — even in autonomous mode. Secrets in command output are redacted before they're sent to the model.
Run in the disposable sandbox, point it at a project with --workdir, or operate a remote box over --ssh — the same loop and safety everywhere. Save a session and --resume it tomorrow.
Get started
Give Corral a goal and let it work — knowing it's boxed in the whole time, and you can read every line of how it works.
$ npx @smartledger/corral · or $ npm i -g @smartledger/corral
Requires Docker + Node 18+ · no runtime dependencies