Skip to content

Device Management

Manage devices through the full lifecycle: list, inspect, register, and update.

List devices

grace device list

Paginated listing with optional filters:

grace device list --page 2 --size 10
grace device list --filter type:eq:lidar
grace device list --filter type:eq:camera --filter name:contains:front

Filter syntax

Filters follow the Grace API format: key:operator:value.

Operator Meaning Example
eq Equals type:eq:lidar
neq Not equals type:neq:camera
contains String contains name:contains:rover
gt, gte Greater than (or equal) createdAt:gte:2025-01-01
lt, lte Less than (or equal) createdAt:lt:2026-01-01

Multiple --filter flags are combined with AND logic.

JSON output

For scripting and piping to other tools:

grace device list --output json | jq '.data[].id'

Get device details

grace device get a1b2c3d4-5678-9abc-def0-1234567890ab

Displays a formatted table of device fields plus a syntax-highlighted JSON panel for the DeviceInfo configuration (cameras, IMU, intrinsics, etc.).

Register a new device

grace device register \
  --name "rover-07" \
  --type lidar \
  --device-no DEV-007 \
  --vendor-id f47ac10b-58cc-4372-a567-0e02b2c3d479

With device info

Pass a JSON file containing the full device configuration:

grace device register \
  --name "rover-07" \
  --type camera \
  --info-file device_config.json

The JSON is validated against the DeviceInfo Pydantic model before submission. Validation errors are shown immediately without hitting the server.

Example device_config.json
{
  "cameras": [
    {
      "name": "front_left",
      "intrinsic": {
        "fx": 1050.5,
        "fy": 1050.5,
        "cx": 960.0,
        "cy": 540.0,
        "width": 1920,
        "height": 1080
      },
      "extrinsic": {
        "tx": 0.0,
        "ty": 0.0,
        "tz": 1.5,
        "rx": 0.0,
        "ry": 0.0,
        "rz": 0.0
      }
    }
  ],
  "imu": {
    "name": "main_imu",
    "extrinsic": {
      "tx": 0.1,
      "ty": 0.0,
      "tz": 1.2,
      "rx": 0.0,
      "ry": 0.0,
      "rz": 0.0
    }
  }
}

Update a device

Updates show a diff preview before applying:

grace device update a1b2c3d4-... --name "rover-07-v2" --readable-name "Rover 7 (v2)"
╭──────────────────────╮
│   Update Preview     │
╰──────────────────────╯
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Field           ┃ Current     ┃ New               ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ name            │ rover-07    │ rover-07-v2       │
│ readableName    │             │ Rover 7 (v2)      │
└─────────────────┴─────────────┴───────────────────┘
Apply this update? [y/n]:

Skip confirmation

For scripting, bypass the interactive prompt:

grace device update a1b2c3d4-... --name "rover-07-v2" --yes

Update device info

Replace the device configuration from a JSON file:

grace device update a1b2c3d4-... --info-file updated_config.json

The info JSON is validated before sending, and the diff preview shows the full before/after comparison for nested fields.