- Reference
- ava CLI
Reference
ava CLI
Every command of the ava command line, which drives the local operator.
uv run ava COMMAND
Commands that talk to a running operator take --connect HOST:PORT
(default localhost:7433). Most take --json.
| Group | Commands |
|---|---|
| Project | init |
| Operator | dev, operator, web, tui |
| Runs | run, result, run list, run show, run history, run links, run cancel, run retry |
| Waits and events | run decide, event send, machine send |
| Workflows | flow, schedule, webhooks |
| Integrations | connect, disconnect |
| Stored data | state |
Project
ava init
Creates a starter project in the current, empty folder. See Quickstart.
| Flag | Meaning |
|---|---|
--editable-deps | Also clone Avalanche and PredictRLM into .trampoline-ai/ and use those copies |
Operator
ava dev [FLOW ...]
Starts the operator, the UI and the REST API, and opens the browser. FLOW is a Python file or a
folder; without it, [tool.avalanche] flow_targets from pyproject.toml is used.
| Flag | Default | Meaning |
|---|---|---|
--port | 7433 | Port for ava commands |
--web-port | 7435 | Port for the UI and the REST API |
--login-port | 7436 | Port for browser sign-in to integrations |
--log-level | WARNING | DEBUG, INFO, WARNING or ERROR |
--discovery-timeout | 60 | Seconds allowed to load the workflows |
--schedules-enabled | off | Turn every schedule on, for this start only |
--state-db | .avalanche/operator/state.db | Where runs are kept. :memory: keeps nothing. |
ava operator [FLOW ...]
The same as ava dev, without opening a browser. Adds:
| Flag | Default | Meaning |
|---|---|---|
--host | 127.0.0.1 | Address to listen on |
--webhook-port | 7434 | Port for incoming webhooks |
--no-web | off | Do not serve the UI or the REST API |
ava web
Serves the UI for an operator that is already running.
| Flag | Default | Meaning |
|---|---|---|
--connect | localhost:7433 | The operator |
--host, --port | 127.0.0.1, 7435 | Where to serve the UI |
--trusted-proxy | off | Confirms a proxy with sign-in is in front, when not on 127.0.0.1 |
ava tui [FLOW]
The terminal UI.
| Flag | Meaning |
|---|---|
--connect | The operator. Without it, the TUI shows sample data. |
--flow, --run, --node | Open on a workflow, a run or a step |
--read-only | Look without starting or cancelling anything |
--token, --tls, --insecure, --tls-ca-cert | Connection security |
Runs
ava run FLOW
Starts a run and prints its ID. It does not wait for the run to finish.
| Flag | Meaning |
|---|---|
--input JSON | The run input |
--file FIELD=PATH | A file for an input field. Repeatable. |
--workspace FIELD=DIR | A folder for an input field. Repeatable. |
--context JSON | Caller context |
--rerun-of RUN_ID | Rerun an earlier run |
--from SLUG | The step to rerun from. Required with --rerun-of. Repeatable. |
--only | Rerun only the --from steps |
ava result RUN_ID
Gets a run’s result. Also available as ava run result. One of --json or --output-dir is required.
| Flag | Default | Meaning |
|---|---|---|
--json | Print the result | |
--output-dir PATH | Write the result and its files to a new folder | |
--wait | off | Wait for the run to finish |
--timeout | 300 | Seconds to wait |
--node STEP_ID | One step’s output instead of the run’s | |
--entry N | For a state machine: the result of its Nth state entry |
ava run list | show | history | links | cancel | retry
| Command | Does |
|---|---|
ava run list [--flow FLOW] | Lists runs |
ava run show RUN_ID | Shows a run’s state |
ava run history RUN_ID [--limit N] [--cursor C] | A state machine’s transitions |
ava run links RUN_ID | The runs it started and the run that started it |
ava run cancel RUN_ID | Cancels a run |
ava run retry RUN_ID --entry | Retries a state machine’s interrupted state |
Instead of RUN_ID, a keyed run can be named with --flow FLOW --key FIELD=JSON.
Waits and events
ava run decide RUN_ID NODE JSON
Submits an approval.
| Flag | Meaning |
|---|---|
--reason TEXT | Required. Kept with the run. |
--idempotency-key KEY | Required. A repeated send with the same key is ignored. |
ava event send RUN_ID KEY JSON
Sends an event to a run that is waiting for it.
--idempotency-key is required.
ava machine send [MACHINE] EVENT
Sends an event to a state machine.
| Flag | Meaning |
|---|---|
--run RUN_ID | The instance, by run ID |
--key FIELD=JSON | The instance, by key. Needs MACHINE. Repeatable. |
--data JSON | The event’s data, or @file |
--idempotency-key KEY | Optional. Generated when missing. |
Workflows
| Command | Does |
|---|---|
ava flow list | Lists workflows and state machines |
ava flow show SELECTOR | Shows one definition |
ava schedule list | Lists schedules and whether they are on |
ava schedule enable SELECTOR [--input JSON] | Turns a schedule on, with the input its runs use |
ava schedule disable SELECTOR | Turns it off |
ava webhooks list | Lists webhook URLs |
ava webhooks get SELECTOR | Shows one |
A selector names a workflow by file and function, such as flow.py::process_invoice.
Integrations
ava connect [NAME]
Without a name, lists the integrations your workflows declare. With a name, connects an account.
| Flag | Meaning |
|---|---|
--api-key | Enter an API key (asked for, never passed on the command line) |
--header | The header an API key is sent in |
--client-secret | Enter an OAuth client secret |
--no-browser | Print the sign-in link instead of opening it |
ava disconnect NAME
Removes an account.
Stored data
ava state works on the operator’s data while the operator is stopped. Each command takes --state-db PATH.
| Command | Does |
|---|---|
ava state info | Location, sizes, runs by status |
ava state delete RUN_ID ... | Deletes finished runs and their files |
ava state prune --keep-last N | Deletes all but the newest N finished runs |
ava state prune --before DATE | Deletes finished runs older than a date |
ava state clear [--yes] [--include-schedules] | Deletes every run |
