CLI reference

Complete command map, execution modes, output contracts, and automation conventions for wf.

On this page

wf is the canonical command-line entrypoint for WorldFoundry. It covers catalog discovery, readiness checks, typed model inference, benchmark execution, result normalization, reporting, and validation. Use the Quickstart for the first clone-to-run walkthrough; use this page when choosing a command or checking its contract.

Safe to inspect

Help, catalog discovery, --model-status, --print-config, --plan-only, and local asset checks do not load model weights. They are the right place to start on a CPU-only machine or before allocating a GPU job.

Install and verify

Run commands from the repository root after activating the unified environment.

bash scripts/setup/bootstrap_worldfoundry.sh
source tmp/worldfoundry_unified_env.sh
conda activate "${WORLDFOUNDRY_UNIFIED_ENV_PREFIX}"
wf --help

bootstrap_worldfoundry.sh is the official first-clone script used in the Quickstart, TUI, and Studio pages.

Running wf with no arguments prints a short first-run banner. Add --help for the complete top-level command list.

Entrypoints

  • wf — Canonical CLI used throughout the documentation.
  • wf tui — Terminal UI.
  • wf mcp — MCP server.
  • wf-studio — Separate Studio launcher. See the Studio guide.
  • python -m worldfoundry — Module fallback when an editable install or console-script PATH is unavailable.
  • python -m worldfoundry.studio.workspace_job infer — Workspace visual smoke (the same job path the Studio UI submits). Not the documented first-run command.

Which command. Everyday reproducible / model-page commands use wf run <id> --pipeline.task-profile …. Use python -m worldfoundry.studio.workspace_job infer only for Workspace visual smoke.

Within one Workspace process, WORLDFOUNDRY_STUDIO_BATCH_MAX_SIZE (default 1) and WORLDFOUNDRY_STUDIO_BATCH_DELAY_MS (default 5) configure compatible native Wan T2V and 5B TI2V resident-worker batches. Admission requires parallel job slots, resident weights and compatible Torch attention; compiled batches use regional scope. Configuration takes effect before worker startup and does not combine independent CLI processes. See the batch admission, warmup and cancellation contracts for precision and input requirements.

Examples below use wf so shell history, job scripts, and bug reports share one spelling.

Help at every level

Append --help after the command whose flags you need. Options belong to the leaf command, so --json is written after zoo models, not before it.

wf --help
wf zoo --help
wf zoo model-show --help
wf run --help

Terminal output of wf --help

Captured from the current CLI. The screenshot can be regenerated with npm run cli:screenshots in docs/fumadocs.

Model-specific help

The positional form run MODEL loads that model's inference schema and adds typed --pipeline.*, --pipeline.load.*, and --runtime.* options to its help page.

wf run self-forcing --help
wf run self-forcing --model-status
wf run self-forcing --print-config --json
  • --pipeline.* controls request inputs and generation defaults.
  • --pipeline.load.* controls checkpoint and model-loading fields.
  • --runtime.* controls the execution device and runner settings.
  • --model-status and --print-config resolve metadata only; they do not load weights.

Terminal output showing one model-zoo readiness record

Choose the right command

