CLI Reference
The plexus CLI lets you start agents, add sensor capabilities, scan hardware, and monitor your device from the terminal.
Install it with the base package:
pip install plexus-pythonplexus start
Set up and start streaming in one command. Handles auth, hardware detection, dependency installation, and sensor selection. Interactive when run without flags, non-interactive with flags like --sensor or --no-sensors.
plexus startFlags
| Flag | Type | Default | Description |
|---|---|---|---|
-k, --key | string | env / config | API key. Overrides PLEXUS_API_KEY and config file. |
-n, --name | string | none | Display name for this device in the dashboard. |
--device-id | string | none | Device ID from dashboard. |
--org | string | none | Organization ID from dashboard. |
-b, --bus | int | 1 | I2C bus number. Use 0 on older Raspberry Pi models. |
-s, --sensor | string | none | Sensor type to use (e.g. system). Repeatable. |
--no-sensors | bool | false | Disable I2C sensor auto-detection. |
--no-cameras | bool | false | Disable camera auto-detection. |
--mqtt | string | none | MQTT broker to bridge (e.g. localhost:1883). |
--mqtt-topic | string | sensors/# | MQTT topic to subscribe. |
--live | bool | false | Show live terminal dashboard. |
--auto-install | bool | false | Auto-install missing Python dependencies. |
Examples
# Interactive setup (prompts for API key and sensor selection)
plexus start
# Specify API key and device name
plexus start --key plx_xxxxx --name "test-rig-01"
# Stream system health metrics
plexus start --sensor system
# Live terminal dashboard
plexus start --live
# Bridge MQTT data
plexus start --mqtt localhost:1883
# Skip hardware auto-detection
plexus start --no-sensors --no-cameras
# Auto-install missing dependencies
plexus start --auto-install
# Use I2C bus 0 (Raspberry Pi Model A/B)
plexus start --bus 0plexus add
Add sensor capabilities to your device configuration. Run without arguments to open the interactive picker.
plexus addOr specify capabilities directly:
plexus add sensors can mavlinkAvailable Capabilities
| Capability | Description |
|---|---|
sensors | I2C sensors (IMU, temperature, pressure, etc.) |
can | CAN bus (SocketCAN) |
mavlink | MAVLink (drones, autopilots) |
mqtt | MQTT broker |
modbus | Modbus TCP/RTU |
opcua | OPC-UA |
ble | Bluetooth Low Energy |
serial | Serial port (RS-232, UART) |
system | System health (CPU, memory, disk, temperature) |
tui | Live terminal dashboard |
Examples
# Interactive picker — shows checkboxes for each capability
plexus add
# Add I2C sensors and CAN bus
plexus add sensors can
# Add everything
plexus add sensors can mavlink mqtt camera serial systemTwo Pairing Methods
Method 1: API key (headless devices)
plexus pair --key plx_xxxxxThe key is saved to ~/.plexus/config.json and used for all future connections.
Method 2: Browser pairing (devices with a display)
This prints a URL and a 6-digit code. Open the URL in your browser, enter the code, and the device is paired.
→ Open https://app.plexus.company/auth/device
→ Enter code: 482 913
→ Waiting for confirmation...
✓ Paired as "test-rig-01"plexus scan
Detect connected hardware — I2C sensors, CAN interfaces, serial ports, and cameras.
plexus scanFlags
| Flag | Type | Default | Description |
|---|---|---|---|
-a, --all | bool | false | Show all I2C addresses (including unknown). |
-b, --bus | int | 1 | I2C bus number. |
--setup | bool | false | Automatically configure detected hardware. |
--json | bool | false | Output results as JSON. |
Examples
# Scan I2C bus (default)
plexus scan
# → Found MPU6050 at 0x68
# → Found BME280 at 0x76
# → Found INA219 at 0x40
# Scan everything
plexus scan --all
# → I2C: MPU6050 (0x68), BME280 (0x76)
# → CAN: can0 (500 kbit/s)
# → Serial: /dev/ttyUSB0 (GPS)
# → Camera: /dev/video0 (USB 720p)
# Scan and auto-configure
plexus scan --setup
# Machine-readable output
plexus scan --jsonplexus status
Check the connection status of the currently running agent.
plexus statusConfig: ~/.plexus/config.json
Source ID: source-a1b2c3d4
Name: test-rig-01
Endpoint: https://app.plexus.company
Auth: plx_xxx...xxx (API key)
✓ Connectedplexus doctor
Diagnose common issues with your setup — missing dependencies, connectivity problems, sensor permissions.
plexus doctor Configuration
✓ Config file: ~/.plexus/config.json
✓ API key: plx_xxx...xxx
✓ Endpoint: https://app.plexus.company
✓ Source ID: source-a1b2c3d4
Network
✓ DNS resolves: app.plexus.company
✓ HTTP reachable: https://app.plexus.company
✓ Authentication: valid
Dependencies
✓ requests: installed
✓ click: installed
✓ websockets: installed
Hardware Permissions
✓ I2C bus 1: accessible
✗ /dev/video0: permission denied
Fix: sudo usermod -aG video $USER
System
Platform: Linux aarch64
Python: 3.11.2
Hostname: test-rig-01
Agent: v0.5.3
5 passed, 1 failed, 0 warningsNext Steps
- Sending Data — Use the Python API directly
- Adapters — Connect to CAN bus, MQTT, MAVLink, and more