CLI

Last updated on June 26, 2026

Learn how the TofuPilot CLI runs every subcommand for procedures, runs, units, stations, and the REST API from a single binary on macOS, Linux, and Windows.

The tofupilot CLI is a single binary that runs procedures locally, manages every resource through the REST API, and powers a factory Station when installed as a system service. You get one binary, one credential file, and a consistent flag layout across every subcommand.

Install

The CLI runs on macOS, Linux, and Windows, and you install it with a one-line script.

macOS / Linux
curl -fsSL https://tofupilot.sh/install | sh
Windows
$p = "$env:TEMP\tp-install.ps1"; irm https://tofupilot.sh/install.ps1 -OutFile $p; powershell -ExecutionPolicy Bypass -File $p; ri $p -EA 0

After install, run tofupilot --help to see every subcommand, or jump straight into tofupilot login to authenticate.

JSON output

Every command accepts the global --json flag, which switches output to machine-readable JSON on stdout. Errors become a {"type":"error","message":"..."} object on stderr, and tofupilot run --json emits an NDJSON event stream on stdout, one event per line.

json output
tofupilot runs ls --limit 5 --json

Environment variables

VariableEffect
TOFUPILOT_NO_UPDATESet to 1 or true to disable automatic update checks.
TOFUPILOT_LOCAL_UI_PORTOverrides the default loopback port of the operator UI server.

Framework detection

tofupilot run scans the procedure directory, picks the framework that fits, and runs the suite under a framework-specific connector that maps outcomes, Measurements, Logs, and Attachments to the dashboard.

The CLI walks the directory in a fixed order, and the first framework it recognizes wins.

procedure.yaml  →  TofuPilot Framework
openhtf in deps →  OpenHTF
pytest config   →  Pytest
.robot files    →  Robot Framework
main.py only    →  Plain Python

When a repo carries both an OpenHTF suite and pytest tests, OpenHTF wins because pytest is assumed to be unit-test tooling for the OpenHTF code. When a repo carries pytest tests next to .robot files, pytest wins for the same reason.

How is this guide?

On this page