go-ring API Reference
Guides

Diagnostic CLI

Log in, choose a device, and run Ring commands from a terminal.

The go-ring CLI uses the public SDK. It stores login and push credentials in private files under your user configuration directory. The standalone CLI is available as v0.7.0. Install it with:

go install github.com/portpowered/go-ring/cmd/go-ring@v0.7.0

Log in and choose a device

Run this sequence in a POSIX shell. When prompted, paste an ID from the JSON array printed by devices list.

go-ring auth login
go-ring devices list
printf 'Device ID from the list: '
read -r DEVICE_ID
go-ring health "$DEVICE_ID"
go-ring auth logout

health reads device status. To change a device, use an explicit command such as go-ring siren "$DEVICE_ID" on. Commands report server acknowledgement; check the device before retrying a mutation whose response timed out. sound requires a chime device. See device operations and the device list contract.

Login prompts for your username, password, and a verification code when required. For scripted login, provide RING_PASSWORD and, when prompted, RING_OTP_CODE. The CLI does not print credentials during ordinary commands. auth status prints expiry information; auth refresh explicitly replaces saved tokens. auth export prints credential JSON, so protect its destination. auth logout removes the saved login and push credentials. See authentication and the OAuth exchange contract.

Put global options before the command. For example, go-ring --token-file ./tokens.json auth status selects a token file.

Events

go-ring events watch "$DEVICE_ID" --duration 60s listens for motion events. Use --ding to subscribe to ding events or --motion=false to disable motion subscriptions. Press Ctrl+C to stop early; the CLI closes the push session. Push credentials are saved beside the token file. An event appears only if it occurs during the watch window. See push notifications.

Advanced video diagnostics

go-ring snapshot "$DEVICE_ID" --output camera.jpg captures the first usable live video frame. It requires ffmpeg on PATH and does not call the legacy snapshot endpoint. See snapshots and intercom.

go-ring view "$DEVICE_ID" starts a receive-only WebRTC session. The preview requires ffplay from FFmpeg on PATH; add --player none to consume packets without a preview. Use --debug to report connection and PTZ state without logging tokens, SDP, or raw signaling payloads. --ice-servers file.json accepts a JSON array of Pion ICE servers. Arrow keys move the camera, Space stops continuous movement, and q or Ctrl+C closes the session. A disconnected session cannot guarantee that physical movement stopped.

For decoder debugging, go-ring view "$DEVICE_ID" --record-rtp camera.rtp writes incoming packets to a private file and refuses to overwrite an existing recording. The file contains camera footage. Convert it offline with go-ring replay-video camera.rtp --output camera.h264. See live sessions and SDP and ICE.

For local synthetic replay, --api-base, --oauth-base, --solutions-base, and --signaling-url override service origins. Plain HTTP and WS overrides are accepted only for loopback hosts.

On this page