OCM/OpenClaw 环境管理
ocm-operator
OCM/OpenClaw 环境:创建、克隆、升级、运行时、服务、日志、清理。
- License 许可
- MIT
- 所属仓库
- openclaw/Kova
- 最近更新
- 2026-11-11
- Stars
- ★ 11
- Forks
- 9
01 前言 Front Matter
- name
- ocm-operator
- description
- OCM/OpenClaw envs: create, clone, upgrade, runtimes, services, logs, cleanup.
02 资源文件 4
- 参考文档agents/openai.yaml271 B
- 参考文档references/command-cookbook.md5.2 KB
- 参考文档references/local-paths.md2.0 KB
- 参考文档references/safety-and-state.md3.0 KB
03 SKILL.md 正文
OCM Operator
Operating Model
Use OCM as the control plane for OpenClaw. Treat an OCM environment as the
isolation boundary: it owns OPENCLAW_HOME, state, config, workspace, gateway
port, runtime/launcher binding, and service policy.
Prefer OCM commands over raw OpenClaw commands whenever the task touches:
- env creation, cloning, migration, export/import, snapshots, or cleanup
- runtime install/build/verify/update/remove
- upgrades or release testing
- background gateway services
- logs, status, TUI/dashboard, plugin checks, model checks
Run OpenClaw inside an env with:
ocm @<env> -- <openclaw args>
Use ocm env exec <env> -- <command> only when you need a non-OpenClaw command
inside the env, such as env, node, or shell tooling.
First Steps
- Inspect current state before changing it:
ocm env list
ocm service status
ocm runtime list
- Read help for the exact surface before using unfamiliar flags:
ocm help start
ocm help env
ocm help runtime
ocm help service
ocm help logs
ocm help upgrade
-
For detailed command patterns, read
references/command-cookbook.md. -
For destructive operations, service boundaries, or real user state, read
references/safety-and-state.mdbefore acting. -
For this machine's common paths and release-test defaults, read
references/local-paths.md.
Decision Guide
- Start a normal runtime-backed env: use
ocm start <env> --runtime <runtime>orocm start <env> --version <version>. - Start a fresh user env: use
ocm start <env> --runtime <runtime>first; use--onboardonly when testing interactive onboarding specifically. - Use source-backed OpenClaw development: use
ocm dev <env> --repo <repo>. Do not use this as proof of release packaging. - Test release behavior from local OpenClaw source: use
ocm runtime build-local <runtime> --repo <repo> --force, then test envs against that runtime. - Test existing-user upgrade behavior: clone the existing env, upgrade the clone, and never mutate the source env directly.
- Run OpenClaw commands in an env: use
ocm @<env> -- .... - Read logs: use
ocm logs <env>. - Manage background gateway state: use
ocm service status/start/stop/restart. - Clean up: use
ocm env destroy <env> --yes; this removes env snapshots, OCM service policy, and OCM-created dev worktrees.
Safety Rules
- Treat important user envs such as
VioletandShaksas durable state. Clone first for testing unless the user explicitly asks to mutate them. - Remove envs with
ocm env destroy. - Manage OCM env gateway lifecycle with
ocm service. - Remember OCM injects
OPENCLAW_SERVICE_REPAIR_POLICY=externalfor env-run OpenClaw processes, soopenclaw doctor --fixshould repair normal env state but skip OpenClaw-owned service lifecycle repair. - Do not treat
ocm dev,pnpm openclaw, or a source worktree as release validation. For release behavior, build and use a package runtime. - Clean up temporary envs, services, worktrees, tarballs, and retained simulation envs.
- If a command could change real user data, run read-only inspection or clone first, then report the exact command you plan to run if there is ambiguity.
Verification Standard
Finish by exercising the relevant command path. Prefer these checks:
ocm env list
ocm service status <env>
ocm logs <env> --tail 100
ocm @<env> -- --version
ocm @<env> -- status
ocm @<env> -- doctor --fix
Add plugin/model/TUI checks when the task touches plugins, model auth/catalog, onboarding, or gateway connectivity:
ocm @<env> -- plugins list
ocm @<env> -- plugins update --all --dry-run
ocm @<env> -- models list
ocm @<env> -- tui
Reporting
Keep reports quiet and useful:
- lead with pass/fail/blocker status
- include the exact command for failures
- include concise evidence for passes
- separate OCM issues from OpenClaw runtime/package issues
- say which relevant checks were skipped
- include cleanup performed
Use this failure shape:
Failure:
- Command: `<exact command>`
- Expected: <expected state>
- Actual: <observed state/output>
- Impact: <why it matters>
- Likely owner: OCM | OpenClaw | test setup | external dependency
- Paste to fixer: <short actionable summary>
04 同仓库更多 Skills
OpenClaw 验证区域模板生成
derive-area-template
根据某个 OpenClaw 区域的入口点和文档,推导或刷新该区域的 kova 验证区域模板。
Kova/OpenClaw 验证
kova-operator
Kova/OpenClaw 验证:基准测试、发布门禁、场景验证、性能报告。
Crabbox 远程验证
crabbox
使用 Crabbox 包装器进行 OpenClaw 远程验证,支持 Linux、macOS、Windows 和 WSL2,包括委托的 Blacksmith Testbox 证明。报告实际的 provider 和 id。