Skip to content

CLI

The srig CLI lets you interact with SiliconRig boards from your terminal.

Source on GitHub

Installation

bash
# macOS / Linux
curl -fsSL https://siliconrig.dev/install.sh | sh

# or with Go
go install github.com/siliconrig/srig-cli@latest

Authentication

Set your API key as an environment variable:

bash
export SRIG_API_KEY=key_...

Or pass it per-command:

bash
srig --api-key key_... status

Create API keys in the web UI under API Keys.

Commands

srig status

Show available boards and your active sessions.

bash
srig status

srig 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 end

srig 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_xxxxxxxxxxxx

srig 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.txt

Press 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 end

Global flags

FlagDescription
--api-keyAPI key (overrides SRIG_API_KEY)
--base-urlAPI base URL (default: https://api.srig.io)
--jsonOutput as JSON (for CI/CD pipelines)