Prerequisites
- Node.js 18+
- An LLM API key for the attacker/judge model — e.g.
OPENAI_API_KEY,GROQ_API_KEY, orANTHROPIC_API_KEY - A target to test — an HTTP chat endpoint or a local script (you’ll be asked for it during setup)
Set your API key
The attacker and judge LLMs use this key. Set it in your shell or a
.env file in the current directory.This is the key for the LLM that generates and judges attacks — separate from any key your target endpoint needs.
Run the scan
--config, run runs the setup wizard inline — it asks for your target, a suite, effort, and turns — writes the config to .opfor/configs/, then immediately fires the attacks and judges the responses.Split setup and execution
For CI — or to review the config before firing attacks — run the two steps separately:--config path on its last line.
Next steps
CLI overview
Configs, targets, effort, and multi-turn attacks.
Core concepts
How targets, evaluators, and judging fit together.
Evaluators & suites
Choose what to test against.
Trace-aware testing
Let the judge see tool calls and retrievals, not just the reply.
