CLI Overview
The aranet CLI provides a fast, scriptable interface for interacting with Aranet environmental sensors.

Features
Section titled “Features”- Device Discovery — Scan for nearby Aranet devices via Bluetooth
- Current Readings — Read live sensor values (CO₂, temperature, humidity, pressure, radon, radiation)
- Multi-Device Support — Read from multiple devices in parallel
- Passive Mode — Read from BLE advertisements without connecting
- Historical Data — Download measurement history with timestamps and date filters
- Progress Bars — Visual progress for history downloads
- Device Aliases — Save friendly names for device addresses
- Device Info — Query device metadata (serial, firmware, model)
- Settings — Read and modify device configuration
- Diagnostics —
doctorcommand for BLE troubleshooting - Unit Conversion — Fahrenheit, inHg pressure, pCi/L radon options
- Interactive Picker — Select devices from a menu when none specified
- Export — Output in text, JSON, or CSV formats
- Shell Completions — Auto-complete for bash, zsh, fish, PowerShell
Installation
Section titled “Installation”# Build from sourcegit clone https://github.com/cameronrye/aranet.gitcd aranetcargo install --path crates/aranet-cliBasic Usage
Section titled “Basic Usage”# Show helparanet --help
# Scan for devicesaranet scan
# Read current valuesaranet read --device <ADDRESS>
# Download historyaranet history --device <ADDRESS> --output data.csvGlobal Options
Section titled “Global Options”| Option | Description |
|---|---|
-v, --verbose | Enable verbose/debug output |
-q, --quiet | Suppress non-essential output |
-o, --output <FILE> | Write output to file instead of stdout |
--json | Output in JSON format (shorthand for --format json) |
--no-color | Disable colored output |
--style <MODE> | Visual styling: rich (default), minimal, plain |
--fahrenheit | Display temperature in Fahrenheit |
--inhg | Display pressure in inches of mercury |
--bq | Display radon in Bq/m3 (instead of pCi/L) |
-h, --help | Show help information |
--version | Show version number |
Visual Styling
Section titled “Visual Styling”The CLI uses rich styling by default with spinners, color-coded values, and table formatting.
Style Modes
Section titled “Style Modes”| Mode | Description |
|---|---|
rich | Full styling with tables, spinners, colored values (default) |
minimal | Colors only, no tables or spinners |
plain | No styling, suitable for scripting |
# Use minimal stylingaranet read --device <ADDRESS> --style minimal
# Plain output for scriptsaranet history --device <ADDRESS> --style plain
# Set via environment variableexport ARANET_STYLE=minimalColor-Coded Values
Section titled “Color-Coded Values”Sensor readings are color-coded based on health thresholds:
| Metric | Green | Yellow | Red |
|---|---|---|---|
| CO2 | < 800 ppm | 800-1000 ppm | > 1000 ppm |
| Radon | < 100 Bq/m3 | 100-150 Bq/m3 | > 150 Bq/m3 |
| Battery | > 50% | 20-50% | < 20% |
| Humidity | 30-60% | Outside range | - |
Output Formats
Section titled “Output Formats”Most commands support multiple output formats:
# Text (default, human-readable)aranet read --device <ADDRESS> --format text
# JSON (for scripting/APIs)aranet read --device <ADDRESS> --format json
# CSV (for spreadsheets)aranet history --device <ADDRESS> --format csvEnvironment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
ARANET_DEVICE | Default device address |
RUST_LOG | Log level (debug, info, warn, error) |
NO_COLOR | Disable colored output (any value) |
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Device not found |
3 | Connection failed |
4 | Bluetooth unavailable |
Made with ❤️ by Cameron Rye