Docs/AI and automation

CLI reference

Every orca command and flag, for containers, images, stacks, Kubernetes, the gateway, the CA, config and worktree instances.

On this page

The orca command talks to the Orca daemon, so you can script what the app does: run worktree instances, manage containers, stacks and the gateway, and install the CA certificate. This page lists every command and flag.

Run orca --help or orca <command> --help for the same information in your terminal.

Install

The CLI ships with the desktop app, next to the daemon:

  • macOS: /Applications/Orca Desktop.app/Contents/MacOS/orca. To use it as orca, link it into a folder on your PATH:

    Terminal
    sudo ln -s "/Applications/Orca Desktop.app/Contents/MacOS/orca" /usr/local/bin/orca
  • Windows: the installer adds the install folder to your user PATH. Open a new terminal after installing.

  • Linux: included in the .deb and AppImage bundles.

To build it from source:

Terminal
cargo build --release --bin orca
./target/release/orca version

Connect and authenticate

Every command except the config commands goes through the daemon API. Two global options control how:

OptionEnvironment variableDefaultPurpose
--token <TOKEN>ORCA_TOKENtoken from the config fileAPI token sent as a Bearer header
--daemon-url <URL>ORCA_DAEMON_URLhttp://127.0.0.1:9477Daemon address

Without --token or ORCA_TOKEN, the CLI reads api_token from Orca's config file (~/Library/Application Support/orca/config.json on macOS, ~/.config/orca/config.json on Linux, %APPDATA%\orca\config.json on Windows). On the machine where the app runs you normally don't need to set anything.

To control a daemon on another machine:

Terminal
ORCA_DAEMON_URL=http://build-box:9477 ORCA_TOKEN=... orca containers list

Status and version

CommandWhat it does
orca statusDaemon health and version. Inside a registered project, also this worktree's instance: status, URLs and shared services.
orca versionCLI version and daemon version (or daemon: not running).

orca status flags:

FlagMeaning
--allList every instance of the project.
--jsonMachine-readable output, for the instance only.

Worktree instances

These commands work out the project and instance from the current folder, so you run them inside a git worktree of a registered project. Each worktree gets its own running copy of the app, while databases and other shared services run once.

orca projects

Terminal
orca projects add [PATH]      # register a git repo (default: current folder)
orca projects list [--json]   # registered projects, shared services and instances
orca projects remove <ID>     # unregister a project (stop its instances first)

Any worktree of a repo works for add.

orca up

Start or rebuild this worktree's instance and wait until it's up. It prints each step, then the URLs and the path of the .orca/env file.

FlagMeaning
--profile <PROFILE>Compose profile to run as well. Repeat for several. Remembered for the next start; without it, the last choice is used.
--no-buildDon't rebuild images from this worktree's code.
--jsonPrint the finished job as JSON.

orca down

Stop this worktree's instance.

FlagMeaning
--removeAlso delete its volumes, images, host ports and generated files.
--jsonPrint the finished job as JSON.

orca logs

Terminal
orca logs [SERVICE] [--tail 200] [-f]
Argument or flagMeaning
SERVICEOnly this service. Without it, all services.
--tail <N>Lines per service. Default 200.
-f, --followKeep printing new lines.

orca env

Print the instance's URLs, ports and connection strings from .orca/env as shell exports:

Terminal
eval $(orca env)

Run orca up first: the file doesn't exist until the instance has started.

orca run

Run a command with the instance's environment. It starts the instance if it isn't running, loads .orca/env into the command's environment, and exits with the command's exit code.

Terminal
orca run -- npm test
orca run --serve web -- npm run dev
FlagMeaning
--profile <PROFILE>Compose profile to run as well. Repeat for several.
--serve <SERVICE>Run a dev server on your machine as SERVICE. The command gets a port in $PORT, HOST=0.0.0.0 and the service's URL in ORCA_URL_<SERVICE>, and the service's URL routes to it through the gateway until the command ends.
--downStop the instance when the command ends.
--no-upDon't start the instance; only pass its environment.

Everything after -- is the command and its arguments.

Workspaces

A workspace sets up a team's local environment from one repo.

