Skip to content

CLI

The fbay CLI lets you interact with flashbay boards from your terminal.

Source on GitHub

Installation

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

# or with Go
go install github.com/flashbay-dev/fbay-cli@latest

Authentication

Set your API key as an environment variable:

bash
export FLASHBAY_API_KEY=key_...

Or pass it per-command:

bash
fbay --api-key key_... status

Create API keys in the web UI under API Keys.

Commands

fbay status

Show available boards and your active sessions.

bash
fbay status

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

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

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

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

Global flags

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