Roboflare
CLI

Command reference

Every beacon command, its flags, and the API path it calls.

Run beacon --help or any command with --help for clap-generated output. This page is the curated reference with the underlying API endpoint for each command.

Global flags

FlagEffect
--jsonEmit raw JSON instead of human-formatted output
--base-url <URL>Override the configured API base URL for this call
--helpPrint usage for the current command

beacon login

Opens your browser to sign in via Clerk and pick an org, then saves the resulting token to ~/.config/roboflare/credentials.toml. The CLI binds an ephemeral port on 127.0.0.1 to receive the one-time authorization code.

FlagDefaultNotes
--token <token>(browser flow)Skip the browser. Also reads BEACON_TOKEN.
--base-url <url>https://beacon-api.canlearn.workers.devPersisted alongside the token.
--portal-url <url>Same as --base-urlOverride when dashboard and API differ.
--no-browseroffPrint the authorization URL instead of opening.

beacon logout

Deletes the local credentials file. Does not revoke the token server-side.

beacon agent

Runs this machine as a Beacon robot agent — useful for demos and dev loops without shipping a separate agent binary.

SubcommandNotes
run [--enrollment-key …] [--name …] [--fresh] [--heartbeat-seconds N]Calls POST /agent/enroll (first run only), then opens WS /agent/ws and sends heartbeats until Ctrl-C. Identity is cached at ~/.config/roboflare/agent.toml. --fresh forces re-enrollment. Heartbeat default 10.
forgetRemoves the cached robot identity on this machine.

--enrollment-key also reads BEACON_ENROLLMENT_KEY. --backend-url overrides the URL stored at login. Auto-reconnects with exponential backoff (1s → 30s) when the connection drops.

beacon robots

SubcommandAPI callNotes
listGET /api/robotsAll robots in your org
inspect <id>GET /api/robots/<id>/healthLatest health snapshot
logs <id> [--follow]GET /api/robots/<id>/logs or WS /api/robots/<id>/logs/wsWithout --follow returns the latest batch. With --follow opens the live WebSocket stream until Ctrl-C; prints agent offline if the robot isn't connected.
timeline <id>GET /api/robots/<id>/timelineAudit timeline (connects, deploys, configs)

beacon releases

SubcommandAPI callNotes
listGET /api/releases
push <path> [--tag] [--notes] [--kind]POST /api/releasesReads the file to compute artifact_sha256 and artifact_size. --tag defaults to the filename stem, --kind defaults to container_image.

beacon deploy

beacon deploy <release> (--robot <id> | --fleet <id>) [--watch] [--scheduled-at <ts>] [--idempotency-key <uuid>]
FlagNotes
--robot <id> / --fleet <id>Required, mutually exclusive. Picks target_kind.
--watchAfter creating, polls /api/deployments/<id>/events every 2s until terminal status (applied, failed, rolled_back, cancelled).
--scheduled-at <rfc3339>Defers dispatch until the timestamp.
--idempotency-key <uuid>Pass the same value to safely retry. Defaults to a fresh UUIDv4.

Calls POST /api/deployments with the required Idempotency-Key header.

beacon configs

SubcommandAPI call
listGET /api/configs
set <key> <value> [--namespace] [--fleet <id> | --robot <id>]POST /api/configs and (if --fleet/--robot) POST /api/configs/deployments with an autogenerated idempotency key
deploymentsGET /api/configs/deployments
events <id>GET /api/configs/deployments/<id>/events

set parses <value> as JSON; if parsing fails it treats it as a string.

beacon sites

SubcommandAPI call
listGET /api/sites
create <name>POST /api/sites

beacon fleets

SubcommandAPI call
listGET /api/fleets
create <name> --site <id>POST /api/fleets
logs <id>GET /api/fleets/<id>/logs

beacon keys

SubcommandAPI call
listGET /api/enrollment-keys
new --site <id> --fleet <id> [--label] [--max-uses] [--expires-in-hours]POST /api/enrollment-keys. Response includes the raw rf_enroll_<hex> value — shown once.
revoke <id>POST /api/enrollment-keys/<id>/revoke

--expires-in-hours 0 sets the key to never expire.

Exit codes

  • 0 — success
  • non-zero — any error. The CLI prints a human message on stderr; pair with --json to capture the API response body.

Configuration files

~/.config/roboflare/credentials.toml — written by beacon login:

token    = "rf_user_..."
base_url = "https://beacon-api.canlearn.workers.dev"

~/.config/roboflare/agent.toml — written by beacon agent run on first enrollment, reused by subsequent runs:

backend_url  = "https://beacon-api.canlearn.workers.dev"
robot_id     = "..."
robot_token  = "rf_robot_..."
robot_name   = "warehouse-bot-01"
org_id       = "..."
site_id      = "..."
fleet_id     = "..."

Edit by hand to switch environments (staging, self-hosted), or just beacon login again with the new backend.

On this page