Operate

CLI reference

Run gmonk <command> --help for full options. With the Docker deployment, prefix with docker compose run --rm gmonk (or alias it).

Setup & protect

CommandWhat it does
gmonk setupStart here. Guided wizard: pick what to protect (database / files & shell / both). Flag-driven for CI (--database/--files/--all).
gmonk protect --backend-ref <ENV>Run the wire proxy in front of your DB with undo capture on (--guarantee, --tls-*, --listen, --gc-every).
gmonk enforce --agent-role <role>Revoke the agent's direct DB access so gmonk is the only way in (Postgres & MySQL).
gmonk demoRun the whole story end-to-end against a throwaway table.
gmonk migrateCreate/update gmonk's schema (idempotent).

Review & reverse

CommandWhat it does
gmonk runsList runs, grouped by project.
gmonk show <run>Render a run's action tree.
gmonk reverse-plan <run>Preview an undo with a live drift check (read-only).
gmonk reverse-run <run>Apply the undo (--dry-run, --force, --only).
gmonk excise <run> <seq…>Undo one action plus exactly its causal dependents.
gmonk rrr <run>Rewind-repair-replay: fix a bad step, replay the good downstream work.
gmonk state-at / gmonk deps <run>Point-in-time reconstruction · dependency graph / blast radius.
gmonk recoverability <run> / pinRecoverability status · exempt captures from GC.
gmonk webServe the review UI (SSO/token/RBAC-aware).
gmonk approvals / approve / denyList and decide held actions.

Database capture (can't-proxy paths)

CommandWhat it does
gmonk protect-db / unprotect-dbBring a target under WAL/trigger capture · clean teardown.
gmonk wal-drain [--watch <s>]Drain registered targets' replication slots into the store.
gmonk sql-install / sql-uninstall <table>Add/remove a capture trigger on an owned table.
gmonk wal-setup / wal-protect / wal-teardownLower-level WAL primitives (per slot / per table).
gmonk coverage-report --target-ref <ENV>Pre-flight: classify each table reversible / limited.

Agent hooks & operations

CommandWhat it does
gmonk install-hook / uninstall-hookWire gmonk into Claude Code (fast HTTP hook by default; --exec for spawn).
gmonk run -- <server…>MCP gateway: capture an MCP-native agent's tool calls.
gmonk gc [--schedule --every 24h] [--delete]Mark-sweep unreferenced before-images.
gmonk users add|list|disable|enable|roleManage review-UI accounts & roles.
gmonk slack-listen / sso-checkRun the Slack Socket-Mode listener · validate SSO/OIDC config.