Skip to content

CLI reference

How every Astranize command is written, what it prints and how it fails, plus a list of all commands.

11 min read8 pages in CLI reference

Everything Astranize does goes through one command line tool, astranize. The desktop app runs the same commands behind its screens, so anything you click there you can also type. This page explains what all commands have in common: how you write them, what they print, how they fail and which environment variables they read. The pages that follow document each group of commands, one entry per command.

Each entry on those pages reads the same way: a sentence on what the command is for, the simplest way to run it, the output it prints, and then a table of every flag. Errors and edge cases come last.

The examples assume the alias from Installation:

Terminal window
alias astranize="node ~/code/astranize/packages/engine/bin/astranize.mjs"

Most commands work on a workspace, so you name it with --workspace. For example, to see one task:

Terminal window
astranize status t-0001 --workspace notes

The command prints one line of JSON describing the task, then exits:

{"type":"task_updated","task":{"id":"t-0001","title":"Filter notes by tag","namePrefix":"astra","status":"backlog","currentStep":null,"currentStepType":null,"returns":0,"humanRounds":0,"repos":[],"acceptanceCriteria":[],"questions":[],"history":[{"at":"2026-11-20T02:17:35.498Z","event":"created"}],"videoCaughtMiss":false,"body":{"description":"Add a tag filter to the notes list","spec":"","answers":"","validation":""}}}

Every command behaves like this. It writes JSON lines to stdout, and the type of each line tells you what it is. The rest of this page builds on that.

A command is a name, sometimes an action, then positional arguments and flags:

astranize <command> [<action>] [<positional>...] [--flag value | --flag=value | --switch]

A few rules apply to every command:

  • There is no --help and there are no short flags. Every flag is spelled out in full.
  • A flag that takes a value accepts it as the next argument or after =. Switches such as --follow, --once, --global, --off, --archived and --restart take no value, so --archived=yes is an error.
  • An unknown flag stops the command before it does anything: {"type":"error","message":"Unknown option '--verbose'. ..."}.

Ids and names have fixed shapes, and anything else is rejected before the command runs:

  • Task ids look like t-0001, decision ids like D-1 and mission run ids like r-0001.
  • Workspace, flow, mission and probe names use lowercase letters, digits and dashes. A workspace name may start with a digit (^[a-z0-9][a-z0-9-]*$). Flow, mission and probe names must start with a letter (^[a-z][a-z0-9-]*$).

Every command writes JSON lines to stdout: one JSON object per line, each with a type. Nothing else ever goes to stdout, so you can pipe it straight into a JSON tool.

There are two kinds of lines:

  • Commands that act on a task print events, such as task_updated, step_started or decision_opened.
  • Commands that read something print one summary line, such as {"type":"decisions",...} or {"type":"metrics",...}. Each group page lists the lines its commands print.

Commands that go through the daemon print what the daemon answered. The control lines job_finished, queue_updated and the final {"type":"exit","code":N} are used by the CLI itself and are not printed.

Warnings go to stderr, one per line, starting with warning: . You see one, for example, when you use a deprecated environment variable, write camelCase keys in a YAML file, or point config.yaml at a path that does not exist:

warning: ~/.astranize/workspaces/notes/config.yaml cites a path that does not exist: ~/code/notes/web

When a command fails, it prints one error line and exits with code 1:

{"type":"error","message":"Invalid task id \"1\": expected the format t-0000"}

When a file fails validation, the message lists one problem per line, separated by \n:

{"type":"error","message":"~/verdict.json: invalid verdict\ncriteria.0.verdict: Invalid enum value. Expected 'approved' | 'rejected', received 'maybe'"}
Exit code When
0 The command succeeded. With --follow, the job ran to the end without throwing; a task that ends blocked still counts as success. Also after you press Ctrl+C on a daemon or stream command.
1 The CLI or the daemon printed an error line. With --follow, the job threw (job_finished with ok: false). With --machine, the other machine answered with a non-200 status.

A few lines report a problem without failing the command:

  • list and decisions print {"type":"error",...} for a task file they could not read, then keep going.
  • vault answers {"type":"vault_error","code":"...","message":"..."} with exit code 0 when the Vault refused the request, for example on a wrong password.
  • services-check prints {"type":"error","message":"cleanup failed: ..."} before the original error when the cleanup also fails.

Ctrl+C (SIGINT) or SIGTERM stops the command. A local command also stops every process it started, such as agents, gates and services.

Some commands do their work right in your terminal. Others hand it to the daemon, a background process on your machine that owns the queue and runs the agents. Which one a command uses decides whether --follow means anything and whether its lines show up on the events stream.

Group Commands What happens
Daemon commands create, ideate, approve, adjust, run, validate, stop, decide, retry, archive, mission run, mission retry, probe enable, probe disable, probe poll Sent to the local daemon. The daemon starts on demand, handles one write at a time per workspace, queues jobs and starts them when there is room. They accept --follow.
Streams events, queue Talk to the daemon directly, starting it on demand.
Local commands every other command that takes --workspace Run in the CLI process against the files in $ASTRANIZE_HOME. vault is local but passes each request to the daemon, which holds the unlocked key.
Machine-level daemon, remote, machines Act on this machine and take no --workspace. remote and machines start the daemon on demand.

When the daemon is not running, a daemon command starts it in the background and waits up to 15 seconds for it to answer. If it does not, you get Could not start the Astranize daemon.

Every request also carries the CLI version. When your CLI is newer than the running daemon, the daemon restarts itself and the CLI retries for up to 15 seconds. If the daemon does not come back in time, you get The Astranize daemon did not come back after restarting.

These flags mean the same thing on every command that accepts them.

