CLI commands
Tham chiếu CLI
openclaw là điểm vào CLI chính. Mỗi lệnh lõi có một trang tham chiếu
riêng hoặc được ghi tài liệu cùng với lệnh mà nó alias; mục lục này liệt kê
các lệnh, các cờ toàn cục và quy tắc định kiểu đầu ra áp dụng trên toàn CLI.
Dùng các lệnh thiết lập theo mục đích:
openclaw setupvàopenclaw onboardchạy toàn bộ lộ trình hướng dẫn lần chạy đầu tiên cho gateway, xác thực model, workspace, kênh, skills và sức khỏe.openclaw setup --baselinetạo cấu hình baseline và workspace mà không đi qua luồng onboarding có hướng dẫn.openclaw configurethay đổi các phần được nhắm tới của một thiết lập hiện có, chẳng hạn như xác thực model, gateway, kênh, plugin hoặc skills.openclaw channels addcấu hình tài khoản kênh sau khi baseline đã tồn tại; chạy không có cờ để thiết lập kênh có hướng dẫn hoặc dùng các cờ dành riêng cho kênh trong script.
Trang lệnh
| Khu vực | Lệnh |
|---|---|
| Thiết lập và onboarding | crestodian · setup · onboard · configure · config · completion · doctor · dashboard |
| Đặt lại và gỡ cài đặt | backup · reset · uninstall · update |
| Nhắn tin và tác tử | message · agent · agents · attach · acp · mcp |
| Sức khỏe và phiên | status · health · sessions |
| Gateway và nhật ký | gateway · logs · system |
| Model và suy luận | models · infer · capability (alias cho infer) · memory · commitments · wiki |
| Mạng và node | directory · nodes · devices · node |
| Runtime và sandbox | approvals · exec-policy (xem approvals) · sandbox · tui · chat/terminal (alias cho tui --local) · browser |
| Tự động hóa | cron · tasks · hooks · webhooks · transcripts |
| Khám phá và tài liệu | dns · docs |
| Ghép đôi và kênh | pairing · qr · channels |
| Bảo mật và plugin | security · secrets · skills · plugins · proxy |
| Alias legacy | daemon (dịch vụ gateway) · clawbot (namespace) |
| Plugin (tùy chọn) | path · policy · voicecall · workboard (nếu đã cài đặt) |
Cờ toàn cục
| Cờ | Mục đích |
|---|---|
--dev |
Cô lập trạng thái trong ~/.openclaw-dev và dịch chuyển các cổng mặc định |
--profile <name> |
Cô lập trạng thái trong ~/.openclaw-<name> |
--container <name> |
Nhắm tới một container có tên để thực thi |
--no-color |
Tắt màu ANSI (NO_COLOR=1 cũng được tôn trọng) |
--update |
Dạng viết tắt cho openclaw update (chỉ cài đặt từ nguồn) |
-V, --version, -v |
In phiên bản rồi thoát |
Chế độ đầu ra
- Màu ANSI và chỉ báo tiến trình chỉ hiển thị trong phiên TTY.
- Siêu liên kết OSC-8 hiển thị dưới dạng liên kết có thể nhấp ở nơi được hỗ trợ; nếu không, CLI sẽ fallback về URL thuần.
--json(và--plainở nơi được hỗ trợ) tắt định kiểu để có đầu ra sạch.- Các lệnh chạy lâu hiển thị chỉ báo tiến trình (OSC 9;4 khi được hỗ trợ).
Nguồn chân lý của bảng màu: src/terminal/palette.ts.
Cây lệnh
Cây lệnh đầy đủ
openclaw [--dev] [--profile <name>] <command>crestodiansetuponboardconfigureconfig get set unset file schema validatecompletiondoctordashboardbackup create verifysecurity auditsecrets reload audit configure applyresetuninstallupdate wizard statuschannels list status capabilities resolve logs add remove login logoutdirectory self peers list groups list|membersskills search install update list info checkplugins list inspect install uninstall update enable disable doctor marketplace listworkboard list create show dispatchmemory status index searchtranscripts list show pathpath resolve find set validate emitcommitments list dismisswiki status doctor init ingest compile lint search get apply bridge import unsafe-local import obsidian status|search|open|command|dailymessage send broadcast poll react reactions read edit delete pin unpin pins permissions search thread create|list|reply emoji list|upload sticker send|upload role info|add|remove channel info|list member info voice status event list|create timeout kick banagentagents list add delete bindings bind unbind set-identityattachacpmcp serve list show set unsetstatushealthsessions cleanuptasks list audit maintenance show notify cancel flow list|show|cancelgateway call usage-cost health status probe discover install uninstall start stop restart rundaemon status install uninstall start stop restartlogssystem event heartbeat last|enable|disable presencemodels list status set set-image aliases list|add|remove fallbacks list|add|remove|clear image-fallbacks list|add|remove|clear scaninfer (alias: capability) list inspect model run|list|inspect|providers|auth login|logout|status image generate|edit|describe|describe-many|providers audio transcribe|providers tts convert|voices|providers|status|enable|disable|set-provider video generate|describe|providers web search|fetch|providers embedding create|providers auth add|login|login-github-copilot|setup-token|paste-token auth order get|set|clearsandbox list recreate explaincron status list get add edit rm enable disable runs runnodes status describe list pending approve reject rename invoke notify push canvas snapshot|present|hide|navigate|eval canvas a2ui push|reset camera list|snap|clip screen record location getdevices list remove clear approve reject rotate revokenode run status install uninstall stop restartapprovals get set allowlist add|removeexec-policy show preset setbrowser status start stop reset-profile tabs open focus close profiles create-profile delete-profile screenshot snapshot navigate resize click type press hover drag select upload fill dialog wait evaluate console pdfhooks list info check enable disable install updatewebhooks gmail setup|runproxy start run coverage sessions query blob purgepairing list approveqrclawbot qrdocsdns setuptuichat (alias: tui --local)terminal (alias: tui --local)Plugin có thể thêm các lệnh cấp cao nhất bổ sung, chẳng hạn như
openclaw workboard hoặc openclaw voicecall.
Lệnh slash trong chat
Tin nhắn chat hỗ trợ các lệnh /.... Xem lệnh slash.
Điểm nổi bật:
/status— chẩn đoán nhanh./trace— các dòng trace/debug plugin theo phạm vi phiên./config— thay đổi cấu hình được lưu bền vững./debug— ghi đè cấu hình chỉ trong runtime (bộ nhớ, không phải ổ đĩa; yêu cầucommands.debug: true).
Theo dõi sử dụng
openclaw status --usage và Control UI hiển thị mức sử dụng/hạn ngạch nhà cung cấp khi
thông tin xác thực OAuth/API có sẵn. Dữ liệu đến trực tiếp từ endpoint sử dụng
của nhà cung cấp và được chuẩn hóa thành X% left. Các nhà cung cấp có cửa sổ sử dụng
hiện tại: Anthropic, GitHub Copilot, Gemini CLI, OpenAI Codex, MiniMax,
Xiaomi và z.ai.
Xem Theo dõi sử dụng để biết chi tiết.