CLI Reference¶
Complete reference for all otto command-line options.
Global options¶
These options are available on every otto command:
Option |
Env var |
Default |
Description |
|---|---|---|---|
|
|
(required) |
Lab name(s), comma-separated |
|
|
current dir |
Output directory for logs and artifacts |
|
|
|
Use field or debug products |
|
|
|
Number of days to retain logs |
|
|
|
Logging level |
|
|
|
Rich formatting in log files |
|
|
Verbose console output |
|
|
|
Preview without running commands |
|
|
current user |
Check reservations as USERNAME instead of the current user |
|
|
|
Bypass the reservation check entirely (emergency use only) |
|
|
List available lab names and exit |
||
|
List host IDs in the loaded lab and exit |
||
|
Print full lab details and exit |
||
|
Delete the shell-completion cache file and exit |
||
|
Show version and exit |
||
|
Install shell completion and exit |
||
|
Print shell completion script and exit |
||
|
Show help and exit |
Important
Option placement matters. Global options (including --lab/-l) must
appear before the subcommand — they are parsed by the top-level otto
command, not the subcommand. For example:
✅
otto --lab my_lab run deploy --debug❌
otto run deploy --debug --lab my_lab
The same rule applies to --dry-run, --xdir, --log-level, and every
other option listed above. Subcommand-specific options (like --firmware
for a suite, or --interval for monitor) go after the subcommand.
otto run¶
Run registered instructions.
otto run <instruction> [OPTIONS]
otto run --list-instructions
Option |
Description |
|---|---|
|
List all available instructions and exit |
Each instruction defines its own options via Typer annotations. Use
otto run <instruction> --help to see them.
otto test¶
Run registered test suites.
otto test [PARENT OPTIONS] <Suite> [SUITE OPTIONS]
otto test --list-suites
Parent options (before the suite name)¶
Option |
Default |
Description |
|---|---|---|
|
List test suites with run syntax and exit |
|
|
|
Pytest marker expression (e.g. |
|
|
Repeat each test N times in one setup/teardown cycle |
|
|
Repeat tests for SECONDS in one setup/teardown cycle |
|
|
Minimum per-test pass rate percent in stability mode (0-100) |
|
auto |
JUnit XML output path |
|
off |
Collect gcov coverage from remotes after the run |
|
|
Override coverage destination (implies |
|
off |
Allow |
|
on |
Delete |
|
off |
Generate an HTML coverage report after the run (implies |
|
|
Override HTML report destination (implies |
|
off |
Allow |
|
|
Title shown in the HTML report header (with |
|
off |
Collect host performance metrics for the entire run |
|
|
Sampling interval for |
|
|
Override monitor data destination ( |
|
all hosts |
Regex restricting which hosts |
Each suite also defines its own options via its Options dataclass.
Use otto test <Suite> --help to see them.
otto host¶
Run commands, transfer files, log in, and invoke capability verbs on lab hosts.
otto host <HOST_ID> run [--sudo] [--timeout SECS] <COMMANDS...>
otto host <HOST_ID> put <SRC...> <DEST>
otto host <HOST_ID> get <SRC...> <DEST>
otto host <HOST_ID> login
otto host <HOST_ID> reboot [--hard] [--wait] [--timeout SECS]
otto host <HOST_ID> install [--stage-only]
otto host <HOST_ID> power [STATE]
otto host <HOST_ID> ls [PATH] [--all]
otto host --list-hosts
Subcommands¶
All otto host subcommands are synthesized from @cli_exposed host methods
using the same signature-driven mechanism — run, put, get, and login
included. The full set varies by host class; run otto host <HOST_ID> --help
to see what is available for a specific host.
Subcommand |
Description |
|---|---|
|
Execute one or more commands on the host |
|
Upload local files to the host |
|
Download files from the host |
|
Open an interactive shell session on the host |
|
Reboot the host (soft or hard power-cycle) |
|
Power off the host from its own shell |
|
Turn the host on/off or toggle (requires a power controller) |
|
Stage products onto the host without installing |
|
Stage then install products |
|
Uninstall products |
|
Exit 0 if all products are installed |
|
Exit 0 if no products are installed |
|
Exit 0 if a path exists on the host |
|
List directory contents on the host |
|
Create a directory on the host |
|
Remove a path on the host |
|
Copy a path on the host |
|
Move/rename a path on the host |
|
Print a file’s text contents |
|
Write text to a file on the host |
See Host capabilities for class-scoping rules and which verbs each host type exposes.
run options¶
otto host <HOST_ID> run [OPTIONS] COMMANDS...
Option |
Description |
|---|---|
|
One or more shell commands (space-separated, each quoted as needed) |
|
Run every command through |
|
Cumulative timeout in seconds across all commands |
put / get arguments¶
otto host <HOST_ID> put SRC... DEST
otto host <HOST_ID> get SRC... DEST
SRC... is one or more source paths (space-separated); DEST is the
destination directory. For put, sources are local paths; for get, sources
are remote paths.
reboot options¶
otto host <HOST_ID> reboot [--hard] [--wait] [--timeout SECS]
Option |
Default |
Description |
|---|---|---|
|
|
Power-cycle via the power controller instead of an in-shell reboot |
|
|
Block until the host is reachable again after reboot |
|
|
Maximum seconds to wait when |
install options¶
otto host <HOST_ID> install [--stage-only]
Option |
Description |
|---|---|
|
Transfer products but skip the install step |
Host-level options¶
Option |
Description |
|---|---|
|
Host ID to operate on (see |
|
Route through an intermediate SSH hop host |
|
Override the terminal protocol for this session |
|
Override the file transfer protocol for this session |
|
List all available host IDs and exit |
otto monitor¶
Launch the interactive performance dashboard.
otto monitor [OPTIONS]
Option |
Default |
Description |
|---|---|---|
|
all hosts |
Regex matched against host IDs via |
|
|
Collection interval (minimum 1.0) |
|
Load historical data from |
|
|
Persist live data to SQLite for later viewing |
Docker container hosts are excluded from the default monitored fleet.
otto cov¶
Generate multi-tier HTML coverage reports from otto test --cov output
directories. This is the report half of the coverage workflow — the
collect half is otto test --cov (see below). For the full
walkthrough, prerequisites (lcov/gcov), and tier recipes, see the
coverage guide.
otto cov report <OUTPUT_DIR...> [OPTIONS]
report is currently the only otto cov subcommand.
Arguments¶
Argument |
Description |
|---|---|
|
One or more |
Options¶
Option |
Default |
Description |
|---|---|---|
|
|
Directory for the generated HTML report ( |
|
|
Title shown in the HTML report header |
|
|
Add a coverage tier; repeatable. See tier rules below. |
Tiers¶
A tier is a named layer of coverage data. --tier is repeatable, and
the order of flags is the precedence order — the first tier is
highest precedence and wins row coloring on the annotated source view.
--tier system(no path) — the implicit tier built by merging the suppliedOUTPUT_DIR.gcdafiles withlcov. Only thesystemtier may omit a path.--tier NAME=PATH— any other tier;PATHmust be a pre-existing lcov-format.infotracefile. A non-systemtier without a path is rejected.Duplicate tier names are rejected.
If no
--tierflag is given, the report defaults to a singlesystemtier.
Examples¶
otto cov report runs/2026-05-16_T1200/ --report ./report
otto cov report run_a/ run_b/ run_c/ --report ./combined
otto cov report runs/ --tier unit=unit.info --tier system --tier manual=manual.info
On success, otto logs the overall coverage percentage, the file count,
and the path to index.html. If no valid coverage data is found in the
supplied directories, the command logs an error and exits non-zero.
Collecting coverage (otto test --cov)¶
otto cov only generates reports — it consumes cov/ directories
produced by a prior otto test run. Collect coverage with the --cov
family of options on otto test:
Option |
Description |
|---|---|
|
Fetch |
|
Write coverage artifacts to an explicit directory (implies |
|
Allow |
|
Delete stale |
|
Also render the HTML report inline after the run (implies |
|
Explicit destination for the inline HTML report (implies |
See the otto test section above for the full option
table, and the coverage guide for end-to-end examples.
otto docker¶
Build images and orchestrate compose stacks on docker-capable lab hosts.
otto docker build [--repo NAME] [--on HOST] [--rebuild] [<IMAGE>...]
otto docker up [--repo NAME] [--on HOST] [--no-build]
otto docker down [--repo NAME] [--on HOST]
otto docker ps [--on HOST]
Docker subcommands¶
Subcommand |
Description |
|---|---|
|
Build container images |
|
Bring compose stacks up |
|
Tear compose stacks down |
|
List running containers on docker-capable hosts |
Docker options¶
Option |
Applies to |
Description |
|---|---|---|
|
|
Restrict to a single repo by name |
|
all |
Lab host id to operate on (default: all docker-capable hosts) |
|
|
Force rebuild even if a context-hash tag exists |
|
|
Skip the implicit build step before compose up |
|
|
Image names to build (default: all) |
otto reservation¶
Inspect and verify lab reservations.
otto reservation whoami
otto reservation check
Reservation subcommands¶
Subcommand |
Description |
|---|---|
|
Show the resolved reservation identity and backend |
|
Verify the current reservation for the loaded lab |