CLI
Host Server
Set up the daemon the CLI and desktop app talk to when targeting the local machine.
The orca start command runs a headless HTTP server that any Orca desktop app or CLI can communicate with.
It manages workspaces, ports, and agent runs on the machine it's running on. The desktop app starts it automatically; on a CLI-only or headless machine you start it yourself.
If you installed the desktop app, it already includes the CLI and installs a
~/.orca/bin/orca shim on app launch. Orca terminals prepend
that directory to PATH automatically. On a headless machine, use the
standalone installer from Getting Started.
Prerequisites
git and gh need to be on your PATH. git handles clone, worktree, and branch ops; gh handles PR checkout and metadata.
gh auth loginThe host server reuses your existing gh auth. For sandboxes or CI, set GH_TOKEN (or GITHUB_TOKEN) instead of running gh auth login. gh picks it up automatically.
Agent CLIs (optional)
If you plan to run AI agents inside workspaces, install whichever agent CLIs you want available. The host server launches them based on which are on your PATH:
| Agent | Install |
|---|---|
| Claude Code | npm install -g @anthropic-ai/claude-code |
| Codex | npm install -g @openai/codex |
| Cursor Agent | install via Cursor's website |
| Amp | npm install -g @sourcegraph/amp |
| Gemini CLI | npm install -g @google/gemini-cli |
| OpenCode | see opencode.ai/docs |
None are required to start the host server or create workspaces. Install only what you plan to run.
Authenticate the Orca CLI
The host server starts under your Orca session. If you haven't already:
orca auth loginSee Getting Started for the full sign-in flow, including API-key auth for CI.
Start the host server
orca start --daemonSpawns the daemon in the background and writes a manifest at
~/.orca/host/<organizationId>/manifest.json so other clients can find
it. Binds to 127.0.0.1 only.
Verify it's healthy:
orca statusGetting started
Create or adopt a project
A workspace branches off a project: a repo registered with Orca.
Each repo gets one cloud project record, shared across the organization.
The first machine to register the repo runs projects create; every
machine after that uses projects setup to attach to the existing
project instead of creating a duplicate.
Start by checking what's already in your org:
orca projects listFirst machine: projects create
If the project doesn't exist yet, clone a remote repo or import an existing local one:
# Clone from a Git URL
orca projects create \
--name "My Project" \
--local \
--clone https://github.com/org/repo.git \
--parent-dir ~/code
# Or import a repo that's already on disk
orca projects create \
--name "My Project" \
--local \
--import ~/code/existing-repoThe host server clones (or registers) the repo, creates the cloud project record, and ensures the main workspace.
Subsequent machines: projects setup <id>
If a previous machine of yours already created the project, adopt it
instead of running create again: create would register a second,
unrelated project for the same repo. Projects are host-owned, so pick the
ID from a machine that has it (projects list --host <id>), then:
# Clone the project's repo onto this machine
orca projects setup 47c31b04-… --local --parent-dir ~/code
# Or attach to an existing local checkout
orca projects setup 47c31b04-… --local --import ~/code/repoThe URL for clone mode comes from the cloud project record, so setup
doesn't need --clone <url>. setup is idempotent: re-running against a
project that's already set up here is a no-op.
Create your first workspace
orca projects list
orca workspaces create \
--project prj_… \
--name "fix-login-bug" \
--branch fix/login-bugThe host server clones the project (if it isn't already on disk), creates a git worktree at the chosen branch, and registers the workspace.
You can also create a workspace from a pull request number:
orca workspaces create \
--project prj_… \
--name "review-pr-123" \
--pr 123 \
--localStop the host server
orca stopShared state
State lives under ~/.orca/host/<organizationId>/:
~/.orca/host/<organizationId>/manifest.json # endpoint + auth token
~/.orca/host/<organizationId>/host.db # local host server DBA host server started by the desktop app is visible to the CLI and
vice-versa. ORCA_HOME_DIR relocates the whole tree.
Command details
For full flags, exit codes, and output shapes: