Get started
Protected in three steps
Nothing changes until you say yes. Every file OpenMoat touches is backed up, and openmoat uninstall puts it back.
Install
pick your system$ brew install crocodile-labs/tap/openmoatHomebrew. To upgrade later: brew update && brew upgrade openmoat. On macOS 12 and earlier, where Homebrew may stop, use the Linux and macOS installer instead.
$ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/crocodile-labs/openmoat/releases/latest/download/openmoat-installer.sh | shInstalls openmoat into ~/.cargo/bin; the same installer works on macOS. Homebrew works on Linux too: brew install crocodile-labs/tap/openmoat.
$ powershell -ExecutionPolicy Bypass -c "irm https://github.com/crocodile-labs/openmoat/releases/latest/download/openmoat-installer.ps1 | iex"On native Windows the hooks apply the policy, and Codex’s own sandbox is set up as on other systems. For the OS sandbox with the other agents and openmoat run, use WSL2.
$ cargo install openmoat --lockedFrom crates.io, built from source (Rust 1.99).
Checksums and build attestations for every release file: INSTALL.md. Upgrading from 0.7 or earlier, when the command was
moat? Read this first.Protect your agents
$ openmoat initOpenMoat 0.24.0 · protecting the agents on this machineEach file is backed up first · d shows the full diff · openmoat uninstall undoes itClaude Code ~/.claude adds hook + sandbox settings Protect? [Y/n/d] yCodex ~/.codex adds hook + sandbox settings Protect? [Y/n/d] y✔ 2 agents protectedAgent ProtectionClaude Code ✔ hook + OS sandboxCodex ✔ hook + OS sandboxNext steps1. Try it: openmoat policy check "cat ~/.ssh/id_rsa"Backups saved · undo everything: openmoat uninstall · check any time: openmoat statusd shows exactly what changes before you answer.
initasks once per agent it finds, and lists the steps left to you only for agents you have: in Codex, trust OpenMoat’s hooks once in/hooks; for OpenClaw, restart the Gateway. Then start a new agent session.See it work
$ openmoat policy check "cat ~/.ssh/id_rsa"✕ denyrules : secrets-pathsreason: secret material: read /Users/you/.ssh/id_rsaalso : shell "cat ~/.ssh/id_rsa"$ openmoat doctor…All good.$ openmoat statuseach agent’s protection, and what to fixpolicy checkruns nothing: it shows the verdict, the rule and the reason for any command. While you work,openmoat watchfollows the agents’ calls live andopenmoat why --lastexplains the newest block.
All the details: the quick start in the docs and what each agent supports.