Several commands can reach the evaluation core, but they start from different user inputs.

  • Browse stable model or benchmark IDs — prefer zoo models, zoo benchmarks, zoo model-show, zoo benchmark-show. Reads the release catalogs and surfaces readiness, aliases, needs, and next actions.
  • Run one model directly — prefer run MODEL. Adds model-specific typed inference flags.
  • Run one or many model × benchmark cells — prefer run --model ... --benchmark .... Unified facade for a cell, repeated IDs, named suites, resume, cache, and plan-only execution.
  • Score an artifact directory with a benchmark — prefer score --benchmark ... --artifacts .... User-oriented scoring intent with a complete benchmark protocol.
  • Score WorldFoundry result rows with explicit metrics — prefer score --results ... --metric .... Compact existing-results workflow.
  • Execute a materialized run plan or use eval-core fields directly — prefer evaluate (alias eval). Lower-level deterministic path for requests/results ledgers and model-mode evaluation.
  • Generate from a dataset manifest, then score — prefer generate-score. One intent owns dataset materialization, generation, cache, and metrics.
  • Import or execute one benchmark's official surface — prefer zoo benchmark-run. Exposes benchmark-specific modes and parameters. Follow that benchmark's Hub page.
  • Re-run a pinned model × benchmark recipe — prefer reproduce. Resolves a recipe YAML.
  • Build indexes, comparisons, or contract checks — prefer index-runs, compare-runs, validate-artifact. Operates on durable run outputs without rerunning a model.

Complete command map

Discovery and interactive surfaces

  • tui

    Interactive catalog browser and command builder.

  • zoo

    models, model-specs, model-show, model-download, embodied-assets, benchmarks, benchmark-specs, benchmark-show, benchmark-fetch, benchmark-run.

  • tasks

    list, show, catalog for registered benchmark tasks.

  • suites

    list, show for named model × benchmark presets.

  • models

    list, runtime-runners, visualizations, assets, visualize.

Execution and scoring

  • run

    Direct typed inference, one model × benchmark cell, or a suite/matrix.

  • score

    Score an artifact directory with a benchmark, or result rows with selected metrics.

  • generate-score

    Run an in-tree model over a dataset manifest and score the results.

  • reproduce

    Execute a recipe YAML.

  • evaluateeval

    Deterministic eval-core execution for materialized results, run plans, or model mode.

  • embodied

    plan, run, serve, merge for simulator-backed closed-loop evaluation.

Data, plans, and validation

  • task

    list, show, validate, materialize filesystem task YAML.

  • dataset

    create, show, validate, materialize sample manifests; locate, plan local/HF dataset assets.

  • config

    list, run checked-in workflow templates.

  • plan

    create, show, validate stable worldfoundry-run-plan JSON.

  • metric

    list, show, validate executable metric IDs.

  • preflight runtime

    Check imports, environment variables, paths, CUDA, and declared validation gaps without running a benchmark.

  • validate

    Validate legacy benchmark metadata loading with a concrete task/data selector.

Reports and integrations

  • index-runs

    Build index.json, index.jsonl, and an optional dependency-free HTML browser.

  • compare-runs

    Compare explicit run directories or select runs from an index.

  • validate-artifact

    Validate summary, scorecard, index, comparison, and suite schemas.

  • mcp

    Start the MCP server (--transport stdio|streamable-http|sse, default stdio; --host/--port for HTTP).

MCP tools

wf mcp starts the FastMCP server (worldfoundry/mcp/server.py). After python -m pip install -e ".[mcp]":

wf mcp                                              # stdio, for local agent clients
wf mcp --transport streamable-http --port 8000      # HTTP endpoint at http://127.0.0.1:8000/mcp
wf mcp --transport sse                              # legacy SSE clients

HTTP transports bind to 127.0.0.1 unless --host is given. Call server_info first: it returns paths, the tool list with behaviour hints, and the recommended workflow.

GroupTools
Serverserver_info
Discoverylist_models, get_model_info, list_benchmarks, get_benchmark_info, list_tasks, get_task_info, list_metrics, show_metric, check_benchmark_datasets
Runspreview_run, evaluate, list_runs, get_run_status, get_run_result, get_run_samples, cancel_run
Studio workspacelist_studio_models, get_studio_model_info, submit_studio_inference, list_studio_jobs, get_studio_job, wait_for_studio_job, stop_studio_job, get_studio_job_logs, list_studio_artifacts, get_studio_manifest

