> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.rhombus.community/llms.txt
> Use this file to discover all available pages before exploring further.

# Rhombus CLI

> Manage cameras, doors, alerts, sensors, and your entire Rhombus deployment from the command line — stitch video, monitor alerts, and chat with AI tooling.

The Rhombus CLI gives you direct terminal access to your entire Rhombus security platform — 60+ API resource categories, plus higher-level commands for video stitching, frame analysis, real-time alert monitoring, and AI-powered chat.

## Install

<Tabs>
  <Tab title="Homebrew (macOS/Linux)">
    ```bash theme={null}
    brew install RhombusSystems/tap/rhombus
    ```
  </Tab>

  <Tab title="Shell Script (macOS/Linux)">
    ```bash theme={null}
    curl -fsSL https://raw.githubusercontent.com/RhombusSystems/rhombus-cli/main/install.sh | sh
    ```

    On Linux, this automatically uses `.deb` or `.rpm` packages when a compatible package manager is detected.
  </Tab>

  <Tab title="PowerShell (Windows)">
    ```powershell theme={null}
    irm https://raw.githubusercontent.com/RhombusSystems/rhombus-cli/main/install.ps1 | iex
    ```
  </Tab>

  <Tab title="From Source">
    Requires Go 1.26+:

    ```bash theme={null}
    git clone https://github.com/RhombusSystems/rhombus-cli.git
    cd rhombus-cli
    make install
    ```
  </Tab>
</Tabs>

## Authenticate

