Cambrionix CLI
Install the command-line tool that enrolls computers, controls hubs and collects support bundles.
cambrionix-cli runs on a computer that has the Cambrionix Connect Suite installed. It talks to
the local services on that computer and, when you sign in, to Connect itself. Use it to:
- Enroll a computer into your organisation without a browser.
- List and control hubs, ports and devices, locally or through Connect.
- Run premium hub actions, such as DFU on every port or a target charge level, within your permissions.
- Restart, stop and update the local services.
- Read logs and collect a redacted support bundle.
Install
The installer is served from a signed link that Connect issues to signed-in users; there is no public download link.
To install the CLI and enroll the computer in one step, use the command Connect builds for you: open Computers → Add a computer → Headless enrollment and choose Create enrollment command. See Enroll a computer.
To install only, get a link here. Signed in with your Connect account, run the request below.
Set platform to macos for the macOS and Linux installer, or windows for the Windows
PowerShell installer, and versionId to latest or a version such as 0.2.0. The result in the
response is the install link. It works for 15 minutes; add a minutes query parameter for longer,
up to 30 days.
Try it
curl -X GET "https://connect.cambrionix.com/api/downloads/v1/software/cambrionix-cli/macos/latest" \ -H "Authorization: Bearer $CONNECT_ACCESS_TOKEN"
Then run the installer, with the link in place of <install link>. On macOS and Linux:
curl -LsSf '<install link>' | shOn Windows, in PowerShell:
irm '<install link>' | iexThe installer puts the binary in ~/.local/bin (or $XDG_BIN_HOME) and adds that directory to
your PATH. Open a new terminal afterwards, or run the binary by its full path.
| Platform | Architectures |
|---|---|
| Linux | x86-64, 64-bit Arm (Raspberry Pi 4 and 5) |
| macOS | Apple silicon, Intel |
| Windows | x86-64 |
First commands
cambrionix-cli status # this computer, its services, its organisation and its hubs cambrionix-cli doctor # diagnostic checks with suggested fixes cambrionix-cli hubs list cambrionix-cli ports list HUB-1234 cambrionix-cli --help # every command; add --help to any command for its options
Run cambrionix-cli with no arguments for a short list of commands, and
cambrionix-cli tui for the interactive enrollment screen.
Output and scripting
Every command prints a table by default and JSON with --json (or -o json). JSON is the API
object itself, so you can pipe it to jq:
cambrionix-cli hubs list --json | jq -r '.[].serialNumber'Commands never prompt when standard input isn't a terminal. A command that would ask for
confirmation, such as hubs reboot or ports dfu … all, fails with exit code 2 instead, unless
you pass --yes.
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | Unexpected error |
| 2 | Usage error, or a confirmation was needed without --yes |
| 3 | A local service isn't reachable |
| 4 | Not signed in, permission denied, or the hub's licence lacks the feature |
| 5 | Not found (hub, port, device, computer) |
| 6 | Partial success: a doctor check or a support bundle collector failed |
| 7 | The computer is offline or didn't answer in time (through Connect) |
Global options
| Option | Effect |
|---|---|
--json, -o json | JSON output |
--yes, -y | Answer yes to confirmations |
--no-input | Never prompt |
--profile <name> | Use a named profile from the config file |
--connect-url <url> | Use another Connect deployment |
--local-url <service>=<url> | Reach a local service at another address, e.g. hub=http://lab:43424 |
--identity auto|user|computer | Which credentials local hub calls use (see sign-in) |
--timeout <seconds> | Request timeout (default 10) |
--verbose, -v | Print requests to standard error |
--no-color | Plain output (NO_COLOR also works) |
Configuration
Settings live in config.toml in the CLI's config directory; cambrionix-cli config path prints
where. Profiles hold a Connect URL, a default organisation and local service addresses:
default_profile = "lab" [profiles.lab] connect_url = "https://connect.cambrionix.com" [profiles.lab.local] hub = "http://10.0.0.5:43424"
Change settings with cambrionix-cli config set profiles.lab.connect_url <url>. Environment
variables override the file: CAMBRIONIX_PROFILE, CAMBRIONIX_CONNECT_URL, CAMBRIONIX_ORG
and CAMBRIONIX_TOKEN.
Updating and shell completion
cambrionix-cli self-update # latest version cambrionix-cli self-update --to 0.2.0 # a specific version cambrionix-cli completion bash | sudo tee /etc/bash_completion.d/cambrionix-cli
completion supports bash, zsh, fish, elvish and PowerShell.