srig-cli

command module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

srig-cli

CLI tool for the siliconrig Hardware-as-a-Service platform.

Flash firmware, open serial terminals, and run CI/CD tests on real embedded boards — all from your terminal.

Install

curl -fsSL https://siliconrig.dev/install.sh | sh

Or download a binary from Releases, or build from source:

go install github.com/raws-labs/srig-cli@latest

Authentication

export SRIG_API_KEY=key_...

Or pass --api-key to any command.

Commands

srig status                        Show board availability
srig session create --board TYPE   Start a session
srig session list                  List your sessions
srig session end [ID]              End a session (auto-detects active)
srig flash <firmware>              Flash firmware to the board
srig run <firmware> --board TYPE   Flash, watch serial, and assert — one-shot, CI-ready exit code
srig serial                        Open serial terminal (Ctrl+] to exit)
srig power-cycle                   Power cycle the board
srig whoami                        Show your account info
srig version                       Print CLI version

srig flash accepts a raw .bin (all boards), a .uf2 (rp2350), or — for STM32 boards — an .elf / Intel .hex, auto-converted client-side to a raw image before upload (must be linked at the 0x08000000 flash base).

srig run

Create a session, flash, watch serial output for a pass/fail condition, then end the session — all in one command, with an exit code your CI can act on directly:

srig run firmware.bin --board esp32-s3 --expect "All tests passed"

A serial line ##srig-exit:N## sets the exit code to N directly; otherwise --fail (regex) fails the run immediately, and --expect (regex) must match before --timeout (default 60s). Exit codes: 0 pass, 1 test failed/timeout, 2 infrastructure error, 130 interrupted. Use --retries / --retry-delay to ride out transient infra failures (e.g. no free board) — test failures are never retried. See srig run --help for all flags (--send, --log, --json, etc.).

Flags

Flag Env Description
--api-key SRIG_API_KEY API key
--base-url SRIG_BASE_URL API base URL (default: https://api.srig.io)
--json JSON output for scripting/CI

CI/CD Usage

- name: Flash and test
  env:
    SRIG_API_KEY: ${{ secrets.SRIG_API_KEY }}
  run: |
    srig session create --board esp32-s3
    srig flash firmware.bin
    srig serial --timeout 30s --log output.txt
    srig session end

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package firmware converts user-supplied firmware artifacts (ELF, Intel HEX, raw binary) into the flashable bytes the pod expects for a given board.
Package firmware converts user-supplied firmware artifacts (ELF, Intel HEX, raw binary) into the flashable bytes the pod expects for a given board.
Package runner decides pass/fail for `srig run` from streamed serial output.
Package runner decides pass/fail for `srig run` from streamed serial output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL