Skip to main content
The CLI handles everything: interactive setup, attack generation, firing attacks, judging responses, and producing reports. It’s the primary surface for engineers and CI.

Install

From source (contributors):

Two testing modes

Opfor decides which pipeline to run from target.kind. Pick one per config.
This is different from running opfor itself as an MCP server so AI assistants can invoke it.

Create a config

Interactive wizard (recommended):
Blank config to hand-edit:
Configs land in .opfor/configs/opfor-config-<timestamp>-<id>.json unless you pass --config <path>.
Add .opfor/ to .gitignore — it holds configs and reports with embedded target metadata.

Config shape

apiKeyEnv is the env var name holding the key — never the key itself. Don’t put raw keys in a config file.

API keys

The attacker/judge LLM key is read at run time. Set it in your shell or a .env file in the working directory:
Load a non-default path with --env:

Next

Running scans

Execute, runtime overrides, and reports.

Config reference

Every config field for agent and MCP targets.