Client CLI
The nixstasis executable that runs on each managed device: a Cobra command tree that registers the device, runs the
polling loop, and manages Stary scripts. Installing it is covered in
Client Installation.
Owns
- The command tree under
packages/client/cmd/nixstasis/, rooted inmain.go. - Configuration loading through Viper (
internal/config):config.yamlfrom/etc/nixstasis, then$HOME/.config/nixstasis, then the working directory, or the file named byNIXSTASIS_CONFIG_FILE, overridden byNIXSTASIS_*environment variables. - A Go
runtime/traceflight recorder; when a command fails andNIXSTASIS_WRITE_TRACE_ON_ERROR=true, it writes the trace under the system temp directory innixstasis/.
Entry points
| Command | Purpose |
|---|---|
nixstasis register | Detects the device identity and registers it with the server (register.go). |
nixstasis poll | Runs the heartbeat loop: sends telemetry, runs server commands, reports results, and starts or stops FRP tunnels (poll.go). |
nixstasis script install <path> | Installs a Stary script. |
nixstasis script list | Lists installed scripts. |
nixstasis script remove <name> | Removes an installed script. |
nixstasis script test <path> | Runs a script and prints its YAML output. |
nixstasis script repl | Opens an interactive Starlark REPL with the Stary builtins. |
nixstasis frp-session | Hidden. Runs one FRP tunnel session with a timeout; started by the transient systemd unit (Client FRP Manager). |
nixstasis ssh-authorized-keys | Hidden. The sshd AuthorizedKeysCommand helper that prints a key only while it is authorized (Runtime Boundaries). |
Boundaries
- The commands are thin: identity, transport, scripts, commands, FRP, telemetry, inventory, command policy, and SSH
authorization live in the
internal/packages described on the other Client pages. registerandpolltalk to the server only through Client Transport.