Skip to content

Audit and diagnostic commands

Commands marked terminal must be run by a person in a terminal of their own (Commands).

Command What it does Example
openmoat replay [--since <when>] [--session <id>] Each agent session as a timeline openmoat replay --since today
openmoat report [--since <when>] [--host <id>] Totals, hosts, top rules, reviews per active hour, and sends after collecting outside the project (recorded only) openmoat report --since 7d
openmoat watch · openmoat why --last Follow the agents’ calls live · explain one deny or review (Watch and why) openmoat why --last
openmoat provenance [--range <rev-range>] [--format text|json] Which files and lines of commits an agent session wrote, from this machine’s log, and whether it had read untrusted content first (Provenance) openmoat provenance --range main..HEAD
openmoat provenance --write-notes · --verify Keep a note per commit on refs/notes/openmoat (terminal) · check the notes against the log (exit 64 on a mismatch) openmoat provenance --write-notes
openmoat audit export [--since <when>] [--host <id>] [--session <id>] Events as JSON Lines with their chain hashes, on stdout openmoat audit export --since 7d > week.jsonl
openmoat audit verify <file> [--anchor <hash>] [--require-anchor] Check an export without the database openmoat audit verify week.jsonl
openmoat audit verify --against <repo or file> Check the log against every anchor there; fails, naming the first anchor whose event is gone or changed openmoat audit verify --against ~/notes
openmoat audit anchor --git <repo> · --file <path> Record the log’s head outside it; nothing is sent anywhere. Terminal openmoat audit anchor --file ~/anchors.jsonl
openmoat audit report <file>… One report over verified exports from several machines openmoat audit report alice.jsonl bob.jsonl
openmoat audit evidence [--since <when>] [--until <when>] [--host <id>] [--samples N] [--format json] Evidence for a window per control of OWASP Top 10 for LLM Applications 2025, SOC 2 (CC6 to CC8) and ISO/IEC 27001:2022 Annex A: rules that fired, decisions by verdict, redacted samples, the chain head, and the policy, lock and protections now. Evidence, not a certification (Compliance evidence) openmoat audit evidence --since 90d > evidence.md
openmoat audit deliver test · status · flush Live delivery to a SIEM (from 0.20.0): send a test record to every sink · each sink’s place, backlog and last failure · deliver now and resume a paused sink (Send to a SIEM) openmoat audit deliver status

--since takes all, today, yesterday, 12h, 7d, 2w or a date (2026-10-15, UTC); audit evidence also takes --until, in the same forms, for the end of the window (not included). Most commands take --format json. See Audit log.

Command What it does Example
openmoat doctor [--verbose] [--format json] What needs you first, each with its fix; then each agent and OpenMoat’s own state: drift, hook and sandbox checks, MCP changes, agent versions with a security advisory, the repository’s git settings that run a program; --verbose lists every check with its paths, each agent’s known gaps and where each sandbox is stricter or wider than the policy openmoat doctor
openmoat doctor --accept Accept the current policy and hook files and re-pin. Terminal openmoat doctor --accept
openmoat doctor --bundle <file> [--bundle-events N] One local file to attach to a bug report: versions, hook states, checks and the last decisions without commands, paths or secrets; nothing is sent. Refused when an agent started it openmoat doctor --bundle report.json
openmoat bench [--hook <command> --host <id>] [--verbose] [--format json] Score OpenMoat, or any hook, against the bundled MoatBench scenarios; the scenarios’ commands never run openmoat bench --hook '<command>' --host claude-code
openmoat guard --host <id> The hook entry point: agents call it, you do not

See Troubleshooting.