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