SnapDog Update CLI
snapdog-update is a workstation and automation CLI for updating a remote SnapDog OS device through the snapdog-ctrl API. It supports signed RAUC bundle upgrades and a separately guarded raw-image recovery path.
Installation
Section titled “Installation”On macOS with Homebrew:
brew install snapdogrocks/tap/snapdog-updateSigned RAUC update
Section titled “Signed RAUC update”snapdog-update \ --url http://snapdog.local \ --file snapdog-os-pi4-0.10.4.raucbThe tool checks authentication and system health, validates the target board when it can infer both board models, uploads the bundle, triggers RAUC, follows installation progress, reboots the device, and verifies that the new slot booted. Supply an enabled control-panel password with --password or SNAPDOG_PASSWORD.
Automation
Section titled “Automation”snapdog-update \ --url http://snapdog.local \ --file snapdog-os-pi4-0.10.4.raucb \ --password "$SNAPDOG_PASSWORD" \ --non-interactive \ --no-progress \ --output jsonJSON output is newline-delimited on stdout; diagnostics and progress use stderr. SNAPDOG_URL can replace --url. The default overall timeout is 30 minutes and the default status-poll interval is 2 seconds; override them with --timeout-mins and --poll-secs.
Guarded raw-image flash
Section titled “Guarded raw-image flash”Uploading a raw .img or .img.gz requires --raw. The controller returns a short-lived challenge that must be confirmed explicitly:
snapdog-update --url http://snapdog.local --file snapdog-os-pi4-0.10.4.img.gz --rawsnapdog-update --url http://snapdog.local --raw --confirm-raw-flash CHALLENGEInteractive mode can accept the challenge in the same run. Non-interactive mode exits after upload so an operator or automation gate can approve the second command.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Update completed successfully. |
1 |
Validation, authentication, upload, installation, reboot, or verification failed. |
2 |
A raw image was uploaded and awaits explicit challenge confirmation. |
Run snapdog-update --help for the complete option list.