CommandWhat it does
orca workspace join <git url>Clone the workspace and apply it: network, gateway, shared services, routes. --folder picks where.
orca workspace statusThe workspace and its projects: cloned, running, URLs, missing secrets. --json for scripts.
orca workspace setup <project>Clone, configure and start a project. --rerun-setup runs its setup command again.
orca workspace updatePull the workspace and apply it again.
orca workspace leaveForget the workspace, remove its routes and put the gateway's domain and certificate back.
orca workspace import-haproxy <file>Print workspace routes for an HAProxy config. --domain shortens hostnames under it.

AI tools (MCP)

orca mcp runs Orca as an MCP server over stdio for Claude Code, Claude Desktop, Cursor and other AI tools. It reads the token from Orca's config, so the AI tool's config holds none. See AI agents and MCP.

CommandWhat it does
orca mcpServe MCP on stdin/stdout for the local daemon. AI tools start this themselves.
orca mcp --host <name>The same for a remote host from Orca Desktop's Remote hosts.
orca mcp install [tool]Add Orca to every supported AI tool found on this machine, or to one: claude-code, claude-desktop, cursor, vscode, windsurf, codex.
orca mcp uninstall [tool]Remove Orca from them again.
orca mcp statusWhich AI tools are found and which are connected.

Containers

Terminal
orca containers list
orca containers start <ID>
orca containers stop <ID>
orca containers logs <ID> [--tail <N>]
orca containers exec <ID> -- <COMMAND> [ARGS...]

<ID> is a container ID or name. exec exits with the command's exit code.

Images

Terminal
orca images list
orca images pull <REFERENCE>    # for example nginx:alpine
orca images remove <ID>         # image ID or tag
orca images prune               # remove unused images

Stacks

Terminal
orca stacks list           # name, status, service count and directory
orca stacks up <NAME>      # docker compose up
orca stacks down <NAME>    # docker compose down

Deploy

Terminal
orca deploy <PATH>
orca deploy --template <ID>
Argument or flagMeaning
PATHA project folder with a compose file (compose.yaml, compose.yml, docker-compose.yaml or docker-compose.yml), or a .yml or .yaml compose file itself. A relative path is taken from the folder you run the command in. The stack is named after the folder. The daemon reads the files, so with --daemon-url pointing at a remote host, give an absolute path on that host.
--template <ID>Deploy an app template by ID instead. Find IDs with orca templates list.

Templates

Terminal
orca templates list
orca templates search <QUERY>   # matches name, description and category

Kubernetes

Terminal
orca k8s status              # enabled, running, version, node, pod counts
orca k8s enable
orca k8s disable
orca k8s runtime [VALUE]

orca k8s runtime without a value shows the cluster's container runtime. Set it to docker (the default, so images you build locally are usable without a push or import) or containerd.

Machines

Terminal
orca machine list

Gateway

Terminal
orca gateway status
orca gateway start
orca gateway stop
orca gateway routes
orca gateway add <HOST> <CONTAINER> <PORT>
orca gateway remove <HOST>
orca gateway config [flags]

add routes a hostname such as app.localhost to a container's port. remove deletes the route for a hostname.

orca gateway config shows the configuration when run without flags, or updates it:

FlagMeaning
--showShow the current config (the default with no flags).
--domain <DOMAIN>Set the gateway domain.
--http-port <PORT>Set the HTTP port.
--https-port <PORT>Set the HTTPS port.
--tls-mode <MODE>orca_ca or custom.
--cert-file <PATH>PEM certificate file, for custom TLS.
--key-file <PATH>PEM key file, for custom TLS.

See Gateway for how hostnames and certificates work.

CA certificate

Terminal
orca ca info      # subject, expiry and fingerprint
orca ca export    # print the CA certificate (PEM) to stdout
orca ca install   # add it to the system trust store

orca ca install uses sudo security add-trusted-cert on macOS, sudo update-ca-certificates on Linux and certutil on Windows, so expect a password prompt on macOS and Linux. If it fails, it prints the command to run by hand and where it saved the certificate.

Config

These commands read and write Orca's config file directly, without going through the daemon. They cover the gateway settings.

Terminal
orca config export [--include-secrets] > orca-config.yaml
orca config import orca-config.yaml
orca config get <KEY>
orca config set <KEY> <VALUE>
CommandMeaning
exportPrint the gateway domain, ports, TLS mode and routes as YAML. --include-secrets adds the custom certificate and key.
import <FILE>Apply gateway settings and routes from a YAML file.
get <KEY> / set <KEY> <VALUE>Read or change one value.

Valid keys are gateway.domain, gateway.http_port, gateway.https_port and gateway.tls_mode (orca_ca or custom).