Skip to content

CLI Commands

These options apply to most commands:

OptionDescription
-v, --verboseEnable verbose logging
-q, --quietSuppress non-essential output
--jsonShorthand for JSON output where supported
--compactEmit compact JSON instead of pretty-printed JSON
--no-colorDisable colored output
--style <MODE>Visual style: rich, minimal, plain
-o, --output <FILE>Write output to a file instead of stdout

Common unit flags:

OptionDescription
--fahrenheit / --celsiusOverride temperature units
--inhg / --hpaOverride pressure units
--bq / --pciOverride radon units

Discover nearby Aranet devices via Bluetooth.

Terminal window
aranet scan [OPTIONS]
OptionDescription
-t, --timeout <SECONDS>Scan duration in seconds
-f, --format <FORMAT>Output format: text, json, csv
--no-headerOmit the CSV header row
-a, --aliasInteractively save aliases for discovered devices
Terminal window
aranet scan --timeout 15
aranet scan --alias

Read current sensor measurements from one or more devices.

Terminal window
aranet read [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias; can be repeated or comma-separated
-T, --timeout <SECONDS>Connection timeout per device
-f, --format <FORMAT>Output format: text, json, csv
--passiveRead from BLE advertisements without connecting
--no-headerOmit the CSV header row
Terminal window
aranet read --device AA:BB:CC:DD:EE:FF
aranet read -d living-room -d bedroom
aranet read --device living-room --passive --json

Show a one-line summary for a device.

Terminal window
aranet status [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias
-T, --timeout <SECONDS>Connection timeout
-f, --format <FORMAT>Output format: text, json, csv
--briefEmit a compact single-line summary
--no-headerOmit the CSV header row
Terminal window
aranet status --device living-room
aranet status --device living-room --brief

Download historical measurements from a device, or read them from the local cache.

Terminal window
aranet history [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias
-T, --timeout <SECONDS>Connection timeout
-c, --count <N>Number of records to retrieve (0 means all)
-f, --format <FORMAT>Output format: text, json, csv
--since <DATE>Filter records after this RFC3339 or YYYY-MM-DD timestamp
--until <DATE>Filter records before this RFC3339 or YYYY-MM-DD timestamp
--cacheRead from the local cache instead of connecting to the device
--no-headerOmit the CSV header row
Terminal window
aranet history --device living-room --output history.csv --format csv
aranet history --device living-room --since 2026-03-01 --until 2026-03-07
aranet history --device living-room --cache --count 100 --format json

Display device metadata such as model, firmware, and serial number.

Terminal window
aranet info [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias
-T, --timeout <SECONDS>Connection timeout
-f, --format <FORMAT>Output format: text, json, csv
--no-headerOmit the CSV header row
Terminal window
aranet info --device living-room

Modify supported device settings.

Terminal window
aranet set [OPTIONS] <SUBCOMMAND>
SubcommandDescription
interval <MINUTES>Set the measurement interval in minutes; valid values are 1, 2, 5, 10
range <MODE>Set Bluetooth range mode; valid values are standard, extended
smart-home <BOOL>Enable or disable Smart Home BLE advertisements
OptionDescription
-d, --device <ADDRESS>Device address or alias
-T, --timeout <SECONDS>Connection timeout
-f, --forceSkip the confirmation prompt
Terminal window
aranet set --device living-room interval 5
aranet set --device living-room range extended
aranet set --device living-room smart-home on

Continuously monitor a device, or all devices passively.

Terminal window
aranet watch [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias
-T, --timeout <SECONDS>Connection timeout
-i, --interval <SECONDS>Poll interval
-n, --count <N>Stop after N samples (0 means unlimited)
-f, --format <FORMAT>Output format: text, json, csv
--passiveWatch BLE advertisements instead of opening a connection
--no-headerOmit the CSV header row
Terminal window
aranet watch --device living-room --interval 30
aranet watch --passive
aranet watch --device basement --passive --count 10

Manage friendly names for device addresses.

Terminal window
aranet alias <SUBCOMMAND>
SubcommandDescription
listList configured aliases
set <NAME> <ADDRESS>Create or update an alias
remove <NAME>Delete an alias
Terminal window
aranet alias set living-room AA:BB:CC:DD:EE:FF
aranet alias list
aranet alias remove living-room

Manage the CLI configuration file.

Terminal window
aranet config <SUBCOMMAND>
SubcommandDescription
showPrint the full config
get <KEY>Print a single config value
set <KEY> <VALUE>Update a config value
unset <KEY>Remove a config value
pathPrint the config file path
initCreate a default config file

Supported keys: device, format, timeout, no-color, fahrenheit, inhg, bq.

Terminal window
aranet config init
aranet config set device living-room
aranet config set format json
aranet config show

Sync device history into the local SQLite cache.

Terminal window
aranet sync [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias
-T, --timeout <SECONDS>Connection timeout
-f, --format <FORMAT>Output format: text, json, csv
--fullRe-download all history instead of syncing incrementally
--allSync all known devices from the database
Terminal window
aranet sync --device living-room
aranet sync --device living-room --full
aranet sync --all --format json

Generate summary reports from cached history.

Terminal window
aranet report [OPTIONS]
OptionDescription
-d, --device <ADDRESS>Device address or alias
--allReport on every cached device
-p, --period <PERIOD>daily, weekly, or monthly
-f, --format <FORMAT>Output format: text or json
Terminal window
aranet report --device living-room
aranet report --device living-room --period weekly --format json
aranet report --all --period monthly

Query and maintain the local SQLite cache directly.

Terminal window
aranet cache <SUBCOMMAND>
SubcommandDescription
devicesList cached devices
stats [--device <ADDRESS>]Show cache statistics
history --device <ADDRESS>Query cached history records
aggregate --device <ADDRESS>Show min/max/avg aggregates
export --device <ADDRESS>Export cached history to CSV or JSON
prune --older-than <DURATION>Delete older cache records
infoShow database path and size
importImport history from CSV or JSON
Terminal window
aranet cache devices
aranet cache stats --device living-room
aranet cache history --device living-room --count 50 --format json
aranet cache aggregate --device living-room --since 2026-03-01
aranet cache export --device living-room --format csv --output living-room.csv
aranet cache prune --older-than 90d --history-only --vacuum
aranet cache import --format json --input export.json

Launch the bundled HTTP API server and dashboard from the CLI.

Terminal window
aranet server [OPTIONS]
OptionDescription
-c, --config <PATH>Path to the aranet-service configuration file
-b, --bind <ADDR>Bind address override
--database <PATH>Database path override
--no-collectorStart the API without background polling
--daemonDetach and run in the background
Terminal window
aranet server --bind 127.0.0.1:8080
aranet server --config ~/.config/aranet/server.toml --no-collector

Generate shell completions.

Terminal window
aranet completions <SHELL>

Supported shells: bash, zsh, fish, powershell, elvish.

Terminal window
aranet completions zsh > ~/.zfunc/_aranet

Run BLE diagnostics and permission checks.

Terminal window
aranet doctor
Terminal window
aranet doctor

Print a curated set of common command examples.

Terminal window
aranet examples

Launch the interactive terminal dashboard.

Terminal window
aranet tui

The default aranet-cli release includes the tui subcommand. If you install the standalone TUI package instead, use aranet-tui.