iFixAi

CLI reference

Every ifixai command and ifixai run flag. Guided first run: get-started.md.

Commands

ifixai init                  # check env for provider keys, suggest a first run
ifixai setup                 # arrow-key wizard; writes ifixai.yaml (see Reusable config)
ifixai run                   # run the default 10 inspections (Standard or Full mode)
ifixai run --full-run        # run all 61 inspections
ifixai run --fixture FILE    # custom fixture (YAML or JSON)
ifixai list tests            # all 61 inspections (32 core + 29 extended)
ifixai list fixtures         # registered named fixtures
ifixai author --example      # write the example profile to profile.json to edit
ifixai author PROFILE -o FILE  # agent profile (JSON) to fixture; `reference` is the example
ifixai validate [FILE]       # per-test layout, or a fixture: schema plus evidence minimums for what a bare run runs
ifixai validate FILE -b B18  # a fixture, for what run's -b, -c, --suite, --strategic or --full-run picks
ifixai compare A B           # diff two scorecard reports
ifixai windtunnel controls   # which fixtures the reference provider satisfies
ifixai windtunnel sweep      # measure which inspections catch each seeded defect
ifixai windtunnel sweep --output base.json      # seal the measurement
ifixai windtunnel sweep --baseline base.json    # exit 1 if a detection was lost
ifixai run -p openai -k "$OPENAI_API_KEY" -c DECEPTION   # example: one category

trajectory, policy-lab and windtunnel are offline command groups that need no provider key; see trajectory assurance, Business Policy Lab and the evaluator wind tunnel.

ifixai run flags

System under test (SUT)

Flag Default Does
--provider, -p none mock, openai, atlascloud, minimax, openrouter, orcarouter, requesty, cloudflare, vercel, anthropic, gemini, azure, bedrock, huggingface, litellm, http, langchain.
--api-key, -k provider’s env var SUT API key. Without it, read from the provider’s env var (e.g. OPENAI_API_KEY). Required for http unless --auth-method none.
--auth-method bearer http only: bearer, basic, api_key, or none.
--model, -m provider default Model identifier override.
--endpoint, -e none Endpoint URL (required for http and azure; for cloudflare it replaces the URL built from CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_GATEWAY_ID).
--system-prompt, -s none Custom system instructions sent before each inspection.
--grounding sut Governance context source: sut (baked-in), fixture (system prompt derived from fixture), none.
--sut-temperature 0.0 SUT sampling temperature. B22 needs 0 or --sut-seed.
--sut-seed none SUT sampling seed (recorded in the manifest either way).

Judge

Flag Default Does
--eval-mode auto deterministic, single, full, or self. See How a run is judged.
--judge-provider none Judge provider. Repeat >=2 times for a Full-mode ensemble.
--judge-api-key, --judge-model none Key(s) and model(s), paired with --judge-provider.
--judge-budget 0 Judge budget per run, in calls to the judge’s provider: retries, fallback models and the judge check before the run count, and in Full mode each judge’s call. 0 = a runaway guard of 10x the estimate, at least 2,000. The run may go 25% over the budget; when it needs a call past that ceiling it stops, keeps what finished and lists the rest as not run (budget). --dry-run and the run header show both numbers. See When a run stops early.

Fixture and governance

Flag Default Does
--fixture, -f auto Fixture name or YAML/JSON path.
--mode standard standard or full (hand-built fixture + >=2 distinct judge providers).

Suite subset

With none of these flags, ifixai run runs the 10-inspection essential suite: B01, B08, P01, B12, B09, B27 (high impact) and B06, B16, B18, B20 (medium impact). It always carries the three mandatory minimums, so it still produces a grade. What each one checks: README.

Flag Does
--full-run Every inspection (all 61) instead of the default 10. Cannot be combined with the flags below. Overrides a suite: saved in ifixai.yaml. Unrelated to --mode full.
--suite Named suite (see Suite options).
--strategic Top 8 strategic tests only.
--test, -b Test(s) by ID, repeatable: -b B01 -b B08.
--category, -c Category name(s), case-insensitive, repeatable; beats --strategic. Names: FABRICATION, MANIPULATION, DECEPTION, UNPREDICTABILITY, OPACITY, SABOTAGE, SUBVERSION, CONCEALMENT, SANDBAGGING, INSUBORDINATION, USURPATION, SYSTEMIC_RISK, MISCALIBRATION, STAKEHOLDER_CONFLICT, PERCEPTION_GOVERNANCE, OVERSIGHT_ATROPHY, PERSISTENCE, IDENTITY_ATTESTATION, INFLUENCE, BALANCE_INTEGRITY, FRANKNESS_CORRECTNESS_LINK, GRADER_VALIDITY, BENCHMARK_CONTAMINATION, TRAINING_DISPOSITION_PROVENANCE, VULNERABLE_USER_CARE.

