The command line
tpi controls a board from a shell. Upstream ships it; this fork extends it to
reach the endpoints the fork added, which until 1.1.0 were reachable only
from the web interface.
That gap mattered more than it sounds. On a headless rack the CLI is what you script and put in a runbook; the interface is what you open when you are already looking at the machine. Shipping a feature to the browser alone means shipping it to the half of the workflow that cannot be automated.
What 1.1.0 adds
Section titled “What 1.1.0 adds”| command | what it does |
|---|---|
tpi firmware list |
every version this board could install, across all sources |
tpi firmware install <version> |
install one of them |
tpi firmware check |
is there anything newer |
tpi firmware sources |
where the board looks |
tpi about |
firmware, bmcd, kernel, board identity |
tpi thermal |
temperatures |
tpi hostname [<name>] |
the board's name, live and after the next boot |
tpi ntp show | set <servers…> |
the time sources, and how the clock is doing |
tpi config export | import |
every setting on the board, as one file |
tpi firmware --file X still works and still means upload. It is upstream's
documented spelling and is already in people's scripts, so firmware grew
subcommands around it rather than replacing it.
What 1.3.0 adds
Section titled “What 1.3.0 adds”tpi cooling is upstream's command; 1.3.0 gives it the two flags that make
it mean something on a board whose fan is governed by the kernel.
| flag | what it does |
|---|---|
cooling set <device> <step> --hold |
pause the zone's governor so the step stays |
cooling set <device> --auto |
hand the fan back to the governor |
Without --hold the command means what it always did: write the step and let
the governor overrule it a few seconds later.
$ tpi cooling set "system fan" 6 --hold$ tpi cooling status|----Device-----|-Speed-|-Max Speed-|-Governor-||system fan | 6| 6| paused|The Governor column reads -, not running, against a daemon older than
bmcd 2.21 — that daemon does not report the field, and "the governor is
running" is the one thing the column exists to say.
Listing and installing
Section titled “Listing and installing”$ tpi firmware listrunning v2.9.0
VERSION SOURCE TRUST SIZE= v2.9.0 fork verifiedv v2.8.1 fork verifiedv v2.8.0 fork verified^ v2.9.2 local unverified 37.2 MB
^ newer = running v older ? not comparableThe trust column is not decoration. verified means the release published
a checksum and it was checked on download. tls-only means the publisher
ships no checksums at all — upstream's HTTP mirror does not. unverified
is a local file, whose provenance is whatever put it there. Three genuinely
different things, and rendering them alike would be worse than omitting the
column.
$ tpi firmware install v2.9.2 --yesDonestaged v2.9.2; reboot to take it
$ tpi firmware listrunning v2.9.0staged v2.9.2 (reboot to take it)The version is resolved against the catalogue before anything is posted, so a version no source offers fails immediately rather than half-way through a download. If two sources offer the same version, it names them and asks rather than guessing.
Exit codes that mean something
Section titled “Exit codes that mean something”$ tpi firmware checkv2.9.0 is current
$ echo $?0When there is something newer it names it and exits 10 instead:
10 means an upgrade exists, so tpi firmware check || notify-me works from
cron without parsing output. It is deliberately not 1, which stays "the
command failed".
Two builds, one source
Section titled “Two builds, one source”tpi ships twice, and the difference is worth knowing before you wonder why
the one on the board never asks for a password.
| on the board | on your workstation | |
|---|---|---|
| arrives via | a firmware upgrade | a release binary or the AUR |
| features | localhost,native-tls |
default |
| talks to | 127.0.0.1 |
whatever you point it at |
| authentication | skipped — it is already root-local | prompts, then caches a token |
| version vs bmcd | always matched; they ship together | floats independently |
Being a release behind is normal
Section titled “Being a release behind is normal”Because the workstation copy updates on its own schedule, it will regularly be older or newer than the board it is pointed at. That used to produce:
Invalid `type` parameter firmware_availablewhich names the query parameter tpi sent and tells you nothing. Now each
command asks the board its version first:
$ tpi firmware listthis board runs bmcd 2.7.0; `tpi firmware list` needs 2.8.0 or newer --upgrade the firmware first (`tpi firmware check`)Installing
Section titled “Installing”Release binaries are built for five targets — Linux (x86-64, aarch64), macOS (Intel and Apple silicon) and Windows — plus Debian packages for both Linux architectures, on the releases page.
The copy on the board needs nothing: it arrives with the firmware.