CLI orca nói chuyện với một runtime Orca đang chạy. Dùng nó khi một shell script hoặc agent cần kiểm tra worktree, khởi chạy terminal, mở file, tự động hoá trình duyệt built-in, hoặc báo cáo tiến độ ngược lại vào Orca.
Xác minh runtime
Phần tiêu đề “Xác minh runtime”Đăng ký CLI ở Settings → Experimental → CLI, rồi kiểm tra xem nó có tới được Orca không:
command -v orcaorca status --jsonNếu Orca chưa chạy sẵn:
orca open --jsonorca status --jsonDùng --json khi một tool khác sẽ parse kết quả. Output đọc được cho người chỉ dành cho kiểm tra nhanh trên terminal.
Selector
Phần tiêu đề “Selector”Hầu hết lệnh chấp nhận selector thay vì bắt buộc ID dài:
orca repo show --repo id:<repoId> --jsonorca worktree show --worktree active --jsonorca worktree show --worktree path:/abs/path/to/worktree --jsonorca worktree show --worktree branch:feature-name --jsonorca worktree show --worktree issue:123 --jsonactive và current resolve thành worktree Orca-managed bao quanh thư mục hiện tại của shell hoặc context terminal. Dùng selector tường minh trong script có thể chạy ngoài worktree đích. Với runtime remote, ưu tiên selector đầy đủ phía server như id:<repoId>::<absolute-worktree-path> hoặc path:<absolute-server-path> vì thư mục hiện tại của shell local có thể không tồn tại trên host runtime.
Lệnh runtime
Phần tiêu đề “Lệnh runtime”orca open --jsonorca status --jsonorca serve --port 6768 --pairing-address 100.64.1.20 --jsonorca serve khởi động một runtime server ở foreground mà không mở cửa sổ desktop. Dùng nó cho Remote Orca Server hoặc môi trường headless, và dừng bằng Ctrl-C.
orca repo list --jsonorca repo add --path /abs/path/to/repo --jsonorca repo show --repo id:<repoId> --jsonorca repo set-base-ref --repo id:<repoId> --ref origin/main --jsonorca repo search-refs --repo id:<repoId> --query main --limit 10 --jsonĐặt base ref của repo trước khi tạo nhiều worktree, để task mới mặc định branch đúng chỗ.
Worktree
Phần tiêu đề “Worktree”orca worktree list --repo id:<repoId> --jsonorca worktree ps --jsonorca worktree current --jsonorca worktree show --worktree active --jsonorca worktree create --repo id:<repoId> --name fix-login --jsonorca worktree create --name child-task --agent codex --prompt "Investigate the flaky login test" --jsonorca worktree set --worktree active --comment "reproduced failure; testing token refresh fix" --jsonorca worktree rm --worktree id:<worktreeId> --force --jsonKhi worktree create chạy từ bên trong một worktree Orca-managed, Orca ghi worktree mới là con nếu suy luận được quan hệ đó. Truyền --parent-worktree active để nói rõ, hoặc --no-parent khi công việc mới độc lập.
Flag khởi động agent:
orca worktree create --name review-api --agent claude --setup run --jsonorca worktree create --name quick-check --agent codex --prompt "Summarize the diff" --setup skip --jsonorca worktree create --name hidden-setup --setup inherit --json--agent khởi chạy agent đã chọn trong terminal đầu tiên. --prompt gửi công việc ban đầu cho agent đó. --setup run|skip|inherit điều khiển hook setup repo; inherit theo policy của repo.
Terminal
Phần tiêu đề “Terminal”orca terminal list --worktree active --jsonorca terminal show --terminal <handle> --jsonorca terminal read --terminal <handle> --jsonorca terminal read --terminal <handle> --cursor <cursor> --limit 1000 --jsonorca terminal send --terminal <handle> --text "continue" --enter --jsonorca terminal wait --terminal <handle> --for tui-idle --timeout-ms 300000 --jsonorca terminal create --worktree active --title "tests" --command "npm test" --jsonorca terminal split --terminal <handle> --direction horizontal --command "npm run dev" --jsonorca terminal rename --terminal <handle> --title "runner" --jsonorca terminal switch --terminal <handle> --jsonorca terminal close --terminal <handle> --jsonBỏ --terminal để nhắm vào terminal đang active trong worktree hiện tại. Đọc trước khi gửi khi bạn không chắc terminal đang chờ gì.
Với output dài, dùng đọc theo cursor. Lưu nextCursor từ một lần đọc, rồi truyền lại bằng --cursor để chỉ lấy output mới.
orca file open src/App.tsx --worktree active --jsonorca file diff src/App.tsx --staged --worktree active --jsonorca file open-changed --mode both --worktree active --jsonĐường dẫn tương đối với worktree đã chọn. open-changed đọc git status và mở file đã thay đổi ở chế độ edit, diff, hoặc cả hai.
Trình duyệt built-in
Phần tiêu đề “Trình duyệt built-in”Lệnh browser điều khiển tab trình duyệt nhúng của Orca cho worktree đã chọn. Chúng không điều khiển Chrome, Safari, hay UI desktop của Orca.
Dùng vòng lặp snapshot → hành động → snapshot lại:
orca goto --url http://localhost:3000 --worktree active --jsonorca snapshot --worktree active --jsonorca click --element @e3 --worktree active --jsonorca fill --element @e1 --value "test@example.com" --worktree active --jsonorca wait --text "Welcome" --worktree active --jsonorca screenshot --worktree active --jsonRef như @e3 đến từ snapshot. Snapshot lại sau khi điều hướng, chuyển tab, click làm đổi trang, và bất kỳ lỗi ref-đã-cũ nào.
Lệnh tab và capture:
orca tab list --worktree active --jsonorca tab create --url http://localhost:3000 --worktree active --jsonorca tab switch --index 1 --worktree active --jsonorca capture start --worktree active --jsonorca console --limit 50 --worktree active --jsonorca network --limit 50 --worktree active --jsonorca full-screenshot --worktree active --jsonorca pdf --worktree active --jsonDùng orca exec --command "<agent-browser command>" --json chỉ cho các hành động browser chưa có lệnh Orca định kiểu riêng.
Giả lập device trên trình duyệt:
orca set device --name "iPhone 12" --worktree active --jsonorca screenshot --worktree active --jsonComputer use trên desktop
Phần tiêu đề “Computer use trên desktop”Dùng orca computer cho app desktop native ngoài trình duyệt built-in:
orca computer permissions --jsonorca computer list-apps --jsonorca computer get-app-state --app com.apple.Safari --jsonorca computer click --app com.apple.Safari --element-index 12 --jsonorca computer paste-text --app com.apple.Safari --text "hello" --jsonXem Computer use để biết luồng đầy đủ và cách thiết lập quyền.
Mobile emulator
Phần tiêu đề “Mobile emulator”Lệnh mobile emulator điều khiển thiết bị iOS Simulator qua cầu nối giới hạn theo worktree của Orca. Dùng chúng thay vì serve-sim hay simctl thô khi agent đang thao tác từ bên trong Orca, để vòng đời và state device active gắn liền với worktree hiện tại.
orca emulator list --worktree active --jsonorca emulator attach "<device-name-or-udid>" --worktree active --jsonorca emulator tap 0.5 0.7 --worktree active --jsonorca emulator type "hello" --worktree active --jsonorca emulator gesture '[{"type":"begin","x":0.5,"y":0.8},{"type":"move","x":0.5,"y":0.4},{"type":"end","x":0.5,"y":0.2}]' --worktree active --jsonorca emulator button home --worktree active --jsonorca emulator rotate landscape_left --worktree active --jsonorca emulator exec --command "tap 0.5 0.7" --worktree active --jsonorca emulator kill --worktree active --jsonorca emulator shutdown --worktree active --jsonToạ độ được chuẩn hoá từ 0 đến 1. Ưu tiên tap cho các cú chạm đơn, và dùng gesture cho thao tác kéo hoặc chạm nhiều bước. Truyền --device <udid-or-name> hoặc --emulator <id> khi một script cần nhắm vào một simulator cụ thể thay vì emulator active của worktree.
Linear
Phần tiêu đề “Linear”Bề mặt orca linear là thứ agent dùng qua skill orca-linear (tên cài cũ linear-tickets vẫn còn hoạt động). Ưu tiên --json. Worktree đã liên kết resolve bằng --current.
orca linear issue --current --full --jsonorca linear issue ENG-123 --comments --children --relations --activity --jsonorca linear search "auth bug" --workspace all --jsonorca linear list --filter assigned --limit 10 --jsonorca linear list-issues --team ENG --state started --assignee me --jsonorca linear list-issues --query auth --updated-at -P7D --cursor <cursor> --workspace <id> --jsonorca linear team list --jsonorca linear team states --team ENG --jsonorca linear team labels --team ENG --jsonorca linear project list --query launch --json--full mở rộng comment, children, attachment, relation, và activity. Các flag theo mục (--comments, --children, --attachments, --relations, --activity) hoạt động riêng lẻ.
Ghi kiểu MCP
Phần tiêu đề “Ghi kiểu MCP”# Tạo hoặc cập nhật (bỏ id/--current để tạo; cần --team và --title khi tạo)orca linear save-issue --team ENG --title "Fix auth" --priority high --jsonorca linear save-issue ENG-123 --state "In Progress" --assignee me --jsonorca linear save-issue --current --project null --due-date null --json
orca linear relation add ENG-1 --related ENG-2 --type blocks --jsonorca linear relation remove ENG-1 --related ENG-2 --type related --jsonLabel trong save-issue thay thế toàn bộ tập label (đúng ngữ nghĩa save_issue của Linear MCP). null trần sẽ xóa assignee, estimate, due date, project, hoặc parent.
Field helper (vẫn còn dùng được)
Phần tiêu đề “Field helper (vẫn còn dùng được)”orca linear status set --current --to "In Progress" --jsonorca linear assignee set --current --me --jsonorca linear priority set ENG-123 --to high --jsonorca linear estimate set --current --to 3 --jsonorca linear due-date set --current --to 2026-08-01 --jsonorca linear label add --current --label backend --jsonorca linear comment add --current --body "Investigating regression" --jsonorca linear attach --current --url https://example.com/repro --title "Repro" --jsonorca linear create --title "Flaky login test" --team ENG --priority high --jsonChạy orca linear --help hoặc orca skills get orca-linear để xem danh sách khớp đúng phiên bản. Truyền một issue id tường minh (ví dụ ENG-123) khi script có thể chạy ngoài một worktree đã liên kết Orca.
Skills (local, không cần runtime)
Phần tiêu đề “Skills (local, không cần runtime)”Liệt kê guide có sẵn, in ra một guide khớp phiên bản, hoặc cài/cập nhật gói skill hybrid mà không cần Settings UI desktop:
orca skills listorca skills get orca-cliorca skills get orchestration --fullorca skills install --skill orca-cli --skill orchestrationorca skills install --all --dry-runorca skills update --allinstall / update gọi ra cùng lệnh npx skills mà Settings dùng. Chúng không liên hệ tới runtime Orca. Xem Orca skills.
Account (runtime local trên host)
Phần tiêu đề “Account (runtime local trên host)”Trên một host headless chạy Orca (orca serve hoặc app desktop), thêm tài khoản Claude/Codex được quản lý khi client remote không dùng được Add account (phạm vi runtime remote tắt nút đó):
orca account listorca account add # Claude mặc địnhorca account add --agent codexaccount add chạy claude login / codex login ngay trong terminal này trên host, rồi đăng ký credential đã bắt được với runtime local. Codex dùng device authorization nên trình duyệt có thể hoàn tất trên một máy khác. Chạy các lệnh này trên chính máy sở hữu tài khoản - không phải qua một session remote chỉ-client.
Artifact
Phần tiêu đề “Artifact”Publish HTML hoặc Markdown qua tài khoản Orca đã đăng nhập. Xem một link công khai không cần đăng nhập; tạo/list/update/delete thì cần. Publish mặc định tắt - một người phải bật Settings → Artifacts → Allow publishing public artifact links trên thiết bị. Không có flag CLI nào mở cổng này. list, unshare, và delete vẫn khả dụng để bạn audit hoặc thu hồi link sau khi tắt publish.
orca artifacts share ./report.html --jsonorca artifacts share ./notes.md --jsonorca artifacts update ./notes.md --jsonorca artifacts unshare ./notes.md --jsonorca artifacts list --jsonorca artifacts list --cursor <cursor> --jsonorca artifacts delete <id> --json- File được chấp nhận:
.html,.htm,.md,.markdown. sharelưu edit token trong profile Orca đang active và không in ra nó.update/unshareresolve theo cùng đường dẫn local và profile đã share file đó ban đầu.listphân trang (nextCursor→--cursor).deletenhận artifact id từlistvà không cần file gốc.- Asset HTML dạng tương đối không được upload - chia sẻ HTML tự chứa hoặc dùng URL asset tuyệt đối.
- Publish/update bị từ chối sẽ fail với
artifact_sharing_disabled; sửa trong Settings thay vì thử lại. - Desktop: mở một file HTML hoặc Markdown local và dùng Share as artifact, hoặc quản lý link từ trang sidebar Artifacts.
Automation, environment, và hook
Phần tiêu đề “Automation, environment, và hook”Prompt theo lịch:
orca automations list --jsonorca automations create --name "Daily review" --trigger daily --time 09:00 --prompt "Review open changes" --provider codex --repo id:<repoId> --disabled --jsonorca automations run <automationId> --jsonEnvironment runtime remote:
orca environment add --name work-laptop --pairing-code "orca://pair?code=..." --jsonorca environment list --jsonorca environment rm --environment <selector> --jsonHook trạng thái agent:
orca agent hooks status --jsonorca agent hooks on --jsonorca agent hooks off --jsonThói quen tốt cho agent
Phần tiêu đề “Thói quen tốt cho agent”- Ưu tiên
--jsoncho các lệnh gọi tự động và từ agent. - Ưu tiên selector hơn là parse nhãn UI.
- Đọc trạng thái terminal trước khi gửi input, trừ khi input tiếp theo đã rõ ràng.
- Dùng comment worktree cho các checkpoint tiến độ. Xem Worktree checkpoint.
- Dùng Orchestration cho các dispatch đa agent cần theo dõi, thay vì prompt terminal tự phát.
lượt xem