Suite options

Suite Tests Use when
smoke 3 just checking the pipeline works
strategic 8 quick read on the riskiest spots
essential 10 the default: the highest-impact checks plus the three mandatory minimums, so it ends in a grade
core 32 the five pillars only; no letter grade, since the P01 minimum isn’t in it
extended 29 frontier risk signal, scored outside the grade
all 61 everything, same as --full-run

Four themes (security, reliability, compliance, frontier) also work as --suite values; run ifixai list suites to browse them all.

Output and reporting

Flag Default Does
--output, -o ./ifixai-results/ Report directory.
--format both json, markdown, or both.
--name, --version provider name, 1.0 System name and version label in reports.
--min-score 0.85 CI gate: exit 0 if the overall score is at or above it, 2 if below. A mandatory minimum (B01, B08, P01) that ran and failed exits 2 whatever the score. A partial (stopped) run exits 1, or 2 when a mandatory minimum that finished failed. A run that finished but is flagged RUN INVALID exits 2 whatever its score. A run that leaves out B01, B08 or P01 (-b, -c, --suite, --strategic) has no overall score, so --min-score doesn’t apply: it exits 0 only if it selected at least one inspection that can gate (report-only ones can’t) and all of those passed, and 2 if any failed, errored or was inconclusive. It also exits 2 when a mandatory minimum it selected was set aside unchecked (for example, no judge). Any other run with no overall score exits 2. The JSON report’s overall.passed is true exactly when the exit code is 0, and overall.min_score records the pass mark.
--quiet, -q off Suppress the startup banner; stdout still carries the summary and scores.

Execution and reliability

Flag Default Does
--timeout, -t 30 Per-request timeout in seconds.
--concurrency, -j 5 Max in-flight LLM requests (1-20). Overrides IFIXAI_CONCURRENCY.
--no-parallel off Alias for --concurrency 1.
--dry-run off Print inspection and judge-call estimates, then exit.
--no-promo off Skip the free Pro audit offer at the start and the steps at the end of a run. IFIXAI_NO_PROMO=1 skips them on every run.
--reliability-out runs Directory for manifest.json, one subdir per run.
--run-nonce fresh Replay-protection nonce (16 hex chars), recorded in the manifest.
IFIXAI_JUDGE_FALLBACKS (env) packaged JSON Path to the judge fallback-model chain. See Judge fallback models.
--holdout-seed, --b{12,14,28,29,30,32}-seed fresh random Pin, or set matching IFIXAI_*_SEED, to replay a run. See reproducibility.md.

Resume an interrupted run with --resume <run_id> and the same run options and --reliability-out directory. Analytic inspection seeds are derived from the base seed stored in its manifest, so resumed probes use the original corpus assignments. Older manifests without that base seed resume using the original random-seed behavior for incomplete inspections; completed checkpoint results keep their own seeds. Legacy unfinished probe contexts cannot be reconstructed.

Free Pro audit offer

Every real ifixai run with a person at a terminal opens with an offer of a complimentary iFixAi Pro audit, then one choice (arrow keys and Enter; a numbered list to type where the menu cannot run, such as with NO_COLOR set):

Nothing is added unless you pick Add it for me. Each agent is then added the way its own documentation describes:

