Commands
2,171 words9 min read16 subsectionsFrom the README at ft 0.15.21
On this page16
Watcher management
ft watch # start watcher in background
ft watch --foreground # run in foreground
ft watch --auto-handle # enable auto workflows
ft stop # stop running watcher
Pane inspection
ft status # overview of observed panes
ft status --health # health view with operator next steps
ft show <pane_id> # detailed pane info for a live pane
ft get-text <pane_id> # recent output from pane
Pane actions
ft send <pane_id> "<text>" # send input (policy-gated)
ft send <pane_id> "<text>" --dry-run # preview without executing
ft send <pane_id> "<text>" --wait-for "ok" # verify via wait-for
ft send <pane_id> "<text>" --no-paste --no-newline
# Default = the text as one bracketed paste, then a typed Enter that submits it
# (agent composers and shell prompts alike). --no-paste types the characters
# instead; --no-newline leaves out the Enter. The receipt reports the mode as "no_paste".
Search
ft search "<query>" # full-text search
ft search "<query>" --pane 0
ft search "<query>" --limit 50
Explainability
ft why --list # list explanation templates
ft why deny.alt_screen # explain a common policy denial
ft why FT-1001 # explain the error code an error message names
Attention console
ft attention ranks what needs an operator or agent next, without changing
anything. Without --input it reads live sources:
- the watcher's operating envelope;
- policy denials and approval holds from the last 24 hours of the audit log;
- verified-submit profile drift;
- unhandled warning and critical detection events;
- operator pane holds;
- watcher crash bundles from the last day;
- a failed or compensating mission transaction.
Each item carries its reasons, a safe next action and a mute key. MCP
wa.attention with live: true reads the same database sources, but not the
watcher envelope, crash bundles or the transaction contract. The JSON contract is in
docs/robot-contracts/attention-router.md.
ft attention status # scored snapshot and source health
ft attention next # the highest-priority safe next action
ft attention explain # why the next item ranks first
ft robot attention next # the same, as a robot envelope
ft mute add <identity_key> # stop one item resurfacing (the key is in its summary)
Workflows
ft workflow list
ft workflow run handle_usage_limits --pane 0
ft workflow run handle_usage_limits --pane 0 --dry-run
ft workflow status <execution_id> -v
Security model: source-pane trust scope (ft-j0ufc). Workflows fire when a detection pattern matches a pane's output. By default any pane may fire any workflow. That default is convenient when every pane is operated by the same trust principal and dangerous when a low-trust pane shares a runtime with a high-trust pane. Workflows that act on high-trust panes should declare an allowlist via Workflow::trigger_policy():
fn trigger_policy(&self) -> WorkflowTriggerPolicy {
WorkflowTriggerPolicy::allowlist([trusted_pane_id])
}
The runner enforces the allowlist before any lock, audit row, or engine state is created; refused triggers surface as WorkflowStartResult::SourcePaneNotTrusted and the originating source_pane_id is recorded on the workflow's persisted trigger context for post-incident forensics. The default policy (allow_all()) preserves pre-ft-j0ufc behavior.
Mission & Tx control
ft mission plan # validate mission contract + compute hash
ft mission run # advance lifecycle into execution
ft mission status # lifecycle + assignment summary
ft mission explain # legal lifecycle transitions
ft mission pause # canonical lifecycle transitions
ft mission resume
ft mission abort
ft mission objective-plan --objective "<text>" # read-only objective planner (ft-auy2g)
ft tx plan # validate tx contract + summarize lifecycle
ft tx run # prepare + commit, deterministically
ft tx run --fail-step tx-step:commit
ft tx rollback # compensation for committed steps
ft tx show --include-contract # receipts and full tx payload
The mission objective planner reads the requested objective and a caller-supplied capacity posture (--capacity-posture, default admit), ranks the candidate work, and prints a deterministic plan artifact. It does not query the operating envelope (ft swarm envelope does), and planning is side-effect-free: nothing is spawned, sent, or stored. See Operating Envelope below.
Rules
ft rules list # list detection rules
ft rules test "Usage limit reached" # test text against rules
ft rules show codex.usage.reached # show rule details
ft robot rules lint --fixtures --strict # validate the pack (naming + regex safety + fixture coverage)
Audit & approvals
ft approve AB12CD34 --dry-run # check approval status
ft audit --limit 50 --pane 3 # filter audit history
ft audit --decision deny # only denied decisions
Diagnostics
ft triage # summarize issues (health/crashes/events)
ft diag bundle --output /tmp/ft-diag # collect diagnostic bundle
ft reproduce export --kind crash # export latest crash bundle
ft doctor # environment health check
ft doctor --json # machine-readable diagnostics
ft proof-doctor --bead <id> -- <cmd> # check a proof command's RCH-required shape (does not run it)
Attestation
ft attestation verify docs/attestations/<version>.json
ft attestation verify docs/attestations/<version>.json --json
ft attestation verify docs/attestations/<version>.json --strict-required
ft attestation show docs/attestations/<version>.json
Bundled demo scenarios
ft demo is the side-effect-free onboarding and regression surface for the
bundled demo-lab fixtures. It validates the manifest-backed scenarios
(quickstart, usage_limit, and compaction) and reports retained artifact
links and follow-up simulation commands without sending input to live panes,
repairing Agent Mail, mutating RCH workers, or claiming production-capacity
proof.
ft demo # list available demos
ft demo quickstart # validate one demo scenario
ft demo quickstart --format json # machine-readable JSON
ft demo quickstart --format toon # machine-readable TOON
ft demo quickstart --manifest fixtures/demo-lab/manifest.v1.json
ft simulate validate fixtures/demo-lab/scenarios/quickstart.yaml --json
ft simulate run fixtures/demo-lab/scenarios/quickstart.yaml --speed 1
The retained artifacts live under fixtures/demo-lab/ and are indexed in
docs/demo-scenarios.md. They prove deterministic
fixture and CLI/simulation command contracts only; they do not prove remote
Cargo, target-class capacity, live-pane mutation, or production-scale behavior.
Web API (feature-gated)
Run ft web (the web feature is in default builds) to expose a local HTTP surface on 127.0.0.1:9999 by default. Builds before 2026-11 used port 8000. Set [tuning.web] default_port in ft.toml, or pass --port, to choose another.
ft web
curl http://127.0.0.1:9999/health
curl http://127.0.0.1:9999/panes
curl -N http://127.0.0.1:9999/stream/events
curl -N "http://127.0.0.1:9999/stream/deltas?pane_id=3&max_hz=50"
Streaming query parameters: pane_id filters to one pane; max_hz caps delivery rate for backpressure control; /stream/events also accepts channel=all|deltas|detections|signals. Streaming responses use schema ft.stream.v1, send keepalive comments when idle, emit lag frames when a slow client misses events, and redact secret material before emission.
/stream/events reads persisted detections from the database in ascending ID order. Standalone ft web also tails the watcher's database every 250 ms to publish prompt wakeups; ft watch --web [--web-port N] receives wakeups directly from its watcher. Periodic storage reads repair missing wakeups in either mode, including when FT_WEB_STORAGE_TAIL=0 disables the standalone tail. The all and detections channels require event storage. The signals and deltas channels carry best-effort live bus traffic without durable resume cursors; /stream/deltas is the separate storage-backed output endpoint.
The first ready frame establishes an accepted durable checkpoint and includes its cursor in both data.cursor and the SSE id field. Each persisted detection then carries its own cursor. Browser EventSource reconnects send the most recently received value as Last-Event-ID; other clients can supply that exact value in the header or the cursor query parameter:
curl -N -H "Last-Event-ID: $CURSOR" \
"http://127.0.0.1:9999/stream/events?channel=detections&pane_id=7"
Treat these values as opaque tokens. Their versioned form is event-v1:<epoch>:all:<id> or event-v1:<epoch>:pane:<pane_id>:<id>, where the epoch binds the cursor to the database's retention history. Keep the same pane filter when resuming. Numeric legacy IDs and since_id bootstrap requests are rejected; begin a fresh subscription without a cursor to deliberately start at the current tail. A nonempty Last-Event-ID takes precedence over a URL cursor. Invalid tokens fail before streaming, and an expired cursor, changed database epoch, or unprovable retention interval produces an explicit discontinuity instead of silently resetting the position. Lifecycle, lag, and error frames do not overwrite the durable checkpoint. Delivery is at least once across reconnects; clients should deduplicate by cursor when necessary.
Browser fleet viewer (preview)
ft web --ui-dir <package> (or FT_WEB_UI_DIR, or ft watch --web --web-ui-dir <package>) also serves a read-only fleet viewer at /ui/: a FrankenTUI model compiled to WebAssembly, painted by the FrankenTerm WebGPU renderer from frankentui. It lists the recorded panes, shows recent and live detections from /stream/events, and marks the stream live, connecting or offline with the age of its data. Keys: 1/2 switch views, j/k move, r refetches, and Tab leaves the viewer for the page's buttons. It never writes to a pane.
RCH_CARGO_WRAPPER_BYPASS=1 scripts/build-browser-ui.sh /tmp/ft-ui # needs the wasm32 target and wasm-bindgen 0.2.128
ft web --ui-dir /tmp/ft-ui/site # then open http://127.0.0.1:9999/ui/
The build script fetches the renderer's last source revision from the frankentui repository, checks the archive's SHA-256, and builds it with the dependency lock vendored in crates/frankenterm-browser-ui/renderer.lock. The package's manifest.json records every file's SHA-256. At startup ft web reads exactly those files, checks each digest, and serves them from memory: a tampered or incomplete package stops startup, and no request path reaches the filesystem. The page carries a same-origin Content-Security-Policy. Browsers without WebGPU use the fleet viewer's native text view. tests/e2e/test_browser_fleet_viewer.sh drives a real headless Chrome against a viewer fed by the headless capture-and-detect smoke.
To require local browser sign-in, set an environment variable to a randomly generated access token of 32–256 visible ASCII characters, then pass its name to either server entry point:
ft web --ui-dir /tmp/ft-ui/site --auth-token-env FT_BROWSER_TOKEN
ft watch --web --web-ui-dir /tmp/ft-ui/site --web-auth-token-env FT_BROWSER_TOKEN
The viewer checks /auth/status before starting any data requests. Sign-in exchanges the operator token for an opaque HttpOnly, SameSite=Strict cookie; the token is never placed in a URL or browser storage. Sessions expire after one hour, with at most 16 concurrent sessions. Sign-out revokes that session, stops its stream producers, and clears the viewer, pane output and history results. Restarting the server revokes all sessions. Each session has an independent nonsecret epoch that binds reads and stream reconnects to the original viewer; a changed session starts with a fresh model and cursor. Health, session status and UI assets stay public; data routes and OpenAPI require a valid session.
Authentication is opt-in. With either token flag, Host and Origin checks require the actual loopback listener address and port, and a session stays bound to its original origin. This mode does not accept reverse-proxy or Tailscale origins, and does not qualify remote authenticated access. The pinned HTTP substrate still collapses duplicate raw header lines and does not provide a cancellation deadline for a blocked socket write; those transport requirements remain part of ft-xxfwy.55.3.
The server always refuses to bind any non-loopback address. Without a token flag, the existing unauthenticated local mode remains available. To forward that mode from a laptop, tablet or phone, put Tailscale Serve in front of it. Tailscale terminates HTTPS with the machine's tailnet certificate and accepts only devices on your tailnet:
ft web --ui-dir /tmp/ft-ui/site &
tailscale serve --bg 9999 # then open https://<this-machine>.<tailnet>.ts.net/ui/ on any tailnet device
tailscale serve status # show what is shared
tailscale serve --https=443 off # stop sharing
In this unauthenticated forwarding mode, everything ft web serves is readable from every device allowed by the tailnet rules. That includes captured pane output and history search. The streams redact the secrets they recognize, but the application does not authenticate the reader. Use tailnet access rules to restrict access. Never use tailscale funnel: it publishes to the whole internet. The milestones still open in ft-browser-frankenterm-7z4il are authenticated tailnet access, terminal attach, and DSR packaging.
ft web runs no capture pipeline of its own. Its storage tail follows newly persisted events rows written by the watcher and republishes wakeups on its in-process bus. Subscriptions always obtain detection content and ordering from storage, so a delayed or reordered wakeup cannot skip an earlier row. The tail starts after existing history; explicit subscription cursors control replay. Embedders that publish to the same bus in-process can disable the extra wakeup tail with WebServerConfig::with_storage_event_tail(false).
Session persistence
ft snapshot save # persist a bounded mux metadata projection
ft snapshot list # list recent snapshots
ft snapshot inspect <id> # inspect snapshot contents
ft snapshot diff <id1> <id2> # compare pane-ID membership only
ft snapshot restore <id> --dry-run # metadata-only descriptor/status report
ft session list --limit 50 --offset 0 # bounded page of saved sessions
ft session show <session_id> --limit 50 --offset 0 # bounded checkpoint page
ft session doctor # health check for session persistence
ft session acknowledge-cleanup <attempt> --force # resume retention after an interrupted cleanup attempt that doctor reports
ft session dump # private, checksummed live pane-content/topology export
ft session verify-dump <path> # offline schema/checksum/private-file verification
ft session list-durable # discover continuously persisted cold-scrollback panes
ft session export-durable <id> # read-only export of one 32-hex durable pane ID
ft session recover <pane_uuid> # export a complete orphan transcript; never write it to a PTY
ft session recover <pane_uuid> --allow-partial # explicitly retain a reported partial salvage
ft session discard <pane_uuid> --force # remove only the leased data leaf; retain its lock inode
ft watch # start the persistence/observation lifecycle; may prune retained data
ft session dump lists the currently visible mux panes, reads each through the
bounded read-only mux API, then lists the topology again. It redacts pane text
and metadata, records per-pane SHA-256 digests, and writes a mode-0600 JSON
envelope under
~/.local/share/ft/mux-dumps/ by default. It refuses to overwrite a path,
rejects symlinked path components, fsyncs both the artifact and its containing
directory, verifies the persisted handle, and returns failure for a pane-read
error or changed topology fingerprint unless --allow-partial is explicit.
ft session verify-dump <path> revalidates the private regular-file shape,
schema, complete-publication marker, payload and artifact checksums, per-pane
text checksums and byte/line counts, aggregate limits, summary counters,
completeness, and the explicit non-restorable capability claims without
contacting a mux.
This is a pre-upgrade/crash-forensics safety artifact. It preserves observable
redacted text and bounded topology metadata. Pane text is captured sequentially,
not as one atomic point-in-time terminal snapshot; the schema says so explicitly.
It does not preserve live PTY file descriptors, process memory, shell/editor
internal state, terminal parser/render state, or running-agent continuity.
On mux servers, cold rows evicted from the hot terminal viewport are also persisted continuously under a stable pane UUID with checksummed styled-line records and crash-recoverable sequence authority. A rejected cold write retains the row in memory instead of silently dropping it. This protects scrollback, but it still does not make the current mux process replaceable: PTY and child ownership must move into the documented guardian before live upgrades can preserve running processes.
ft session list-durable validates and lists those per-pane manifests without
opening their content logs for write. ft session export-durable <id> performs
a bounded, read-only snapshot of the committed log prefix, rejects checksum,
identity, sequence, privacy, replacement-race, and resource-limit failures,
decodes the styled rows with the bounded codec, reapplies current redaction,
and creates a new private synchronized transcript without overwriting a prior
artifact. A final torn record is reported and excluded because it was never
durability-acknowledged. This export is historical output, never PTY input, and
is not an executable process checkpoint.
ft session recover is intentionally export-only. Historical terminal output
is output, not shell input: recovery never creates or splits a live pane and
never sends archive bytes through a PTY input channel. It preserves the
header-declared source-completeness result and refuses to publish an incomplete
source or a transcript with skipped records unless --allow-partial is
explicit. An authorized partial artifact reports complete: false and the
finite terminal reason; it is never promoted to a complete recovery. ft session discard --force holds the same recovery lease through descriptor- and
identity-checked unlink plus parent-directory synchronization. It deliberately
retains the private lock inode so a competing writer cannot create a second
flock authority while the operation is retiring.
Note: list-orphans, recover, and discard operate on the flat per-pane
mmap scrollback files under ~/.local/share/ft/scrollback/. No production
capture path writes those files today (the per-pane mmap writer is reserved,
see config.rs), so on a normal install these commands find nothing. Durable
cold scrollback from the mux server is read with list-durable /
export-durable instead.
All three flat-mmap orphan commands accept the same explicit recovery envelope:
--max-directory-entries, --max-file-bytes, --max-records,
--max-replay-chunks, --max-payload-bytes, and
--max-transcript-bytes. Defaults stay conservative. Operators who configured
a larger valid writer capacity can opt in up to the finite hard ceilings rather
than having that file become impossible to inspect or discard. Invalid limits
and operational scan/read/write/discard failures remain bounded and redacted in
JSON/TOON output and exit with status 2.
ft snapshot restore <id> --dry-run reads a bounded checkpoint descriptor and
prints a metadata-only descriptor/status report. It does not load a full restorable projection and
is not evidence that execution would succeed. Every non-dry snapshot restore,
on every platform, returns a finite unavailable diagnostic before database
resolution, process discovery, subprocess launch, or mux mutation. Robot
checkpoint rollback has the same boundary: dry-run planning only, with
non-dry execution returning robot.feature_not_available.
The executable layout restorer remains library/test substrate. That substrate can exercise a limited windows/tabs/splits/local-CWD projection and honor an explicit per-tab active-pane identifier when one is actually present, but the current pane-list-derived snapshot does not preserve durable tab order or a stable active-tab identity. It also does not establish mux-domain identity, workspace/window placement, historical scrollback, render state, process or agent continuity, titles, exact geometry, or full appearance.
ft restart execution is likewise deliberately unavailable: it fails closed
before locks, capture, process discovery, signals, spawning, or mux mutation
until one authenticated mux endpoint can be bound to an exact process
incarnation and verified relaunch receipt. The production ft watch startup
path runs the unclean-session detector and logs what it finds, but it does not
prompt or restore. Use snapshot/session commands for evidence inspection and
make any recovery changes manually.
The top-level [session] configuration table is entirely unsupported and is
rejected, including the retired session.restore_max_lines key. The retired
[snapshots.process_relaunch] table is also rejected; no production relaunch
or scrollback-replay setting exists.
Configuration
ft config show
ft config validate
ft config set <key> <value>
ft config export # TOML or JSON
For the full command matrix (human + robot + MCP), see docs/cli-reference.md. For the evidence model behind these support claims, see docs/ft-xbnl0-verification-contract.md. For GUI onboarding and WezTerm migration, see docs/frankenterm-gui-user-guide.md.