Tool contracts:

  • Every parameter carries a description in the tool's JSON schema, and fixed choices are enums (wait: auto|async|sync; generation_cache_mode: off|read|write|read-write|refresh; mode; detail; run status).
  • Each tool declares MCP annotations. Discovery and status tools are read-only; evaluate and submit_studio_inference start work; cancel_run and stop_studio_job are destructive; Studio tools are marked open-world because they call the Studio HTTP API.
  • list_* tools return one page in a summary view: pass offset/limit to page (next_offset is null on the last page) and detail="full" for every field. get_*_info always returns the full entry.
  • preview_run and evaluate take model plus benchmarks (a list) or suite_ids, and forward mode, plan_only, resume, generation_cache_dir, generation_cache_mode, model_variant, requests_path, task_name, generated_artifact_dir, output_artifact, and metrics to wf run. preview_run returns the exact command without starting it.
  • evaluate returns a run_id. With wait="auto" it waits up to wait_timeout_s and then returns the running status; follow up with get_run_status, get_run_result, and get_run_samples.
  • Results are {"ok": true, ...}. Failures are {"ok": false, "error": ..., "error_type": ...} where error_type is not_found (unknown id; the message suggests close matches), invalid_argument, unavailable (for example, Studio is not running), runtime, or internal.

Studio tools default to WORLDFOUNDRY_STUDIO_WORKSPACE_URL (typically http://127.0.0.1:7870). Run files land under WORLDFOUNDRY_MCP_RUN_ROOT, or runs/mcp when that variable is unset.

Python clients can use worldfoundry.mcp.client.MCPClient and convert_result_to_openai_format() to adapt tool results to OpenAI Chat content. Audio uses an input_audio block with base64 data and format set to wav or mp3. The converter accepts WAV/MP3 MIME aliases and raises ValueError for other audio formats. Text and image blocks retain their content and data URIs. Conversion is local and does not call an API provider.

Job completion and cancellation

Durable command jobs preserve the original termination reason in completion receipts and restored status. Timeouts remain failed with their timeout error; user cancellations remain cancelled.

On POSIX, bounded benchmark commands clean up their owned process group before returning or propagating an interruption. Timeout payloads record timed_out and kill_stuck; the latter indicates that teardown did not finish.

The parser is the source of truth for flags. Use wf <command> [<subcommand>] --help instead of copying flags from an unrelated model or benchmark recipe.

Common workflows

1. Discover and check readiness

wf zoo models
wf zoo benchmarks --ready-now

wf zoo model-show \
  --model-id <model-id> \
  --include-manifest \
  --json

wf zoo benchmark-show \
  --benchmark-id <benchmark-id> \
  --include-spec \
  --json

# Checks the local cache; it does not download.
wf zoo model-download \
  --model-id <model-id> \
  --check-local \
  --json

Use human tables while exploring. Add --json only when another program will consume the result.

2. Run one model directly

Inspect the resolved fields before allocating GPU resources:

wf run self-forcing --model-status
wf run self-forcing --print-config --json

Then provide only the overrides for this run:

wf run self-forcing \
  --pipeline.prompt "A paper boat moving down a forest stream" \
  --pipeline.frames 33 \
  --pipeline.seed 7 \
  --pipeline.load.checkpoint-path /path/to/self_forcing_dmd.pt \
  --runtime.device cuda \
  --output-dir tmp/self_forcing_run

Entries marked runnable_runner can execute directly. runner_candidate and listed_only entries remain inspectable but stop before model loading with a readiness explanation.

3. Plan or execute model × benchmark runs

Plan a potentially large matrix first:

wf run \
  --all-benchmarks \
  --model <model-id> \
  --plan-only \
  --output-dir tmp/worldfoundry_plan \
  --json

Execute one cell after its assets and environment pass readiness checks:

wf run \
  --benchmark <benchmark-id> \
  --model <model-id> \
  --mode official-run \
  --output-dir tmp/worldfoundry_run \
  --json

Repeat --model or --benchmark to create a matrix, or use --suite <suite-id>. Add --resume to reuse completed cells whose fingerprints still match.

4. Score existing artifacts or result rows

For a benchmark-owned artifact layout:

wf score \
  --benchmark <benchmark-id> \
  --artifacts /path/to/generated-artifacts \
  --mode official-run \
  --output-dir tmp/score/<benchmark-id> \
  --plan-only \
  --json

Remove --plan-only after the prepared intent reports ready: true.

For already materialized WorldFoundry result rows:

wf score \
  --results tmp/results.jsonl \
  --metric artifact_count \
  --metric required_artifacts_present \
  --required-artifact video \
  --output-dir tmp/score/results \
  --json

In-process score --results, generate-score, reproduce, evaluate, and run accept --resume and --metric-batch-size (default 32). Completed sample generation and metric batches are persisted separately. Resume reuses matching requests, model settings and existing artifacts; metric implementation, version and declared parameters determine whether scores can be reused. metrics/checkpoint.jsonl retains completed metric batches after interruption. A changed metric is recomputed without rerunning matching generation. score --benchmark --artifacts uses an official evaluator protocol and rejects these in-process scoring flags.

evaluate exposes the same deterministic core with lower-level request, task, runner, cache, and model-mode fields:

wf evaluate \
  --results-path tmp/results.jsonl \
  --metric artifact_count \
  --required-artifact video \
  --output-dir tmp/worldfoundry_evaluate \
  --json

5. Import official-shaped benchmark results

wf zoo benchmark-run \
  --benchmark-id <benchmark-id> \
  --mode official-validation \
  --official-results-path /path/to/official-results.json \
  --generated-artifact-dir /path/to/generated-artifacts \
  --output-dir tmp/<benchmark-id>/official-validation \
  --json

Benchmark-specific inputs such as data roots, score directories, prompt manifests, judge credentials, and metric subsets live on the corresponding Benchmark Hub page.

Some official runners execute upstream code pinned by the catalog (repo_url, repo_revision, repo_subdir) instead of a vendored copy. The runner fetches that revision into ${WORLDFOUNDRY_CACHE_DIR}/sources/<benchmark-id>/<revision> on first use; prefetch it while online with:

wf zoo benchmark-fetch \
  --benchmark-id camerabench \
  --json

To run an existing checkout of that revision instead, point the benchmark's runtime_root_env variable, such as WORLDFOUNDRY_CAMERABENCH_RUNTIME_ROOT, at its repo_subdir directory.

For HarnessEval-W, --result-model-id selects a model without changing the official common-case cohort. See HarnessEval-W for Python execution, cached scoring and model prerequisites.

6. Replay native Wan execution and request batches

From a checkout with local checkpoints:

python -m benchmarks.inference.wan_execution_preparation \
  --checkpoint /path/to/Wan2.1-T2V-1.3B \
  --output-dir tmp/wan-execution --request-batching

--request-batching adds A/B, B/A, A/B batches to the singleton comparison. Select wan2.1-t2v-1.3b, wan2.2-t2v-a14b, wan2.2-ti2v-5b or wan2.2-i2v-a14b with --model-id. Image-conditioned replays require --images IMAGE_A IMAGE_B.

Dense references are mandatory and the latent/RGB quality limits apply. Reports include warmup time/memory and matched two-request diagnostic throughput comparisons. Require both complete and passed in report.json; timing is diagnostic, not an isolated performance result. See Inference optimization for compile, Graph, precision and batch compatibility.

Benchmark modes

  • official-run — Execute the benchmark runtime declared by the manifest against prepared artifacts. Use only when the required evaluator, data, checkpoints, and services are ready.
  • official-validation — Import official-shaped results through the benchmark runner and record framework integration evidence.
  • normalizer — Normalize provided result files into WorldFoundry artifacts without claiming that WorldFoundry executed the official scorer.
  • contract — Exercise wiring/contracts only. It is not scoring evidence and cannot be leaderboard evidence.

A successful command is not automatically a leaderboard result

Read score_valid, leaderboard_valid, normalizer_only, fidelity, and blocker fields in scorecard.json. Exit code 0 only means the requested CLI operation completed under its contract.

Outputs and reproducibility

Global logging flags are accepted before or after the subcommand. They override the corresponding environment values described in Environments → Logging:

wf --log-level DEBUG --log-json \
  --log-file tmp/worldfoundry.log zoo models --json

Flag

  • --log-level

    Env WORLDFOUNDRY_LOG_LEVEL

    One of DEBUG, INFO, WARNING, ERROR, or CRITICAL; default INFO.

  • --log-file

    Env WORLDFOUNDRY_LOG_FILE

    Optional rotating file sink.

  • --log-json

    Env WORLDFOUNDRY_LOG_JSON

    JSON Lines for the file sink; console output stays text.

Commands that own an output directory create a run id and, unless a file sink was selected explicitly, write lifecycle events to a per-run events.jsonl. This is normally below <output-dir>/logs/<run-id>/; commands that exclusively claim their output directory use an isolated sibling log directory instead. Framework-owned child processes inherit the structured WORLDFOUNDRY_LOG_CONTEXT value.

Evaluation commands write durable files below --output-dir. Exact benchmark-owned extras vary, but the shared run surface uses these artifacts:

  • run_manifest.json — Resolved run identity, status, counts, paths, cache evidence, and execution metadata.
  • requests.jsonl / results.jsonl — Per-sample inputs and normalized generation results when that runner materializes ledgers.
  • metrics/summary.json — Aggregate metrics and failure counts.
  • artifacts.jsonl — Optional index of generated artifacts; disable with --no-artifacts-index where supported.
  • scorecard.json — Metrics, fidelity, eligibility, leaderboard state, and blockers.
  • summary.json / report.md — Compact reporting views when the selected runner emits them.
  • suite_manifest.json / suite_report.md — Matrix identity and aggregate report for suite runs, plus one child directory per cell.

Keep the command, environment/profile identity, catalog revision, and output directory together when reproducing a score. See Validation for schema checks and release evidence.

For deterministic model outputs, configure the generation cache explicitly:

wf run \
  --suite <suite-id> \
  --generation-cache-dir tmp/generation-cache \
  --generation-cache-mode read-write \
  --output-dir tmp/worldfoundry_suite \
  --json

The cache uses SQLite plus audit.jsonl; hits are recorded in the run manifest. Cache reuse does not override model or benchmark compatibility checks.

Automation conventions

  • Put --json on the leaf command: wf zoo models --json.
  • Repeat list flags instead of comma-joining unless that command explicitly accepts comma-separated values: for example, --metric a --metric b and --model a --model b.
  • KEY=VALUE flags such as --model-parameter, --model-runtime, --benchmark-parameter, and --env parse JSON-compatible values where documented by --help.
  • Use stable catalog IDs in scripts. Aliases are convenient interactively, but canonical IDs make stored commands easier to audit.
  • Use NO_COLOR=1 for plain redirected help, or FORCE_COLOR=1 to keep ANSI color in a compatible terminal capture.
  • Do not parse human tables. Use a command's --json output or the durable files under --output-dir.
  • Add --fail-on-sample-error when partial sample failure must fail a batch or CI job.

Exit status

  • 0 — The requested operation completed. Inspect the output contract for score/leaderboard validity.
  • 1 — A validation, metric, sample, prepared intent, or run result failed under a command that distinguishes domain failure.
  • 2 — Invalid CLI input, missing required files/environment, preflight failure, or another execution/setup error.
  • 130 — Interrupted with Ctrl+C.

Individual commands document stricter behavior in --help. Flags such as --fail-on-issue, --fail-on-sample-error, and --fail-on-skipped intentionally change when non-success exits are returned.

Next steps