doctor_frankentui commands
doctor_frankentui is a single binary with six subcommands. Each
command has a canonical name and a legacy alias; both are accepted.
All commands accept --machine {auto, human, json} for CI output.
Source: crates/doctor_frankentui/src/cli.rs.
Invocation
# Standard invocation via cargo
cargo run -p doctor_frankentui -- <subcommand> [args…]
# Or the installed binary
doctor_frankentui <subcommand> [args…]
# Machine-readable output for CI
doctor_frankentui --machine json <subcommand> [args…]Subcommand topology
doctor_frankentui
├── replay (alias: capture) — single-profile replay
├── seed-demo — MCP bootstrap + demo seeding
├── migrate (alias: suite) — profile-matrix replay
├── certify (alias: doctor) — environment smoke test
├── report — HTML/JSON/plaintext synthesis
├── plan (alias: import) — import-intake planning
└── list-profiles — print built-in profile namesreplay (alias: capture)
Full replay/capture workflow for a single profile. Orchestrates
seed-demo bootstrap if requested, spawns a child replay through a
PTY or VHS, and writes a RunMeta + an evidence_ledger.jsonl under
the run root.
doctor_frankentui replay \
--profile modern \
--run-root /tmp/doctor_frankentui/replay \
--run-name run_001Primary artifacts: RunMeta JSON, evidence_ledger.jsonl, per-capture
tape/VHS files.
Prerequisites: cargo. Optional: tmux for observed-mode
captures.
seed-demo
MCP bootstrap and deterministic demo seeding. Health-checks the endpoint, retries with bounded backoff, and writes a deterministic endpoint/project/agent summary.
doctor_frankentui seed-demo \
--endpoint http://127.0.0.1:8787 \
--run-root /tmp/doctor_frankentui/seedPrimary artifacts: optional RPC log file, deterministic endpoint summary.
Prerequisites: cargo, an MCP server reachable at the configured
endpoint.
migrate (alias: suite)
Repeated replay runs across a profile matrix — the authoritative regression entry point. Synthesises a per-suite manifest with per-run trace IDs and a fallback index.
doctor_frankentui migrate \
--profiles modern,xterm-256color,tmux,dumb \
--run-root /tmp/doctor_frankentui/migratePrimary artifacts: suite summary.json, per-run trace IDs,
fallback index.
Prerequisites: cargo, python3 (for schema validation),
sometimes tmux when a profile demands mux observation.
certify (alias: doctor)
Environment and capture-stack certification. Runs a minimal smoke
capture, classifies degraded modes, optionally attaches a tmux fallback
session. Produces a doctor_summary.json and, when --full is
enabled, a complete capture-stack detail.
doctor_frankentui certify \
--full \
--run-root /tmp/doctor_frankentui/doctor \
--capture-timeout-seconds 45 \
--allow-degradedDoctorArgs (selected fields):
| Field | Default | Purpose |
|---|---|---|
binary | auto-detect | Path to the FrankenTUI demo binary. |
app_command | cargo run -q -p ftui-demo-showcase | Command used to spawn the demo. |
project_dir | /data/projects/frankentui | Working directory for the spawn. |
full | false | Run the complete certification, not the fast path. |
capture_timeout_seconds | 45 | Per-capture timeout. |
allow_degraded | false | Accept degraded mode as a pass. |
run_root | /tmp/doctor_frankentui/doctor | Artifact root. |
observe | None | Tmux to attach a mux session. |
tmux_session_name | unset | Named tmux session for observation. |
tmux_keep_open | false | Keep the mux session alive after the run. |
Exit codes:
0— healthy30—DEGRADED_CAPTURE_EXIT_CODE— ran, but the capture stack was degraded (e.g. no raw mode, mux-only).--allow-degradedcollapses this to0.- non-zero (other) — hard failure (build failed, demo crashed, etc.)
Primary artifacts: doctor_summary.json with status,
capture_stack_health, degraded_capture, degraded_reason,
fallback_error, capture_smoke_detail, capture_smoke,
app_smoke_summary, and (when observing) tmux_session +
tmux_pane_capture + tmux_pane_log.
Prerequisites: cargo. Optional: tmux for observed-mode.
report
Post-processing over completed suite runs. Aggregates per-run outcomes with trace IDs, synthesises HTML, JSON, and plaintext reports.
doctor_frankentui report \
--suite-root /tmp/doctor_frankentui/migrate \
--output-dir /tmp/doctor_frankentui/reportPrimary artifacts: report.html, report.json, report.txt.
Prerequisites: cargo. The suite root must already contain a
completed migrate / suite run.
plan (alias: import)
Import-intake planning and snapshot materialisation. Mostly
deterministic analysis — lower supervision value than the other
commands, useful when preparing new fixtures for import into
ftui-demo-showcase.
doctor_frankentui plan \
--import-root ./incoming_fixtures \
--output-dir /tmp/doctor_frankentui/planPrerequisites: cargo.
list-profiles
Print the built-in capture profile names. Useful before invoking
migrate --profiles ….
doctor_frankentui list-profilesRequired toolchain pieces, by command
| Command | cargo | python3 | jq | rg | cargo-llvm-cov | tomllib/tomli |
|---|---|---|---|---|---|---|
replay | yes | optional | — | — | — | — |
seed-demo | yes | — | — | — | — | — |
migrate | yes | optional | — | — | — | — |
certify | yes | — | — | — | — | — |
report | yes | — | — | — | — | — |
plan | yes | — | — | — | — | — |
scripts/doctor_frankentui_coverage.sh | yes | yes | — | — | yes | yes (3.11+ built-in) |
scripts/doctor_frankentui_determinism_soak.sh | yes | yes | yes | — | — | — |
scripts/doctor_frankentui_no_fake_gate.py | — | yes | — | yes | — | — |
scripts/doctor_frankentui_replay_triage.py | — | yes | — | — | — | — |
Python 3.11 ships tomllib in the stdlib; on 3.9/3.10 install
tomli via pip install tomli. The coverage script detects this
and errors out with a clear message if neither is available.
Machine mode
--machine json is mandatory in CI. It does three things:
- Emits structured JSON on stdout instead of ANSI-coloured text.
- Mirrors errors onto stderr as
{"error": {...}}so pipelines can distinguish. - Suppresses progress spinners and TUI-like output that would interleave with the log stream.
doctor_frankentui --machine json certify > /tmp/result.json