CLI Reference¶
Invocation¶
Run analogcli --help to see the list of all commands. Authentication is read from the ANALOGCLOUD_API_KEY environment variable; the CLI exits with an error if the variable is unset or empty. For details on the individual options, see below.
Global options¶
| Option | Type | Default | Description |
|---|---|---|---|
-u, --base-url |
string | https://redac.anabrid.com |
Base URL of the Analog Cloud API server. |
--timeout |
float | 30.0 |
Per-request HTTP timeout in seconds. |
Top-level commands¶
| Command | Purpose |
|---|---|
status |
Show deployment info and all registered devices. |
info |
Show details for a single device, optionally save its entity blob. |
compile |
Compile an analang ODE to a device-specific module. |
run |
Execute a compiled module on a device. |
task |
Subgroup for task lifecycle operations; [ARGS] must contain a subcommand identifying the actual functionality. |
analogcli status¶
Synopsis: analogcli status
This command takes no arguments and no options beyond the globals. It prints the deployment domain, software version, uptime, and a table of devices showing Name, Type, Status, and Queue Length.
analogcli info¶
Synopsis: analogcli info DEVICE_NAME [--short] [--save-entity PATH]
| Argument / option | Type | Default | Description |
|---|---|---|---|
DEVICE_NAME |
string | — | Name of a registered device (positional, required). |
--short |
flag | off | Suppress the entity tree; print only the summary table. |
--save-entity |
path | — | Write the raw protobuf entity blob to this path for later use as a MODULE_FILE. |
By default the command prints the summary table followed by the pybrid entity tree. SIMULATOR devices never render an entity tree (their entity is null), so --short is a silent no-op on them.
analogcli compile¶
Synopsis: analogcli compile ODE_FILE [MODULE_FILE] [OPTIONS]
| Argument / option | Type | Default | Description |
|---|---|---|---|
ODE_FILE |
path | — | Analang source file (positional, required). |
MODULE_FILE |
path | — | Device entity blob from analogcli info … --save-entity. Mutually exclusive with --device. |
--device |
string | — | Pick a device by name; the CLI fetches its entity blob and infers the backend. Mutually exclusive with MODULE_FILE. |
--backend |
LUCIDAC | REDAC |
LUCIDAC when MODULE_FILE is supplied |
Target device family. Not allowed together with --device. SIMULATOR is rejected. |
--k0 |
int | none | Time-scale factor override; falls through to the compiler default when omitted. |
-o, --output |
path | stdout-summary | Where to save the compiled APB bytes. Without it, only a byte-count summary is printed. |
--follow / --no-follow |
flag | --follow |
Wait for the task to finish. With --no-follow, only the task UUID is emitted on stdout. |
Exactly one of MODULE_FILE or --device is required. With --follow (the default), the CLI prints the submission status, polls the task to completion, dumps the logs, and then writes (or summarises) the compiled module.
analogcli run¶
Synopsis: analogcli run MODULE_FILE [OPTIONS]
| Argument / option | Type | Default | Description |
|---|---|---|---|
MODULE_FILE |
path | — | Compiled APB blob (positional, required). |
--sample-rate |
int | 10000 |
ADC samples per second. |
--op-time |
float | 0.1 |
Wall-clock integration time in seconds (virtual seconds for SIMULATOR). |
--device |
string | first available LUCIDAC | Target device name. If omitted, the first device whose name contains "lucidac" and is available is used. |
-o, --output |
path | — | Write the JSON result to this path. |
--follow / --no-follow |
flag | --follow |
Wait for the task; with --no-follow, only the UUID is emitted. |
With --follow, the CLI prints the submission status, polls to completion, dumps the logs, and on success either prints the result or writes it to --output.
analogcli task subgroup¶
All task subcommands take a TASK_ID (UUID, positional) unless noted, and they honour the global -u/--timeout options.
| Subcommand | Purpose |
|---|---|
task list |
List tasks visible to the current API key, newest-first by creation time (goes through GET /api/v1/tasks). Supports --state, --type, --limit, --offset, --ids-only, --format text\|json. |
task search |
Search and filter your tasks with a datetime window, device, type, and state filters. Supports CSV export and optional per-job detail enrichment. |
task info |
Detailed view of a single task (type, state, parameters, blob availability). --format text\|json. |
task status |
Current state plus state-history table for a task. --format text\|json. |
task logs |
Snapshot of the task log; --follow to stream until terminal. --format text\|json. |
task result |
Download the result payload. Compile tasks emit raw binary; run tasks emit JSON. -o/--output FILE to redirect. |
task wait |
Block until terminal. Exit code: 0 SUCCEEDED, 1 FAILED, 2 CANCELLED, 124 on --timeout. --poll-interval. |
task revoke |
Request cancellation. Only valid while QUEUED; otherwise exit code 4. |
task delete |
Permanently delete a task and its blobs. INPROGRESS tasks under the 2-minute grace window return exit code 4. |
task search¶
Synopsis: analogcli task search [OPTIONS]
Search your own tasks within a datetime window, with optional filters by device, type, and state. Unlike task list, it includes a user_id column in its output and supports CSV export for reporting use cases.
| Option | Type | Default | Description |
|---|---|---|---|
--user-id |
string (repeatable) | — | Owner API keys to match. Ignored for ordinary keys — your search is always scoped to your own tasks. |
--me |
flag | off | Shortcut for --user-id $ANALOGCLOUD_API_KEY. Combines with any --user-id values. |
--device |
string (repeatable) | — | Filter by device name. May be repeated. |
--device-class |
LUCIDAC | REDAC | SIMULATOR (repeatable) |
— | Filter by device class: matches run tasks via the device's class and compile tasks via their backend. May be repeated. |
--type |
compile | run (repeatable) |
— | Filter by task kind. May be repeated. |
--state |
string (repeatable) | — | Filter by latest state (e.g. QUEUED, INPROGRESS, SUCCEEDED, FAILED, CANCELLED). May be repeated. |
--from |
ISO 8601 datetime | 24 h before --to |
Start of the creation-time window, e.g. 2026-05-01T00:00:00. A bare datetime is read as UTC; a value carrying an offset is converted. Mutually exclusive with --last-h/-d/-m. |
--to |
ISO 8601 datetime | now | End of the creation-time window, e.g. 2026-05-08T00:00:00. Mutually exclusive with --last-h/-d/-m. |
--last-h |
int | — | Convenience window covering the last N hours (now-Nh … now). |
--last-d |
int | — | Convenience window covering the last N days. |
--last-m |
int | — | Convenience window covering the last N minutes. |
--limit |
int | all matches | Cap the total number of tasks returned. Without this flag the command auto-paginates through all result pages. |
--recursive |
flag | off | Enrich each job with full per-job detail: device_name, backend, sample_rate, op_time, k0, has_result, has_log. Costs one extra API call per task, so it is slower on large result sets. |
--csv |
path | — | Also write the result set to this path as CSV (additive: stdout output is still produced). Always includes a header row; an empty result yields a header-only file. |
--ids-only |
flag | off | Emit one task UUID per line on stdout. Overrides --format. |
--format |
text | json |
auto | Force output format. Defaults to text when stdout is a TTY and json when piped. |
Repeatable filter options combine with OR within a single field and AND across different fields. For example, --type run --type compile --state QUEUED returns tasks that are (run OR compile) AND in state QUEUED. A filter that is not specified is unconstrained. The server rejects a datetime window wider than 90 days.
The time window can be given either as an explicit --from/--to pair or as one of the --last-h/--last-d/--last-m shortcuts (a window ending "now"). These two styles are mutually exclusive, and at most one --last-* option may be used at a time; mixing them is a usage error. To pin --to to the current moment with an explicit start, generate the ISO timestamp with the Linux date command, e.g. --to "$(date -u +%Y-%m-%dT%H:%M:%S)".
Output columns vary by mode:
- Default (thin):
id,user_id,type,state,created_at,error. - With
--recursive(rich): the thin columns plusdevice_name,backend,sample_rate,op_time,k0,has_result,has_log. Fields that do not apply to a task type (e.g. compile jobs have nodevice_name, run jobs have nobackend) are left blank.
The user_id column is what distinguishes task search output from task list, which is always self-scoped and omits that column.
# All of the current user's jobs in the last 24 hours (default window).
analogcli task search
# The last 6 hours / 7 days / 90 minutes (shortcut for a window ending now).
analogcli task search --last-h 6
# Pin the window end to the current moment with an explicit start.
analogcli task search --from 2026-05-01T00:00:00 --to "$(date -u +%Y-%m-%dT%H:%M:%S)"
# Export a week of run jobs on a specific device to CSV.
analogcli task search \
--type run \
--device mredac \
--from 2026-05-01T00:00:00 \
--to 2026-05-08T00:00:00 \
--csv runs.csv
# Full metadata report for your failed jobs.
analogcli task search --state FAILED --recursive --csv failures.csv
Exit codes¶
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | Generic CLI / runtime failure (e.g. usage error after Click handling). For task wait: terminal state FAILED. |
| 2 | task wait: terminal state CANCELLED. |
| 3 | API or transport error (AnalogCloudAPIError). |
| 4 | State conflict (HTTP 409) — e.g. revoking a non-QUEUED task, deleting an INPROGRESS task within the grace window. |
| 124 | task wait --timeout expired before the task reached a terminal state. |
Quick-start example¶
# 1. Check what's available.
uv run analogcli status
# 2. Inspect a device.
uv run analogcli info lucistack
# 3. Compile an analang ODE (.ana file, see redacc docs) for a specific device (single-step flow).
uv run analogcli compile harmonic.ana --device lucistack --output harmonic.apb
# 4. Run the compiled module.
uv run analogcli run harmonic.apb \
--device lucistack \
--sample-rate 100000 \
--op-time 0.2 \
--output result.json
# 5. Or, run the same module on the simulator.
uv run analogcli run harmonic.apb --device local-simulator --output sim-result.json
An alternative two-step flow saves the entity blob first, which is useful when running many compiles against the same hardware: