libiot-cli
Unified CLI dispatcher for the libiot ecosystem.
libiot discovers all installed libiot-* CLI binaries on $PATH
and exposes them as subcommands — similar to how git dispatches to
git-* programs. It also provides alias management, per-command
environment variable injection, and cargo install/uninstall
wrappers.
Quick start
# Install the dispatcher
# Install a device CLI
# Use it via the full name
# Or create a short alias
# Set a persistent env var so you don't have to pass --hub every time
Two operating modes
Built-in commands — manage aliases, env vars, and installations:
| Command | Description |
|---|---|
libiot set alias CMD ALIAS [-f] |
Create an alias for a CLI command |
libiot unset alias ALIAS |
Remove an alias |
libiot get alias ALIAS |
Show what an alias points to |
libiot set env-var CMD VAR VALUE |
Set a per-command env var |
libiot unset env-var CMD VAR |
Remove a per-command env var |
libiot get env-var CMD VAR |
Show a per-command env var value |
libiot list |
List all CLIs and aliases |
libiot list aliases |
List all aliases |
libiot list env-vars [CMD] |
List env vars, optionally for one cmd |
libiot install NAME [--alias ALIAS] |
Install a libiot CLI via cargo |
libiot uninstall NAME |
Uninstall a libiot CLI via cargo |
libiot config-path |
Print the settings file path |
libiot completions SHELL |
Generate shell completions |
Delegation mode — anything else is exec'd to the matching
libiot-* binary:
# equivalent to: libiot-rollease-automate-pulse-pro-hub hub info
Top-level flags (--format, --quiet) are only available for built-in
commands. In delegation mode, all arguments are passed through verbatim.
Environment variables
Env vars set via libiot set env-var are stored without the LIBIOT_
prefix. The prefix is added automatically at execution time. For
example:
# When running `libiot shades ...`, the child process sees:
# LIBIOT_PULSE_PRO_HUB=192.168.1.2
When using an alias, env vars are resolved in order:
- Underlying command's env vars (base)
- Alias-specific env vars (override)
Configuration
Settings are stored in ~/.config/libiot/settings.json (override with
LIBIOT_CONFIG_DIR). The file is created on first write with 0600
permissions.
Output formats
--format human(default) — aligned, human-readable text--format json— structured JSON for scripting--quiet/-q— suppress non-error output