orca-cli
Original:🇺🇸 English
Translated
Use the Orca CLI to orchestrate worktrees and live terminals through a running Orca editor. Use when an agent needs to create, inspect, update, or remove Orca worktrees; inspect repo state known to Orca; or read, send to, wait on, or stop Orca-managed terminals. Triggers include "use orca cli", "manage Orca worktrees", "read Orca terminal", "reply to Claude Code in Orca", "create a worktree in Orca", or any task where the agent should operate through Orca instead of talking to git worktrees and terminal processes directly.
431installs
Sourcestablyai/orca
Added on
NPX Install
npx skill4agent add stablyai/orca orca-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Orca CLI
Use this skill when the task should go through Orca's control plane rather than directly through , shell PTYs, or ad hoc filesystem access.
gitWhen To Use
Use for:
orca- worktree orchestration inside a running Orca app
- reading and replying to Orca-managed terminals
- stopping or waiting on Orca-managed terminals
- accessing repos known to Orca
Do not use when plain shell tools are simpler and Orca state does not matter.
orcaExamples:
- creating one Orca worktree per GitHub issue
- finding the Claude Code terminal for a worktree and replying to it
- checking which Orca worktrees have live terminal activity
Preconditions
- Prefer the public command first
orca - Orca editor/runtime should already be running, or the agent should start it with
orca open - Do not begin by inspecting Orca source files just to decide how to invoke the CLI. The first step is to check whether the installed command exists.
orca
First verify the public CLI is installed:
bash
command -v orcaThen use the public command:
bash
orca status --jsonIf the task is about Orca worktrees or Orca terminals, do this before any codebase exploration:
bash
command -v orca
orca status --jsonIf is not on PATH, say so explicitly and stop or ask the user to install/register the CLI before continuing.
orcaCore Workflow
- Confirm Orca runtime availability:
bash
orca status --jsonIf Orca is not running yet:
bash
orca open --json
orca status --json- Discover current Orca state:
bash
orca worktree ps --json
orca terminal list --json-
Resolve a target worktree or terminal handle.
-
Act through Orca:
worktree create/set/rmterminal read/send/wait/stop
Command Surface
Repo
bash
orca repo list --json
orca repo show --repo id:<repoId> --json
orca repo add --path /abs/repo --json
orca repo set-base-ref --repo id:<repoId> --ref origin/main --json
orca repo search-refs --repo id:<repoId> --query main --limit 10 --jsonWorktree
bash
orca worktree list --repo id:<repoId> --json
orca worktree ps --json
orca worktree show --worktree id:<worktreeId> --json
orca worktree create --repo id:<repoId> --name my-task --issue 123 --comment "seed" --json
orca worktree set --worktree id:<worktreeId> --display-name "My Task" --json
orca worktree rm --worktree id:<worktreeId> --force --jsonWorktree selectors supported in focused v1:
id:<worktree-id>path:<absolute-path>branch:<branch-name>issue:<number>
Terminal
Use selectors to discover terminals, then use the returned handle for repeated live interaction.
bash
orca terminal list --worktree id:<worktreeId> --json
orca terminal show --terminal <handle> --json
orca terminal read --terminal <handle> --json
orca terminal send --terminal <handle> --text "continue" --enter --json
orca terminal wait --terminal <handle> --for exit --timeout-ms 5000 --json
orca terminal stop --worktree id:<worktreeId> --jsonWhy: terminal handles are runtime-scoped and may go stale after reloads. If Orca returns , reacquire a fresh handle with .
terminal_handle_staleterminal listAgent Guidance
- If the user says to create/manage an Orca worktree, use , not raw
orca worktree ....git worktree ... - Treat Orca as the source of truth for Orca worktree and terminal tasks. Do not mix Orca-managed state with ad hoc git worktree commands unless Orca explicitly cannot perform the requested action.
- Prefer for all machine-driven use.
--json - Use as the first summary view when many worktrees may exist.
worktree ps - Use to reacquire handles after Orca reloads.
terminal list - Use before
terminal readunless the next input is obvious.terminal send - Use only when the task actually depends on process completion.
terminal wait --for exit - Prefer Orca worktree selectors over hardcoded paths when Orca identity already exists.
- If the user asks for CLI UX feedback, test the public command first. Only inspect
orcaor usesrc/cliif the public command is missing or the task is explicitly about implementation internals.node out/cli/index.js - If a command fails, prefer retrying with the public command before concluding the CLI is broken, unless the failure already came from
orcaitself.orca
Important Constraints
- Orca CLI only talks to a running Orca editor.
- Terminal handles are ephemeral and tied to the current Orca runtime.
- in focused v1 supports only
terminal wait.--for exit - Orca is the source of truth for worktree/terminal orchestration; do not duplicate that state with manual assumptions.
- The public command is the interface users experience. Agents should validate and use that surface, not repo-local implementation entrypoints.
orca
References
See these docs in this repo when behavior is unclear:
docs/orca-cli-focused-v1-status.mddocs/orca-cli-v1-spec.mddocs/orca-runtime-layer-design.md