CLI
The srig CLI lets you interact with SiliconRig boards from your terminal.
Installation
bash
# macOS / Linux
curl -fsSL https://siliconrig.dev/install.sh | sh
# or with Go
go install github.com/siliconrig/srig-cli@latestAuthentication
Set your API key as an environment variable:
bash
export SRIG_API_KEY=key_...Or pass it per-command:
bash
srig --api-key key_... statusCreate API keys in the web UI under API Keys.
Commands
srig status
Show available boards and your active sessions.
bash
srig statussrig session
Manage sessions explicitly.
bash
# Create a session on an ESP32-S3 board
srig session create --board esp32-s3
# List your sessions
srig session list
# End a specific session
srig session end sess_xxxxxxxxxxxx
# End your active session (auto-detects)
srig session endsrig flash
Flash firmware to the board in your active session. If --session is not given, auto-detects your active session.
bash
# Flash to the active session
srig flash firmware.bin
# Flash to a specific session
srig flash firmware.bin --session sess_xxxxxxxxxxxxsrig serial
Open an interactive serial console. If --session is not given, auto-detects your active session.
bash
# Connect to the active session
srig serial
# Connect with a timeout (useful in CI)
srig serial --timeout 30s
# Save serial output to a file
srig serial --log output.txtPress Ctrl+] to disconnect. The session stays alive — reconnect or end it explicitly.
Typical workflow
bash
# 1. Reserve a board
srig session create --board esp32-s3
# 2. Flash your firmware
srig flash firmware.bin
# 3. Interact via serial
srig serial
# 4. Done — release the board
srig session endGlobal flags
| Flag | Description |
|---|---|
--api-key | API key (overrides SRIG_API_KEY) |
--base-url | API base URL (default: https://api.srig.io) |
--json | Output as JSON (for CI/CD pipelines) |