Flag Type Applies to Effect
--workspace <name> string every command except daemon, remote, machines Required. The workspace in $ASTRANIZE_HOME/workspaces/<name>/. Missing: Missing required option --workspace. Bad name: Invalid workspace name "Notes": use lowercase letters, digits and dashes.
--follow switch daemon commands Streams the task’s events until its job ends, then exits with the job’s result. It needs a task id in the arguments, so on create or mission run it does nothing.
--machine <key> string daemon commands, events, queue, files, vault and the read commands Sends the command to a paired machine instead of this one. See Fleet.
--machine-workspace <name> string with --machine The workspace name on the other machine. Defaults to --workspace.
--fake <script> path commands that run agents Replaces the real claude and codex CLIs with a scripted fake agent. For tests and demos.
--fake-playwright <script> path commands that reach the video step Replaces the real Playwright run with a script.

A fake agent lets you run a whole task without calling a real model. You write a small script that says what each agent call answers, and pass it with --fake.

The script is an ES module. Its default export is an object, or a function that returns one (sync or async):

fakes/ideator.mjs
export default {
claude: [
() => ({
exitCode: 0,
crashed: false,
finalText: 'ok\n```json\n' + JSON.stringify({
spec: 'Tag filter on the notes list',
repos: ['api'],
questions: [],
acceptanceCriteria: [{ text: 'The list filters by tag', proof: ['video'] }],
}) + '\n```',
}),
],
codex: [],
};

Here is how the script is read:

  • claude and codex are lists of turns. Each agent call takes the next turn in its list.
  • A turn receives the request (prompt, cwd, …) and returns { exitCode, crashed, finalText }. It may also return usage, limits, sessionId, structuredOutput, permissionDenials, budgetExceeded or failure.
  • map is an optional third list, used by the map command to write repo maps.
  • The path is made absolute before it reaches the daemon. Each queued job loads the script again, so its turns always start from the first one.
  • A script without a default export fails with <script>: must default-export { claude, codex }.

--fake-playwright works the same way. Its module default-exports { runPlaywright(args) }, which returns { exitCode }. Without it you get <script>: must default-export { runPlaywright }.

Astranize reads a few environment variables. You rarely need any of them except ASTRANIZE_HOME, which moves the data folder.

Variable Read by Effect
ASTRANIZE_HOME engine, app The data folder. Default ~/.astranize. See Files and directories.
ORCHESTRATOR_HOME engine, app Old name, used only when ASTRANIZE_HOME is unset or empty. Prints warning: ORCHESTRATOR_HOME is deprecated, use ASTRANIZE_HOME instead.
HOME, USERPROFILE engine, app Where ~ is. HOME wins on macOS, USERPROFILE on Windows. Sets the default data folder, the LaunchAgent location and ~/.claude.
ASTRANIZE_WORKSPACE app only The workspace the desktop app opens. Default default. The CLI ignores it and always needs --workspace. The old ORCHESTRATOR_WORKSPACE still works, with a warning.
ASTRANIZE_NODE app only The Node binary the app uses to run the CLI. Default node. The old ORCHESTRATOR_NODE still works, with a warning.
ASTRA_RTK engine 0, off, false or no turns off the rtk integration for the agents’ Bash calls.
CLAUDE_CONFIG_DIR engine Where to find Claude Code’s settings.json when checking for the rtk hook. Default ~/.claude.
PATH engine Used to find rtk, and copied into the autostart entry.
ASTRANIZE_GIT_BASH, CLAUDE_CODE_GIT_BASH_PATH engine, Windows Path to Git Bash’s bash.exe for shell: bash. Without them, Astranize looks under ProgramFiles, ProgramFiles(x86) and LOCALAPPDATA.
USERNAME, USERDOMAIN engine, Windows The account the autostart scheduled task runs as.

Astranize also sets one variable for you. The repo setup command and the service commands it runs get ASTRANIZE_NAME_PREFIX, so your scripts can give per-task resources a unique name.

Astranize used to keep its data in ~/.orchestrator. When you use the default data folder and ~/.orchestrator exists, the first command you run moves it to ~/.astranize. If ~/.astranize already has content, nothing moves and you get one warning: ~/.orchestrator was left behind: Astranize now uses ~/.astranize and nothing was deleted.

Each command links to its entry. The second column says where it runs, as explained in Where a command runs.

Command Runs Page
init local Workspace and tasks
workspace local Workspace and tasks
repo local Workspace and tasks
migrate-yaml-keys local Workspace and tasks
create daemon Workspace and tasks
edit local Workspace and tasks
list local Workspace and tasks
status local Workspace and tasks
ideate daemon Workspace and tasks
approve daemon Workspace and tasks
decide daemon Workspace and tasks
decisions local Workspace and tasks
adjust daemon Workspace and tasks
instruct local Workspace and tasks
run daemon Workspace and tasks
retry daemon Workspace and tasks
validate daemon Workspace and tasks
archive daemon Workspace and tasks
delete local Workspace and tasks
stop daemon Workspace and tasks
changes local Workspace and tasks
files local Workspace and tasks
summaries local Workspace and tasks
flow local Workspace and tasks
map local Workspace and tasks
step-defaults local Workspace and tasks
policies local Workspace and tasks
import-shortcut local Workspace and tasks
doc local Documents
metrics local Metrics and usage
video-caught local Metrics and usage
limits local Metrics and usage
usage local Metrics and usage
settings local Machine
set-language local Machine
migrate-home local Machine
services-check local Machine
vault local, via daemon Machine
autostart local Machine
events stream Daemon and queue
queue stream Daemon and queue
daemon machine-level Daemon and queue
mission local; run, retry via daemon Missions and probes
probe local; enable, disable, poll via daemon Missions and probes
remote machine-level Fleet
machines machine-level Fleet

Any other first argument fails with Unknown command "<name>".