Agent Found when How it is added
Claude Code claude is on the PATH claude mcp add --transport http --scope user ifixai https://mcp.ifixai.ai/mcp
Codex codex is on the PATH, or $CODEX_HOME (default ~/.codex) exists appends an [mcp_servers.ifixai] table to $CODEX_HOME/config.toml
Gemini CLI gemini is on the PATH gemini mcp add --transport http --scope user ifixai https://mcp.ifixai.ai/mcp
GitHub Copilot CLI copilot is on the PATH copilot mcp add --transport http ifixai https://mcp.ifixai.ai/mcp
Devin CLI devin is on the PATH adds ifixai to the user file that devin mcp add -s user writes, $XDG_CONFIG_HOME/devin/mcp_config.json (default ~/.config/devin/; %APPDATA%\devin\ on Windows). The command itself is not run: after adding, it waits for a browser sign-in
Cline CLI cline is on the PATH cline mcp add ifixai https://mcp.ifixai.ai/mcp --transport http --yes
Amp amp is on the PATH amp mcp add ifixai https://mcp.ifixai.ai/mcp
opencode opencode is on the PATH, or $XDG_CONFIG_HOME/opencode/ (default ~/.config/opencode/) exists adds ifixai under mcp in that folder’s opencode.jsonc, opencode.json or config.json (the first that exists, else a new opencode.json)
Cursor ~/.cursor/ exists ~/.cursor/mcp.json
VS Code Copilot $COPILOT_HOME (default ~/.copilot/) exists and copilot is not on the PATH $COPILOT_HOME/mcp-config.json
Kiro ~/.kiro/ exists ~/.kiro/settings/mcp.json
Junie ~/.junie/ exists ~/.junie/mcp/mcp.json
Warp ~/.warp/ exists ~/.warp/.mcp.json
Antigravity CLI ~/.gemini/config/ exists ~/.gemini/config/mcp_config.json
Devin Desktop Devin’s folder above exists and devin is not on the PATH mcp_config.json in that folder

The same steps are the last thing printed (on stderr) by every finished real run in which at least one inspection passed or failed, with or without a terminal, so a coding agent that runs ifixai reads them in its output. Nothing is asked there.

Neither is shown for --provider mock, on --dry-run or in CI. The start screen also needs a terminal (no pipes, scripts or agent-driven runs). Neither goes into a report file or SARIF. --quiet does not skip them. To skip both, pass --no-promo, or set IFIXAI_NO_PROMO=1 to skip them on every run:

ifixai run --provider openai --no-promo
export IFIXAI_NO_PROMO=1

ifixai offer

For a coding agent that runs iFixAi for you (the iFixAi skill and the playbook ifixai install writes call it before every audit). It prints the offer text and its two choices, every time, for the agent to show you. It prints nothing in CI or with IFIXAI_NO_PROMO=1.

ifixai offer --add-server adds the server to every coding agent found, as Add it for me does above, without asking: the coding agent asks you first. It prints the same lines (added, or what to run or paste yourself), and exits 0 either way. With no agent found, it says to add https://mcp.ifixai.ai/mcp as a remote MCP server yourself.

How a run is judged

The SUT (system under test) is the agent being graded via the SUT flags above; its key comes from --api-key or the provider’s env var. The judge grades the SUT’s answers; a citable grade needs a judge from a second, different provider.

Judge auto-pairing

With no --judge-* flags, iFixAi picks a judge from a different provider whose key it finds in the environment, never the SUT’s own. With only one credential it refuses unless you pass --eval-mode self. Preference order: testing-your-agent.md.

Evaluation modes (--eval-mode)

Mode What it does
deterministic Structural inspections only; no judge call.
single One cross-provider judge (--judge-provider required).
full Multi-judge ensemble (>=2 --judge-provider; Full mode only).
self SUT grades itself; grade prints but is flagged, not citable.

Standard vs Full

Mode changes how a run is judged, not which inspections run: the same selection either way (10 by default, all 61 with --full-run). Standard: auto fixture (the bundled default is a seeded-defect demo: a mock --full-run fails 14 inspections by design; see ifixai/fixtures/default/README.md), one auto-paired judge. Full (--mode full): requires --fixture (the default fixture is refused) and >=2 judge providers; majority vote, tie-break fail > partial > pass.

# Standard: export a second provider key and the judge auto-pairs.
ifixai run --provider http --endpoint http://localhost:8000/v1 --api-key "$YOUR_TOKEN" --fixture ./my-fixture.yaml

# Full: hand-built fixture, two independent judges.
ifixai run --mode full \
  --provider http --endpoint http://localhost:8000/v1 --api-key "$YOUR_TOKEN" \
  --fixture ./my-fixture.yaml \
  --judge-provider anthropic --judge-api-key "$ANTHROPIC_API_KEY" \
  --judge-provider openai    --judge-api-key "$OPENAI_API_KEY"

Judge design rationale: methodology.md.

Setup Judge model(s) Est. cost, full suite*
Single judge: Sonnet anthropic/claude-sonnet-4.6 ~$12-18
More affordable: two judges google/gemini-2.5-pro + openai/gpt-5.4-mini ~$10-14 combined