<Tabs>
  <Tab title="Browser Login (Recommended)">
    ```bash theme={null}
    rhombus login
    ```

    Opens your browser for OAuth2 authentication, then creates and stores an API key locally. Supports both certificate-based (mTLS) and token-based auth.
  </Tab>

  <Tab title="Manual Configuration">
    ```bash theme={null}
    rhombus configure
    ```

    Prompts for an API key, output format, and endpoint URL. Use this when you already have an API key from the [Rhombus Console](https://console.rhombussystems.com/settings/api-management/).
  </Tab>

  <Tab title="Environment Variable">
    ```bash theme={null}
    export RHOMBUS_API_KEY=YOUR_API_KEY
    ```

    Overrides stored credentials. Useful for CI/CD pipelines and scripts.
  </Tab>
</Tabs>

### Profiles

Manage multiple accounts or environments with named profiles:

```bash theme={null}
rhombus login --profile staging
rhombus camera get-minimal-camera-state-list --profile staging
```

Credentials are stored in `~/.rhombus/credentials` (file permissions 600) and config in `~/.rhombus/config`.

## API Commands

62 resource commands are auto-generated from the Rhombus OpenAPI spec, covering the full API surface. The general pattern is:

```bash theme={null}
rhombus <resource> <operation> [flags]
```

### Common Examples

<CodeGroup>
  ```bash Cameras theme={null}
  # List all cameras
  rhombus camera get-minimal-camera-state-list

  # Get detailed camera state
  rhombus camera get-full-camera-state --camera-uuid YOUR_CAMERA_UUID
  ```

  ```bash Access Control theme={null}
  # List all doors
  rhombus door-controller get-doors-for-org

  # Grant access to a door
  rhombus door-controller grant-access --door-uuid YOUR_DOOR_UUID
  ```

  ```bash Alerts & Events theme={null}
  # List recent policy alerts
  rhombus event get-policy-alerts-v2

  # Get alert details with bounding boxes
  rhombus event get-policy-alert-details --alert-uuid YOUR_ALERT_UUID
  ```

  ```bash Locations & Users theme={null}
  # List locations
  rhombus location get-locations

  # List users in your org
  rhombus user get-users-in-org
  ```
</CodeGroup>

### JSON Input for Complex Requests

For endpoints with complex request bodies, use `--cli-input-json`:

```bash theme={null}
# Generate a parameter template
rhombus camera get-full-camera-state --generate-cli-skeleton

# Pass parameters as inline JSON
rhombus event get-policy-alerts-v2 --cli-input-json '{"maxResults": 10}'

# Pass parameters from a file
rhombus event get-policy-alerts-v2 --cli-input-json file://params.json
```

<Tip>
  Use `--generate-cli-skeleton` on any command to see all accepted parameters as a JSON template.
</Tip>

### Available Resources

The CLI covers 60+ resource categories including: access-control, alert-monitoring, audio-gateway, camera, climate, door-controller, doorbell-camera, elevator, event, event-search, export, face-recognition-person, integrations, location, lockdown-plan, occupancy, org, partner, permission, policy, report, rules, scene-query, schedule, search, sensor, user, vehicle, video, webhook-integrations, and more.

## Higher-Level Commands

Beyond direct API access, the CLI provides several powerful composite commands.

### Alert Management

```bash theme={null}
# Recent alerts (filter by camera name)
rhombus alert recent --camera "Front Lobby" --max 10

# Download alert thumbnail
rhombus alert thumb ALERT_UUID --output thumb.jpg

# Download alert video clip
rhombus alert download ALERT_UUID --output clip.mp4

# Open alert clip in browser
rhombus alert play ALERT_UUID
```

### Live Footage

```bash theme={null}
# Open live view for a camera (by name)
rhombus footage "Front Lobby"

# Jump to a specific time
rhombus footage "Front Lobby" --start "5m ago"
rhombus footage "Front Lobby" --start 1711900800000
```

Starts a local HTTP server with an authenticated player and opens your browser.

### Real-Time Alert Monitoring

```bash theme={null}
# Stream policy alerts as they fire
rhombus monitor

# Include all event types (not just policy alerts)
rhombus monitor --all-events

# JSON output for piping to other tools
rhombus monitor --json
```

Connects via WebSocket (STOMP protocol) with automatic reconnection. Pipe `--json` output to `jq` for filtering:

```bash theme={null}
rhombus monitor --json | jq 'select(.deviceName == "Lobby Camera")'
```

### Video Stitching

Combine footage from multiple cameras into a single grid-layout video. Requires `ffmpeg`.

```bash theme={null}
# Stitch events across cameras at a location
rhombus stitch --location "HQ" --start "2h ago" --end "1h ago"

# Specific cameras with buffer time
rhombus stitch --camera "Entrance" --camera "Lobby" --start "30m ago" --buffer 5
```

Creates an MP4 with timestamp overlays from events across selected cameras.

### Frame Analysis

Extract intelligently-sampled frames with activity detection metadata — useful for ML pipelines.

```bash theme={null}
# Analyze frames from an alert
rhombus analyze alert ALERT_UUID

# Analyze footage across cameras at a location
rhombus analyze footage --location "HQ" --start "1h ago" --end "30m ago"

# Include motion metadata, output raw frames
rhombus analyze footage "Lobby Cam" --start "2h ago" --include-motion --raw
```

### Deployment Context

Generate a structured snapshot of your entire deployment — locations, cameras, hardware info, coordinates, and current stills.

```bash theme={null}
# Full deployment snapshot
rhombus context generate

# Specific location or camera
rhombus context location "HQ"
rhombus context camera "Front Lobby"
```

### AI Chat (Rhombus MIND)

Natural language interface to your Rhombus deployment. The chat agent can execute CLI commands on your behalf.

```bash theme={null}
# Interactive chat
rhombus chat

# Voice-powered chat (requires sox and whisper-cpp)
rhombus voice --model base
```

<Note>
  Voice mode requires [sox](https://sox.sourceforge.net/) for audio capture and [whisper-cpp](https://github.com/ggerganov/whisper.cpp) for speech-to-text.
</Note>

## Global Flags

| Flag             | Description                                              |
| ---------------- | -------------------------------------------------------- |
| `--profile`      | Configuration profile (default: `"default"`)             |
| `--output`       | Output format: `json`, `table`, `text` (default: `json`) |
| `--api-key`      | Override API key for this command                        |
| `--endpoint-url` | Override API endpoint URL                                |
| `--partner-org`  | Client org name or UUID (for partner accounts)           |

## Partner Accounts

For partner/multi-tenant organizations, use `--partner-org` to operate on client orgs:

```bash theme={null}
rhombus camera get-minimal-camera-state-list --partner-org "Acme Corp"
rhombus camera get-minimal-camera-state-list --partner-org ORG_UUID
```

Name matching is case-insensitive and substring-based. If multiple orgs match, you are prompted to select one.

## Environment Variables

| Variable               | Description                            |
| ---------------------- | -------------------------------------- |
| `RHOMBUS_API_KEY`      | API key (overrides credentials file)   |
| `RHOMBUS_PROFILE`      | Profile name (default: `default`)      |
| `RHOMBUS_OUTPUT`       | Output format: `json`, `table`, `text` |
| `RHOMBUS_ENDPOINT_URL` | API endpoint override                  |

## Configuration Files

| Path                          | Purpose                                                    |
| ----------------------------- | ---------------------------------------------------------- |
| `~/.rhombus/config`           | Default output format, endpoint URL (INI format)           |
| `~/.rhombus/credentials`      | API keys and cert paths per profile (INI, 600 permissions) |
| `~/.rhombus/certs/<profile>/` | Client certificates and private keys                       |

Configuration precedence: CLI flags > environment variables > profile config > defaults.

## Platform Support

| OS      | Architectures |
| ------- | ------------- |
| macOS   | amd64, arm64  |
| Linux   | amd64, arm64  |
| Windows | amd64, arm64  |

## Resources

<CardGroup cols={2}>
  <Card title="GitHub Repository" icon="github" href="https://github.com/RhombusSystems/rhombus-cli">
    Source code, releases, and issue tracker
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/overview">
    Full endpoint documentation for all 900+ API operations
  </Card>

  <Card title="WebSocket Monitoring" icon="signal-stream" href="/websocket/overview">
    Real-time event streaming protocol details
  </Card>

  <Card title="Rate Limits" icon="gauge" href="/rate-limits">
    API rate limiting and retry guidance
  </Card>
</CardGroup>
