DocsInstallCLI ReferenceCommunityGitHub ↗
Reference

CLI Reference.

Every command, flag, and subcommand. Start typing to filter — hit / from anywhere.

42 commands

Setup & lifecycle

foreman initInitialize ~/.foreman/ — identity, policy, and database.
--reset-policyReplace policy.yaml with the default template.
--reset-soulReset the SOUL.md persona.
$ foreman init
foreman setupInteractive 5-minute onboarding wizard.
--resumeContinue a partially-finished setup.
--resetStart the wizard over from scratch.
$ foreman setup --resume
foreman startStart the gateway with the Ink TUI.
--no-onboardingSkip the first-run onboarding screen.
--skip-setupBoot straight to the gateway with defaults.
$ foreman start --skip-setup
foreman mcp-stdiostdio MCP server agents route their tool calls through.
-s, --source <id>Source identifier (default: mcp-client).
$ foreman mcp-stdio --source claude-code
foreman wrapWrap an agent subprocess with MCP mediation.
--name <id>Identifier to register the wrapped agent under.
-- <command>The agent command to launch.
$ foreman wrap --name my-agent -- my-agent-binary start
foreman doctorDiagnose the environment — Node, paths, db, FTS5, policy, agents, MCP.
--jsonEmit machine-readable JSON.
$ foreman doctor --json
foreman migrate-configMigrate a legacy ~/.foreman/ layout to XDG directories.

No flags.

$ foreman migrate-config

Logs (audit)

foreman log search <query>Full-text search recent requests via FTS5.
-n, --limit <N>Max results (default: 50).
--jsonEmit JSON.
$ foreman log search "read_file env" -n 100
foreman log tailShow the most recent requests.
-n, --limit <N>How many (default: 20).
-f, --followStream new requests live.
--session <id>Filter to one session.
--jsonEmit JSON.
$ foreman log tail --follow
foreman log show <id>Show the full detail of a single request.
--jsonEmit JSON.
$ foreman log show 4827

Policy

foreman policy showList all policy rules.
--jsonEmit JSON.
$ foreman policy show
foreman policy editOpen policy.yaml in $EDITOR and reload on save.

No flags.

$ foreman policy edit
foreman policy resetReplace policy.yaml with a smart default template.
--yesSkip the confirmation prompt.
$ foreman policy reset --yes

Agents

foreman agent listList registered agents.

No flags.

$ foreman agent list
foreman agent add [name]Register a new agent.
--type <registryId>Agent type from the registry.
--config-path <path>Path to the agent's config.
--skip-configDon't write agent config.
--auto-installInstall the agent if missing.
--key-out <path>Write the agent's key to a file.
$ foreman agent add hermes --type hermes --auto-install
foreman agent show <name>Show agent detail, including its transport.

No flags.

$ foreman agent show hermes
foreman agent remove <name>Remove an agent.

No flags.

$ foreman agent remove hermes
foreman agent regenerate-key <name>Rotate the agent's Ed25519 key.

No flags.

$ foreman agent regenerate-key hermes
foreman agent block <name>Block / unblock an agent.
unblock <name>Lift the block.
$ foreman agent block openclaw
foreman agent disable <name>Disable / enable an agent.
enable <name>Re-enable.
$ foreman agent disable hermes
foreman agent trust <name>Change an agent's trust state.
distrust <name>Mark as untrusted.
$ foreman agent trust claude-code
foreman agent update <name>Update an agent registration.

No flags.

$ foreman agent update hermes

Secrets

foreman secrets listList all stored secrets.
--jsonEmit JSON.
$ foreman secrets list
foreman secrets add <name>Add a secret to the encrypted store.
--value <string>Value (prompts if omitted).
$ foreman secrets add ANTHROPIC_API_KEY
foreman secrets show <name>Show a secret (masked by default).
--revealShow the plaintext.
--yes-i-want-to-see-itConfirm reveal.
--jsonEmit JSON.
$ foreman secrets show ANTHROPIC_API_KEY --reveal
foreman secrets remove <name>Remove a secret.
--yesSkip confirmation.
$ foreman secrets remove OLD_KEY --yes
foreman secrets rotate <name>Replace a secret's value.
--value <string>New value.
$ foreman secrets rotate API_KEY
foreman secrets projectProject secrets into agent config files.

No flags.

$ foreman secrets project

LLM

foreman llm <subcommand>Manage the optional LLM brain.
status · enable · disableToggle and inspect.
login · logout · switchProvider auth & selection.
budget · usage · costsSpend controls.
verifyLLM-based prompt-injection detection.
$ foreman llm switch anthropic
foreman claude-loginOAuth subscription login for Claude.

No flags.

$ foreman claude-login
foreman codex-loginOAuth subscription login for Codex.

No flags.

$ foreman codex-login

Orchestration & more

foreman notifyConfigure & test notifications (Telegram, Discord, Slack, webhook, system).
testSend a test notification.
configEdit notify.yaml.
mute · unmute · silenceQuiet hours.
$ foreman notify test
foreman chatLLM chat interface (orchestrator_chat).

No flags.

$ foreman chat
foreman writeQueue a directive to an agent over the control channel.
-a <agent>Target agent.
-m <text>Message body.
$ foreman write -a hermes -m "pause"
foreman reportActivity reports.
daily · weekly · monthlyReporting window.
$ foreman report weekly
foreman delegationsTrack autonomous agent-to-agent loops.
list · show <id> · resolve <id>Inspect and resolve.
$ foreman delegations list
foreman flowMulti-step autonomous task orchestration.
list · show <id> · cancel <id>Inspect and cancel.
$ foreman flow show f_12a
foreman providerLLM provider registry.
list · info <id> · install <id> · uninstall <id>Manage providers.
$ foreman provider install ollama
foreman registryAgent + LLM catalogs.
list · info <id> · validate · update · search <query>Browse the catalog.
$ foreman registry search telegram
foreman identityForeman's own persona (SOUL.md).
show · edit · pushInspect and update.
$ foreman identity edit
foreman hookAgent identity hooks (SOUL.md injection).
install <agent> · uninstall <agent> · listManage hooks.
$ foreman hook install hermes
foreman completion bash|zshGenerate a shell completion script.

No flags.

$ foreman completion zsh > _foreman