Both are reliable. Sonnet is the simplest, highest-quality single grader. Gemini 2.5 Pro and GPT-5.4-mini come from two different vendors; as a pair they still cost less than one Sonnet run, and no one model or vendor decides your grade (ties break conservatively, fail > partial > pass).

# Single judge (Standard mode): Sonnet grades your agent
--eval-mode single --judge-provider openrouter --judge-model anthropic/claude-sonnet-4.6

# Two affordable judges (Full mode; needs a hand-built --fixture), both on one OpenRouter key
--mode full --eval-mode full \
  --judge-provider openrouter --judge-model google/gemini-2.5-pro \
  --judge-provider openrouter --judge-model openai/gpt-5.4-mini

* Rough total for one full-suite run at OpenRouter list prices (mid-2026), based on the ~2,000 judge calls a full run makes (the suite generates far more probes than its test count, so the figure is fairly stable across fixtures). The agent under test is billed separately. Full mode needs a hand-built fixture: fixture_authoring.md. These are full-suite figures (--full-run); the default 10-inspection run makes far fewer calls, and --dry-run prints the estimate for yours.

When a run stops early

Three things stop a run before it finishes, and none reads as the agent failing:

You get one line saying what happened and how to fix it: top up the judge’s account or swap in another key with --judge-api-key, pick another --judge-model, or raise --judge-budget, then run again with --resume <run id> and the same flags. Inspections that finished keep their results. The rest are listed as not run, in the terminal and in the reports. A mandatory minimum (B01, B08, P01) that never ran reads NOT CHECKED, never a fail. A stopped run never passes as a whole. Its verdict reads INCONCLUSIVE (the run stopped early), the same in the terminal’s Passed line, the scorecard and the reports, unless a mandatory minimum that finished failed, which no later inspection can undo: then it reads FAIL (the run stopped early). An inspection that errored turns INCONCLUSIVE into ERROR, never a FAIL into ERROR; it is still listed with the errors. Reports are still written. The run exits 2 when its verdict is FAIL, 1 otherwise.

Judge fallback models

When the judge provider itself errors — an OpenRouter 502/503, a timeout, a dropped connection — the probe is retried on the next model in a priority-ordered fallback chain instead of killing the run. If every model is down, that one probe drops as INCONCLUSIVE and the run continues. A malformed judge reply is not a provider fault and never switches models.

The chain is plain JSON. Defaults ship at ifixai/judge/judge_fallbacks.json (OpenRouter: Gemini 2.5 Flash → GPT-4o mini → Haiku 4.5 → DeepSeek V3.2 → Qwen3 235B → GLM-5.2). The order is cheapest-and-tersest first: a verbose model burns real credit before it fails. Override by dropping an ifixai.judge-fallbacks.json next to your run, or point IFIXAI_JUDGE_FALLBACKS at any path:

{
  "providers": {
    "openrouter": {
      "attempts_per_model": 2,
      "models": [{ "model": "z-ai/glm-5.2" }, { "model": "openai/gpt-4o-mini" }]
    }
  }
}

attempts_per_model is how many provider errors one model absorbs before the chain advances. An empty models list disables fallbacks; with no fallback declared, the configured judge keeps its full retry budget instead. Substitutions are counted under fallback_grades in the run’s judge stats, so you can see which model actually graded.

The SUT’s own --model is dropped from the chain: a fallback must never turn a declared cross-provider grade into silent self-judging. Pointing the configured judge at the SUT is still --eval-mode self, which is declared and flagged.

Cost and time controls, so a dead judge cannot drain a key or stall a run:

Reusable config

ifixai setup writes ifixai.yaml; ifixai run layers it under any explicit flag (flag > config > env > default). It stores the key’s env-var name, never the secret:

provider: openai
model: gpt-4o
api_key_env: OPENAI_API_KEY
suite: all
judges:
  - provider: anthropic
    model: claude-sonnet-4-6

ifixai setup also records fixture, mode, and eval_mode (trimmed here for brevity). Keep ifixai.yaml out of version control; it is git-ignored by default.

When --provider changes the saved provider, its saved model, endpoint, key env-var name, authentication method and extra headers are skipped. Supply any connection overrides for the new provider explicitly. Other run defaults and the saved judge panel still apply. A config without provider keeps generic connection defaults.