Every command accepts a global
--json flag that emits a stable envelope to stdout for scripting, piping, and coding agents: {"success": true, "data": …} on success, {"success": false, "error": {"code", "message", "suggestion"}} on failure. Run apollo <command> --help for the live flag list on your installed version.Quick Reference
Global Flags
Place global flags before the subcommand; command-specific flags go after it (apollo --json push -m "…").
Exit codes:
0 success · 1 runtime/API failure · 2 validation failure · 3 authentication/configuration failure.
Session & Context
apollo login
apollo login
Authenticate with Apollo. With no options, opens the browser sign-in flow.
apollo logout
apollo logout
Invalidate the remote session (best-effort) and remove the local credential.
apollo status
apollo status
Show the active Apollo context: profile, checkout, authentication, organization, project, agent, version, runtime, and token expiry.
apollo doctor
apollo doctor
Diagnose the setup end to end: runtimes (Node/Bun), install origin, shell integration,
APOLLO_* overrides, terminal capabilities, credential permissions, token expiry, the current checkout, and service reachability. Read-only, with the fix attached to every finding; exits 2 on problems. Share its output when reporting issues.apollo upgrade
apollo upgrade
Upgrade Apollo from npm (
@aui.io/apollo).apollo profile
apollo profile
Show or select the active credential profile. Profiles keep separate credentials for different users or contexts.
--profile <name> before any command is a one-command override; it does not change the saved default. Change the default with apollo profile use.apollo org
apollo org
List organizations and re-scope the access token to one. You rarely need this directly —
use without an id opens an interactive picker.apollo agent use switches the organization-scoped token automatically when the selected agent requires another org.apollo project
apollo project
Manage projects — the containers agents live in.
use inside a checkout updates that checkout’s .apollorc; outside any checkout it sets the account default.Agents & Checkouts
apollo agent
apollo agent
Manage agents and their local checkouts. A checkout is a directory holding one agent, pinned by its own
.apollorc. With shell integration, use, import, and create also cd into the checkout.agent create options:agent import options:Import writes
.apollorc, materializes the program files, registers the checkout, makes the agent active, installs the authoring skill packs, and records a local diff baseline. agent use only enters checkouts already known to the registry — import remote-only agents first.There is intentionally no delete command.
agent unlink removes only the local binding.apollo runtime
apollo runtime
Select the runtime (engine build) this checkout runs against.
Authoring
apollo validate
apollo validate
Validate the local agent program — the verdict plus the orphan and era censuses. Exits
2 on findings.apollo diff
apollo diff
Compare local files with the last baseline (the last successful import, pull, or push).
apollo pull
apollo pull
Pull the selected agent version plus the schemas, skills, and
AGENTS.md its runtime serves. Pull refuses to overwrite local changes unless forced; a successful pull makes bundle/src match the remote snapshot exactly, including deleting local files no longer in the remote bundle.apollo push
apollo push
Validate and push local changes — a changed program mints a version; a changed
bundle/build ships a build bundle. Push validates first, creates a draft from a published version when necessary, commits the bundle, updates .apollorc to the returned tag, and refreshes the diff baseline.Pushing is not publishing — a pushed version goes live only after
apollo version publish <tag>.apollo version
apollo version
Manage agent versions.
version create options: --from <tag> (clone an existing version) · --template <id> (create from a template) · --label <label> · --notes <notes>.use binds a version tag in the checkout — the push base and pull default. publish is also the rollback/switch operation: publishing an older version makes it live again. Don’t archive the live version.Server-Side Authoring & Evaluation
apollo advise
apollo advise
Ask the server-side authoring advisor — ships this checkout’s tree and waits for grounded advice.
apollo build
apollo build
Run one build turn over this checkout’s pushed agent, server-side. The turn is gated: green pushes a new version and pulls it into the checkout; red refuses.
apollo regress
apollo regress
Run the scripted suite (
bundle/build/scenarios.yaml) live through the simulator — every turn said as written, one real conversation per scenario, nobody improvising. The run is frozen at start, so you can keep editing while it runs. No push needed, and it reports rather than gates.With the judge off, a scenario passes when its script ran clean end to end; --judge also grades each conversation against the cases it covers.apollo evaluate
apollo evaluate
Evaluate the agent with improvising simulated callers, planned from guidelines you write in plain words together with the bundle’s own records (
cases.yaml, needs.yaml, world.yaml), graded by a judge, ending on a macro verdict — summary, findings, per-case coverage, and candidate regression scenarios. Where regress replays fixed turns, evaluate explores.Push first: the run binds to a pushed version.Testing & Inspection
apollo chat
apollo chat
Chat with an agent, or start an interactive session. Alias: Turns on one thread are strictly sequential (a racing turn is refused with
apollo send. Calling apollo chat with no text opens a REPL in an interactive terminal; scripts should pass text explicitly with --no-input.A send without
--thread creates and persists a thread — capture data.thread_id from --json output and pass --thread on later turns for multi-turn conversations:API_423), but separate threads share nothing — run them concurrently (around 20 parallel threads is a sane cap).apollo thread
apollo thread
Inspect Apollo threads. Messages are sent as the signed-in user;
thread list likewise lists the signed-in user’s threads.trace returns the runtime’s official turn-trace view, whose vocabulary is the program’s capabilities, policies, facts, sources, and records.Resources
apollo kb
apollo kb
The agent’s knowledge hubs — the corpora that
hub: sources search at runtime. A source in bundle/src/sources.yaml names its hub (hub: <name>), and the match is by name. Every kb command needs an agent checkout.apollo vault
apollo vault
Manage vault secrets. A connection refers to one by name — as its
token_env, or as ${NAME} in bundle/src/connections.yaml — so the value itself never enters the bundle.apollo mockdb
apollo mockdb
Manage the per-agent mock database — a test database the agent’s connections can run against.
Shell
apollo shell-init
apollo shell-init
Print the shell wrapper (zsh/bash) enabling auto-cd after
agent use / agent import / agent create. Add to your shell profile:Next Steps
Configuration
Checkout structure, config files, and environment variables.
Workflows
Common development workflows and patterns.