Skip to main content
Three commands: setup writes a config, run fires a scan from one, and hunt runs an autonomous campaign. Run opfor <command> --help for the live version any time.

opfor setup

Interactive wizard that writes a timestamped config to .opfor/configs/.
FlagDescription
--agentSkip the mode prompt, go to the agent wizard
--mcpSkip the mode prompt, go to the MCP wizard
--emptyWrite a minimal config without prompts
--config <path>Override the output config path
--env <path>Load env vars from a non-default .env path

opfor run

Reads a config, fires attacks, judges, and writes the report. With no --config, it runs the setup wizard inline first.
FlagDescription
--config <file>Config to run. Omit to run the wizard inline
--effort <e>Override effort (adaptive or comprehensive)
--turns <n>Override turn count (1 forces single-turn)
--output <dir>Override report parent directory (default .opfor/reports/)
--env <path>Load env vars from a non-default .env path

opfor hunt

Autonomous red-team campaign driven by an AI agent. See the autonomous mode guide for details.
FlagDescription
--endpoint <url>Target HTTP endpoint (required)
--objective <text>Attack objective
--objective-file <path>Read objective from a file
--target-key-env <var>Env var holding the target API key
--target-key <key>Target API key directly
--name <name>Display name for the target
--target-model <id>Model value sent in requests
--stateless / --statefulConversation history handling
FlagDefault
--model <id>sonnet
--operator-model <id>sonnet
--scout-model <id>haiku
FlagDefaultPurpose
--budget-usd <n>10Hard USD budget (0 = unlimited)
--max-operators <n>6Parallel operators
--max-turns <n>120Total agentic turns
--max-thread-turns <n>25Per-thread depth ceiling
--max-total-threads <n>40Total attack threads
--max-depth <n>3Exploration generations
--max-recon-probes <n>8Benign recon probes
FlagDefaultPurpose
--output <dir>.opfor/reportsReport directory
--uioffLaunch live dashboard
--ui-port <port>3847Dashboard port
--env <path>Load a .env file