From zero to a guarded gateway watching its first agent. Four commands, one config block.
Creates ~/.foreman/ — the SQLite audit db, an Ed25519 identity keypair, and a starter policy.yaml.
$ foreman init ✓ created ~/.foreman/ db · identity.key · policy.yaml
Boots the Ink TUI gateway. This is the window you keep open — your live dashboard and approval prompt.
$ foreman start
Point any MCP client at Foreman. Here's Claude Code — add the server to its config:
{ "mcpServers": { "foreman": { "command": "foreman", "args": ["mcp-stdio"] } } }
Or wrap any subprocess agent so its tool calls get mediated:
$ foreman wrap --name my-agent -- my-agent-binary start
Tail the audit log live, list registered agents, and review the active policy.
$ foreman log tail --follow # live request stream $ foreman agent list # registered agents $ foreman policy show # active rules
Boot banner → idle dashboard → ⚠ approval modal → inspect → remember → audit log. The whole story, scripted.
$ cd examples/phishing-scenario $ ./run-demo.sh