Cli 导读

Path:命令行这颗按钮到底按哪儿

命令行里的 Path 像一排小开关。你要先认清哪一颗是开门、哪一颗是查看、哪一颗是修理,出错时又该先听哪一种回声。原文最响的一记鼓点,其实是:openclaw path。

先听这页的人话版

Path

这一页不是在堆术语,它像把“Path”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:openclaw path。

如果把这页当成“给普通人看的版本”,你最应该带走的是:它到底在教你一件什么事、什么时候要这样做、以及哪里最容易踩坑。

原始路径:/cli/path 章节数量:24 查看原文

第 1 站

Start Here

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

这段在解决什么

这一节更像安装或配置步骤,重点不是概念,而是“按什么顺序做才不会卡住”。

为什么值得看

很多文档看起来长,其实是在防你漏掉前置条件。

真要动手时

真正照做时,先找前置条件,再找必填项,最后看验证方法。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path 新本领插件-provided shell access to the oc:// addressing substrate: one kind-dispatched path scheme for inspec…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path。

原文小纸条

# openclaw path

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:新本领插件-provided shell access to the oc:// addressing substrate: one kind-dispatched path scheme for inspecting and editi…。

原文小纸条

Plugin-provided shell access to the oc:// addressing substrate: one kind-dispatched path scheme for inspecting and editing addressable workspace files (markdown, jsonc, jsonl, yaml/yml/lobster). Self-hosters, plugin authors, and editor extensions use it to read, find, or update a narrow location without hand-rolling per-file parsers.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The CLI mirrors the substrate's public verbs:。

原文小纸条

The CLI mirrors the substrate's public verbs:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:positional expansion.

原文小纸条

positional expansion.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:rejected before writing.

原文小纸条

rejected before writing.

像准备清单

这一串条目别硬背,把它当成“Start Here”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:resolve is concrete and single-match.、find is the multi-match verb for wildcard…、set only accepts concrete paths or insert…。

原文小纸条
  • resolve is concrete and single-match.
  • find is the multi-match verb for wildcards, unions, predicates, and
  • set only accepts concrete paths or insertion markers; wildcard patterns are
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:path is provided by the bundled optional oc-path 新本领插件. Enable it before first use:。

原文小纸条

path is provided by the bundled optional oc-path plugin. Enable it before first use:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这一句是在直接叫 OpenClaw 动起来:“openclaw plugins enable oc-path”。你可以把它想成一句说出口就要执行的差事。
原文代码块
openclaw plugins enable oc-path

第 2 站

Why use it

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw state is spread across human-edited markdown, commented JSONC 设置说明书, append-only JSONL logs, and YAML workflow…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:OpenClaw state is spread across human-edited markdown, commented JSONC 设置说明书, append-only JSONL logs, and YAML workflow…。

原文小纸条

OpenClaw state is spread across human-edited markdown, commented JSONC config, append-only JSONL logs, and YAML workflow/spec files. Shell scripts, hooks, and agents often need one small value from those files: a frontmatter key, a plugin setting, a log record field, a YAML step, or a bullet item under a named section.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path gives those callers a stable address instead of a one-off grep, regex, or parser for each file kind. The…。

原文小纸条

openclaw path gives those callers a stable address instead of a one-off grep, regex, or parser for each file kind. The same oc:// path can be validated, resolved, searched, dry-run, and written from the terminal, which makes narrow automation easier to review and safer to replay. It is especially useful when you want to update one leaf while preserving the rest of the file's comments, line endings, and surrounding formatting.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Use it when the thing you want has a logical address, but the physical file shape varies:。

原文小纸条

Use it when the thing you want has a logical address, but the physical file shape varies:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:when it writes the value back.

原文小纸条

when it writes the value back.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:without loading the whole log into a custom parser.

原文小纸条

without loading the whole log into a custom parser.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:slug, then render the exact line it resolved to.

原文小纸条

slug, then render the exact line it resolved to.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:changed bytes visible in review.

原文小纸条

changed bytes visible in review.

像准备清单

这一串条目别硬背,把它当成“Why use it”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:A hook wants to read one setting from com…、A maintenance script wants to find every…、An editor extension wants to jump to a ma…、An 机器人朋友 wants to dry-run a tiny workspac…。

原文小纸条
  • A hook wants to read one setting from commented JSONC without losing comments
  • A maintenance script wants to find every matching event field in a JSONL log
  • An editor extension wants to jump to a markdown section or bullet item by
  • An agent wants to dry-run a tiny workspace edit before applying it, with the
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:You probably do not need openclaw path for ordinary whole-file edits, rich 设置说明书 migrations, or memory-specific writes.…。

原文小纸条

You probably do not need openclaw path for ordinary whole-file edits, rich config migrations, or memory-specific writes. Those should use the owner command or plugin. path is for small, addressable file operations where a repeatable terminal command is clearer than another bespoke parser.

第 3 站

How it is used

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Read one value from a human-edited 设置说明书 file: Preview a write without touching disk: Find matching records in an appen…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Read one value from a human-edited 设置说明书 file:。

原文小纸条

Read one value from a human-edited config file:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path resolve oc”挂牌子,告诉系统它该指向“//config.jsonc/plugins/github/enabled'”。
原文代码块
openclaw path resolve 'oc://config.jsonc/plugins/github/enabled'
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Preview a write without touching disk:。

原文小纸条

Preview a write without touching disk:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path set oc”挂牌子,告诉系统它该指向“//config.jsonc/plugins/github/enabled' 'true' --dry-run”。
原文代码块
openclaw path set 'oc://config.jsonc/plugins/github/enabled' 'true' --dry-run
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Find matching records in an append-only JSONL log:。

原文小纸条

Find matching records in an append-only JSONL log:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path find oc”挂牌子,告诉系统它该指向“//session.jsonl/[event=tool_call]/name'”。
原文代码块
openclaw path find 'oc://session.jsonl/[event=tool_call]/name'
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Address an instruction in markdown by section and item instead of by line number:。

原文小纸条

Address an instruction in markdown by section and item instead of by line number:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path resolve oc”挂牌子,告诉系统它该指向“//AGENTS.md/runtime-safety/openclaw-gateway'”。
原文代码块
openclaw path resolve 'oc://AGENTS.md/runtime-safety/openclaw-gateway'
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Validate a path in CI or a preflight script before the script reads or writes:。

原文小纸条

Validate a path in CI or a preflight script before the script reads or writes:

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path validate oc”挂牌子,告诉系统它该指向“//AGENTS.md/tools/$last/risk'”。
原文代码块
openclaw path validate 'oc://AGENTS.md/tools/$last/risk'
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Those 魔法口令s are meant to be copyable into shell scripts. Use --json when a caller needs structured output and --human w…。

原文小纸条

Those commands are meant to be copyable into shell scripts. Use --json when a caller needs structured output and --human when a person is inspecting the result.

第 4 站

How it works

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path does four things: 1. Parses the oc:// address into slots: file, section, item, field, and optional sessio…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path does four things:。

原文小纸条

openclaw path does four things:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Parses the oc:// address into slots: file, section, item, field, and optional session. 2. Chooses the file-kind adap…。

原文小纸条

1. Parses the oc:// address into slots: file, section, item, field, and optional session. 2. Chooses the file-kind adapter from the target extension (.md, .jsonc, .jsonl, .yaml, .yml, .lobster, and related aliases). 3. Resolves the slots against that file kind's AST: markdown headings/items, JSONC object keys/array indexes, JSONL line records, or YAML map/sequence nodes. 4. For set, emits edited bytes through the same adapter so the untouched parts of the file keep their comments, line endings, and nearby formatting where the kind supports it.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:resolve and set require one concrete target. find is the exploratory verb: it expands wildcards, unions, predicates, an…。

原文小纸条

resolve and set require one concrete target. find is the exploratory verb: it expands wildcards, unions, predicates, and ordinals into the concrete matches you can inspect before choosing one to write.

第 5 站

Sub魔法口令s

这一节主要在解释“Sub魔法口令s”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Sub魔法口令s”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

这一小段像旁白,在提醒我们镜头已经切到下一站。

像整理表格

这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。

原文表格
SubcommandPurpose
resolve <oc-path>Print the concrete match at the path (or "not found").
find <pattern>Enumerate matches for a wildcard / union / predicate path.
set <oc-path> <value>Write a leaf or insertion target at a concrete path. Supports --dry-run.
validate <oc-path>Parse-only; print structural breakdown (file / section / item / field).
emit <file>Round-trip a file through parseXxx + emitXxx (byte-fidelity diagnostic).

第 6 站

Global flags

这一节主要在解释“Global flags”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Global flags”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

这一小段像旁白,在提醒我们镜头已经切到下一站。

像整理表格

这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。

原文表格
FlagPurpose
--cwd <dir>Resolve the file slot against this directory (default: process.cwd()).
--file <path>Override the file slot's resolved path (absolute access).
--jsonForce JSON output (default when stdout is not a TTY).
--humanForce human output (default when stdout is a TTY).
--dry-run(only on set) print the bytes that would be written without writing.
--diff(with set --dry-run) print a unified diff instead of the full bytes.

第 7 站

`oc://` syntax

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

这段在解决什么

这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。

为什么值得看

这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。

真要动手时

你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Slot rules: field requires item, and item requires section. Across all four slots: Content is byte-literal; " and \ are…。

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这里在给“oc”挂牌子,告诉系统它该指向“//FILE/SECTION/ITEM/FIELD?session=SCOPE”。
原文代码块
oc://FILE/SECTION/ITEM/FIELD?session=SCOPE
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Slot rules: field requires item, and item requires section. Across all four slots:。

原文小纸条

Slot rules: field requires item, and item requires section. Across all four slots:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Content is byte-literal; " and \ are not allowed inside quotes. The file slot is also quote-aware: oc://"skills/email-d…。

原文小纸条

Content is byte-literal; " and \ are not allowed inside quotes. The file slot is also quote-aware: oc://"skills/email-drafter"/Tools/$last treats skills/email-drafter as a single file path.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:[k>=v]. Numeric ops require both sides to coerce to finite numbers.

原文小纸条

[k>=v]. Numeric ops require both sides to coerce to finite numbers.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:recursive). find accepts these; resolve and set reject them as ambiguous.

原文小纸条

recursive). find accepts these; resolve and set reject them as ambiguous.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:declared key.

原文小纸条

declared key.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:insertion (use with set).

原文小纸条

insertion (use with set).

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:nesting. Session values are raw, not percent-decoded; they may not contain control characters or reserved query delimit…。

原文小纸条

nesting. Session values are raw, not percent-decoded; they may not contain control characters or reserved query delimiters (?, &, %).

像准备清单

这一串条目别硬背,把它当成“`oc://` syntax”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:**Quoted segments** — "a/b.c" survives /…、**Predicates** — [k=v], [k!=v], [k<v], [k…、**Unions** — {a,b,c} matches any of the a…、**Wildcards** — * (single sub-segment) an…。

原文小纸条
  • **Quoted segments** — "a/b.c" survives / and . separators.
  • **Predicates** — [k=v], [k!=v], [k<v], [k<=v], [k>v],
  • **Unions** — {a,b,c} matches any of the alternatives.
  • **Wildcards** — * (single sub-segment) and ** (zero-or-more,
  • **Positional** — $first / $last resolve to the first / last index or
  • **Ordinal** — #N for Nth match by document order.
  • **Insertion markers** — +, +key, +nnn for keyed / indexed
  • **Session scope** — ?session=cron-daily etc. Orthogonal to slot
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Reserved characters (?, &, %) outside quoted, predicate, or union segments are rejected. Control characters (U+0000-U+0…。

原文小纸条

Reserved characters (?, &, %) outside quoted, predicate, or union segments are rejected. Control characters (U+0000-U+001F, U+007F) are rejected anywhere, including the session query value.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:formatOcPath(parseOcPath(path)) === path is guaranteed for canonical paths. Non-canonical query parameters are ignored…。

原文小纸条

formatOcPath(parseOcPath(path)) === path is guaranteed for canonical paths. Non-canonical query parameters are ignored except for the first non-empty session= value.

第 8 站

Addressing by file kind

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:resolve returns a structured match: root, node, leaf, or insertion-point, with a 1-based line number. Leaf values are s…。

像整理表格

这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。

原文表格
KindAddressing model
MarkdownH2 sections by slug, bullet items by slug or #N, frontmatter via [frontmatter].
JSONC/JSONObject keys and array indexes; dots split nested sub-segments unless quoted.
JSONLTop-level line addresses (L1, L2, $first, $last), then JSONC-style descent inside the line.
YAML/YML/.lobsterMap keys and sequence indexes; comments and flow style are handled by the YAML document API.
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:resolve returns a structured match: root, node, leaf, or insertion-point, with a 1-based line number. Leaf values are s…。

原文小纸条

resolve returns a structured match: root, node, leaf, or insertion-point, with a 1-based line number. Leaf values are surfaced as text plus a leafType so plugin authors can render previews without depending on the per-kind AST shape.

第 9 站

Mutation contract

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:set writes one concrete target: Markdown insertions append sections, frontmatter keys, or section items and render a ca…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:set writes one concrete target:。

原文小纸条

set writes one concrete target:

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Markdown insertions append sections, frontmatter keys, or section items and render a canonical markdown shape for the c…。

原文小纸条

Markdown insertions append sections, frontmatter keys, or section items and render a canonical markdown shape for the changed file.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:(string, finite number, true/false, or null). Use --value-json when a JSONC/JSON/JSONL leaf replacement should parse <v…。

原文小纸条

(string, finite number, true/false, or null). Use --value-json when a JSONC/JSON/JSONL leaf replacement should parse <value> as JSON and may change shape, such as replacing a string SecretRef shorthand with an object. JSONC object and array insertions parse <value> as JSON and use the jsonc-parser edit path for ordinary leaf writes, preserving comments and nearby formatting.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:append parse <value> as JSON. Rendered JSONL preserves the file's dominant LF/CRLF line-ending convention.

原文小纸条

append parse <value> as JSON. Rendered JSONL preserves the file's dominant LF/CRLF line-ending convention.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:number, true/false, or null). YAML insertions use the bundled yaml package's document 对话接口 for map/sequence updates. Ma…。

原文小纸条

number, true/false, or null). YAML insertions use the bundled yaml package's document API for map/sequence updates. Malformed YAML documents with parser errors are refused before mutation with parse-error.

像准备清单

这一串条目别硬背,把它当成“Mutation contract”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Markdown frontmatter values and - key: va…、JSONC leaf writes coerce the string value…、JSONL leaf writes coerce like JSONC insid…、YAML leaf writes coerce to the existing s…。

原文小纸条
  • Markdown frontmatter values and - key: value item fields are string leaves.
  • JSONC leaf writes coerce the string value to the existing leaf type
  • JSONL leaf writes coerce like JSONC inside a line. Whole-line replacement and
  • YAML leaf writes coerce to the existing scalar type (string, finite
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Use --dry-run before user-visible writes when the exact bytes matter. The substrate preserves byte-identical output for…。

原文小纸条

Use --dry-run before user-visible writes when the exact bytes matter. The substrate preserves byte-identical output for parse/emit round-trips, but a mutation can canonicalize the edited region or file depending on kind. Add --diff when you want the preview as a focused before/after patch instead of the full rendered file.

第 10 站

Examples

这一节主要在解释“Examples”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Examples”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:More grammar examples:。

像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这一行“# Validate a path (no filesystem access)”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“openclaw path validate oc”挂牌子,告诉系统它该指向“//AGENTS.md/Tools/$last/risk'”。
  • 这一行“# Read a leaf”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
# Validate a path (no filesystem access)
openclaw path validate 'oc://AGENTS.md/Tools/$last/risk'

# Read a leaf
openclaw path resolve 'oc://gateway.jsonc/version'

# Wildcard search
openclaw path find 'oc://session.jsonl/*/event' --file ./logs/session.jsonl

# Dry-run a write
openclaw path set 'oc://gateway.jsonc/version' '2.0' --dry-run

# Dry-run a write as a unified diff
openclaw path set 'oc://gateway.jsonc/version' '2.0' --dry-run --diff

# Apply the write
openclaw path set 'oc://gateway.jsonc/version' '2.0'

# Byte-fidelity round-trip (diagnostic)
openclaw path emit ./AGENTS.md
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:More grammar examples:。

原文小纸条

More grammar examples:

像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这一行“# Quote keys containing / or .”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“openclaw path resolve oc”挂牌子,告诉系统它该指向“//config.jsonc/agents.defaults.models/anthropic/claude-opus-4-7/alias'”。
  • 这一行“# Deep JSON/JSONC paths can use slash segments; they normalize to dotted subsegments”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
原文代码块
# Quote keys containing / or .
openclaw path resolve 'oc://config.jsonc/agents.defaults.models/"anthropic/claude-opus-4-7"/alias'

# Deep JSON/JSONC paths can use slash segments; they normalize to dotted subsegments
openclaw path set 'oc://openclaw.json/agents/list/0/tools/exec/security' 'allowlist' --dry-run

# Replace a JSONC leaf with a parsed object
openclaw path set 'oc://openclaw.json/gateway/auth/token' '{"source":"file","provider":"secrets","id":"/test"}' --value-json --dry-run

# Predicate search over JSONC children
openclaw path find 'oc://config.jsonc/plugins/[enabled=true]/id'

# Insert into a JSONC array
openclaw path set 'oc://config.jsonc/items/+1' '{"id":"new","enabled":true}' --dry-run

# Insert a JSONC object key
openclaw path set 'oc://config.jsonc/plugins/+github' '{"enabled":true}' --dry-run

# Append a JSONL event
openclaw path set 'oc://session.jsonl/+' '{"event":"checkpoint","ok":true}' --file ./logs/session.jsonl

# Resolve the last JSONL value line
openclaw path resolve 'oc://session.jsonl/$last/event' --file ./logs/session.jsonl

# Resolve a YAML workflow step
openclaw path resolve 'oc://workflow.yaml/steps/0/id'

# Update a YAML scalar
openclaw path set 'oc://workflow.yaml/steps/$last/id' 'classify-renamed' --dry-run

# Address markdown frontmatter
openclaw path resolve 'oc://AGENTS.md/[frontmatter]/name'

# Insert markdown frontmatter
openclaw path set 'oc://AGENTS.md/[frontmatter]/+description' 'Agent instructions' --dry-run

# Find markdown item fields
openclaw path find 'oc://SKILL.md/Tools/*/send_email'

# Validate a session-scoped path
openclaw path validate 'oc://AGENTS.md/Tools/$last/risk?session=cron-daily'

第 11 站

Recipes by file kind

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The same five verbs work across kinds; the addressing scheme dispatches on the file extension. The examples below use t…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The same five verbs work across kinds; the addressing scheme dispatches on the file extension. The examples below use t…。

原文小纸条

The same five verbs work across kinds; the addressing scheme dispatches on the file extension. The examples below use the fixtures from the PR description.

第 12 站

Markdown

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The [frontmatter] predicate addresses the YAML frontmatter block; 工具小帮手s matches the ## 工具小帮手s heading via slug, and it…。

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这个尖括号标签“<!-- frontmatter.md -->”像一块结构积木,专门拿来把页面骨架卡稳。
  • 这一行“---”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“name”挂牌子,告诉系统它该指向“drafter”。
原文代码块
<!-- frontmatter.md -->
---
name: drafter
description: email drafting agent
tier: core
---
## Tools
- gh: GitHub CLI
- curl: HTTP client
- send_email: enabled
像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这里在给“$ openclaw path resolve oc”挂牌子,告诉系统它该指向“//x.md/[frontmatter]/tier' --file frontmatter.md --human”。
  • 这里在给“leaf @ L4”挂牌子,告诉系统它该指向“core (string)”。
  • 这里在给“$ openclaw path resolve oc”挂牌子,告诉系统它该指向“//x.md/tools/gh/gh' --file frontmatter.md --human”。
原文代码块
$ openclaw path resolve 'oc://x.md/[frontmatter]/tier' --file frontmatter.md --human
leaf @ L4: "core" (string)

$ openclaw path resolve 'oc://x.md/tools/gh/gh' --file frontmatter.md --human
leaf @ L9: "GitHub CLI" (string)

$ openclaw path find 'oc://x.md/tools/*' --file frontmatter.md --human
3 matches for oc://x.md/tools/*:
  oc://x.md/tools/gh           →  node @ L9 [md-item]
  oc://x.md/tools/curl         →  node @ L10 [md-item]
  oc://x.md/tools/send-email   →  node @ L11 [md-item]
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The [frontmatter] predicate addresses the YAML frontmatter block; 工具小帮手s matches the ## 工具小帮手s heading via slug, and it…。

原文小纸条

The [frontmatter] predicate addresses the YAML frontmatter block; tools matches the ## Tools heading via slug, and item leaves keep their slug form even when the source uses underscores (send_emailsend-email).

第 13 站

JSONC

这一节主要在解释“JSONC”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“JSONC”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:JSONC edits go through jsonc-parser, so comments and whitespace survive a set. Run with --dry-run first to inspect the…。

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“// config.jsonc”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
  • 这里在给“plugins”挂牌子,告诉系统它该指向“{”。
原文代码块
// config.jsonc
{
  "plugins": {
    "github": {"enabled": true, "role": "vcs"},
    "slack":  {"enabled": false, "role": "chat"}
  }
}
像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这里在给“$ openclaw path resolve oc”挂牌子,告诉系统它该指向“//config.jsonc/plugins/github/enabled' --file config.jsonc --human”。
  • 这里在给“leaf @ L4”挂牌子,告诉系统它该指向“true (boolean)”。
  • 这里在给“$ openclaw path set oc”挂牌子,告诉系统它该指向“//config.jsonc/plugins/slack/enabled' 'true' --file config.jsonc --dry-run”。
原文代码块
$ openclaw path resolve 'oc://config.jsonc/plugins/github/enabled' --file config.jsonc --human
leaf @ L4: "true" (boolean)

$ openclaw path set 'oc://config.jsonc/plugins/slack/enabled' 'true' --file config.jsonc --dry-run
--dry-run: would write 142 bytes to /…/config.jsonc
{
  "plugins": {
    "github": {"enabled": true, "role": "vcs"},
    "slack":  {"enabled": true, "role": "chat"}
  }
}
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:JSONC edits go through jsonc-parser, so comments and whitespace survive a set. Run with --dry-run first to inspect the…。

原文小纸条

JSONC edits go through jsonc-parser, so comments and whitespace survive a set. Run with --dry-run first to inspect the bytes before committing.

第 14 站

JSONL

这一节主要在解释“JSONL”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“JSONL”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Each line is a record. Address by predicate ([event=action]) when you do not know the line number, or by the canonical…。

像魔法口令拆解

这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。

  • 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
  • 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
  • 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
原文代码块
{"event":"start","userId":"u1","ts":1}
{"event":"action","userId":"u1","ts":2}
{"event":"end","userId":"u1","ts":3}
像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这里在给“$ openclaw path find oc”挂牌子,告诉系统它该指向“//session.jsonl/[event=action]/userId' --file session.jsonl --human”。
  • 这里在给“1 match for oc”挂牌子,告诉系统它该指向“//session.jsonl/[event=action]/userId:”。
  • 这里在给“oc”挂牌子,告诉系统它该指向“//session.jsonl/L2/userId → leaf @ L2: u1 (string)”。
原文代码块
$ openclaw path find 'oc://session.jsonl/[event=action]/userId' --file session.jsonl --human
1 match for oc://session.jsonl/[event=action]/userId:
  oc://session.jsonl/L2/userId  →  leaf @ L2: "u1" (string)

$ openclaw path resolve 'oc://session.jsonl/L2/ts' --file session.jsonl --human
leaf @ L2: "2" (number)
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Each line is a record. Address by predicate ([event=action]) when you do not know the line number, or by the canonical…。

原文小纸条

Each line is a record. Address by predicate ([event=action]) when you do not know the line number, or by the canonical LN segment when you do.

第 15 站

YAML

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:YAML uses the yaml package's Document 对话接口 rather than a hand-rolled parser, so ordinary parse/emit round-trips preserv…。

像魔法口令拆解

这段像放在桌上的操作卡,谁来照着做,现场就会动起来。

  • 这一行“# workflow.yaml”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
  • 这里在给“name”挂牌子,告诉系统它该指向“inbox-triage”。
  • 这里在给“steps”挂牌子,告诉系统它该指向“”。
原文代码块
# workflow.yaml
name: inbox-triage
steps:
  - id: fetch
    command: gmail.search
  - id: classify
    command: openclaw.invoke
像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这里在给“$ openclaw path resolve oc”挂牌子,告诉系统它该指向“//workflow.yaml/steps/0/id' --file workflow.yaml --human”。
  • 这里在给“leaf @ L3”挂牌子,告诉系统它该指向“fetch (string)”。
  • 这里在给“$ openclaw path set oc”挂牌子,告诉系统它该指向“//workflow.yaml/steps/$last/id' 'classify-renamed' --file workflow.yaml --dry-run”。
原文代码块
$ openclaw path resolve 'oc://workflow.yaml/steps/0/id' --file workflow.yaml --human
leaf @ L3: "fetch" (string)

$ openclaw path set 'oc://workflow.yaml/steps/$last/id' 'classify-renamed' --file workflow.yaml --dry-run
--dry-run: would write 99 bytes to /…/workflow.yaml
name: inbox-triage
steps:
  - id: fetch
    command: gmail.search
  - id: classify-renamed
    command: openclaw.invoke
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:YAML uses the yaml package's Document 对话接口 rather than a hand-rolled parser, so ordinary parse/emit round-trips preserv…。

原文小纸条

YAML uses the yaml package's Document API rather than a hand-rolled parser, so ordinary parse/emit round-trips preserve comments and authoring shape while resolved paths use the same map-key / sequence-index model as JSONC. The same adapter handles .yaml, .yml, and .lobster files.

第 16 站

`resolve <oc-path>`

这一节主要在解释“`resolve <oc-path>`”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“`resolve <oc-path>`”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Read a single leaf or node. Wildcards are rejected — use find for those. Exits 0 on a match, 1 on a clean miss, 2 on a…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Read a single leaf or node. Wildcards are rejected — use find for those. Exits 0 on a match, 1 on a clean miss, 2 on a…。

原文小纸条

Read a single leaf or node. Wildcards are rejected — use find for those. Exits 0 on a match, 1 on a clean miss, 2 on a parse error or refused pattern.

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path resolve oc”挂牌子,告诉系统它该指向“//AGENTS.md/tools/gh/risk' --human”。
  • 这里在给“openclaw path resolve oc”挂牌子,告诉系统它该指向“//gateway.jsonc/server/port' --json”。
原文代码块
openclaw path resolve 'oc://AGENTS.md/tools/gh/risk' --human
openclaw path resolve 'oc://gateway.jsonc/server/port' --json

第 17 站

`find <pattern>`

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Enumerate every match for a wildcard / predicate / union pattern. Exits 0 on at least one match, 1 on zero. File-slot w…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Enumerate every match for a wildcard / predicate / union pattern. Exits 0 on at least one match, 1 on zero. File-slot w…。

原文小纸条

Enumerate every match for a wildcard / predicate / union pattern. Exits 0 on at least one match, 1 on zero. File-slot wildcards are rejected with OC_PATH_FILE_WILDCARD_UNSUPPORTED — pass a concrete file (multi-file globbing is a follow-up feature).

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path find oc”挂牌子,告诉系统它该指向“//AGENTS.md/tools/**/risk'”。
  • 这里在给“openclaw path find oc”挂牌子,告诉系统它该指向“//session.jsonl/[event=action]/userId'”。
  • 这里在给“openclaw path find oc”挂牌子,告诉系统它该指向“//config.jsonc/plugins/{githubslack}/enabled'”。
原文代码块
openclaw path find 'oc://AGENTS.md/tools/**/risk'
openclaw path find 'oc://session.jsonl/[event=action]/userId'
openclaw path find 'oc://config.jsonc/plugins/{github,slack}/enabled'

第 18 站

`set <oc-path> <value>`

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Write a leaf. Pair with --dry-run to preview the bytes that would be written without touching the file. Add --diff for…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Write a leaf. Pair with --dry-run to preview the bytes that would be written without touching the file. Add --diff for…。

原文小纸条

Write a leaf. Pair with --dry-run to preview the bytes that would be written without touching the file. Add --diff for a unified diff preview. Exits 0 on a successful write, 1 if the substrate refuses (for example, a sentinel guard hit), 2 on parse errors.

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这里在给“openclaw path set oc”挂牌子,告诉系统它该指向“//gateway.jsonc/version' '2.0' --dry-run”。
  • 这里在给“openclaw path set oc”挂牌子,告诉系统它该指向“//gateway.jsonc/version' '2.0' --dry-run --diff”。
  • 这里在给“openclaw path set oc”挂牌子,告诉系统它该指向“//gateway.jsonc/version' '2.0'”。
原文代码块
openclaw path set 'oc://gateway.jsonc/version' '2.0' --dry-run
openclaw path set 'oc://gateway.jsonc/version' '2.0' --dry-run --diff
openclaw path set 'oc://gateway.jsonc/version' '2.0'
openclaw path set 'oc://AGENTS.md/Tools/+gh/risk' 'low'
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The +key insertion marker creates the named child if it does not already exist; +nnn and bare + work for indexed and ap…。

原文小纸条

The +key insertion marker creates the named child if it does not already exist; +nnn and bare + work for indexed and append insertion respectively.

第 19 站

`validate <oc-path>`

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Parse-only check. No filesystem access. Useful when you want to confirm a template path is well-formed before substitut…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Parse-only check. No filesystem access. Useful when you want to confirm a template path is well-formed before substitut…。

原文小纸条

Parse-only check. No filesystem access. Useful when you want to confirm a template path is well-formed before substituting variables, or when you want the structural breakdown for debugging:

像魔法口令拆解

这是一串终端口令,像你站在控制台前,一下下按按钮让机器醒过来。

  • 这里在给“$ openclaw path validate oc”挂牌子,告诉系统它该指向“//AGENTS.md/tools/gh' --human”。
  • 这里在给“valid”挂牌子,告诉系统它该指向“oc://AGENTS.md/tools/gh”。
  • 这里在给“file”挂牌子,告诉系统它该指向“AGENTS.md”。
原文代码块
$ openclaw path validate 'oc://AGENTS.md/tools/gh' --human
valid: oc://AGENTS.md/tools/gh
  file:    AGENTS.md
  section: tools
  item:    gh
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Exits 0 when valid, 1 when invalid (with a structured code and 小纸条消息), 2 on argument errors.

原文小纸条

Exits 0 when valid, 1 when invalid (with a structured code and message), 2 on argument errors.

第 20 站

`emit <file>`

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Round-trip a file through the per-kind parser and emitter. The output should be byte-identical to the input on a sound…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Round-trip a file through the per-kind parser and emitter. The output should be byte-identical to the input on a sound…。

原文小纸条

Round-trip a file through the per-kind parser and emitter. The output should be byte-identical to the input on a sound file — divergence indicates a parser bug or a sentinel hit. Useful for debugging substrate behavior on real-world inputs.

像魔法口令拆解

这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。

  • 这一句是在直接叫 OpenClaw 动起来:“openclaw path emit ./AGENTS.md”。你可以把它想成一句说出口就要执行的差事。
  • 这一句是在直接叫 OpenClaw 动起来:“openclaw path emit ./gateway.jsonc --json”。你可以把它想成一句说出口就要执行的差事。
原文代码块
openclaw path emit ./AGENTS.md
openclaw path emit ./gateway.jsonc --json

第 21 站

Exit codes

这一节主要在解释“Exit codes”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Exit codes”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

这一小段像旁白,在提醒我们镜头已经切到下一站。

像整理表格

这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。

原文表格
CodeMeaning
0Success. (resolve / find: at least one match. set: write succeeded.)
1No match, or set rejected by the substrate (no system-level error).
2Argument or parse error.

第 22 站

Output mode

这一节主要在解释“Output mode”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Output mode”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path is TTY-aware: human-readable output on a terminal, JSON when stdout is piped or redirected. --json and --…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:openclaw path is TTY-aware: human-readable output on a terminal, JSON when stdout is piped or redirected. --json and --…。

原文小纸条

openclaw path is TTY-aware: human-readable output on a terminal, JSON when stdout is piped or redirected. --json and --human override the auto-detection.

第 23 站

Notes

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

这段在解决什么

这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。

为什么值得看

你理解的是能力边界,不只是功能名字。

真要动手时

如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:redaction-sentinel guard automatically. A leaf carrying __OPENCLAW_REDACTED__ (verbatim or as a substring) is refused a…。

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:redaction-sentinel guard automatically. A leaf carrying __OPENCLAW_REDACTED__ (verbatim or as a substring) is refused a…。

原文小纸条

redaction-sentinel guard automatically. A leaf carrying __OPENCLAW_REDACTED__ (verbatim or as a substring) is refused at write time.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:dependency, so comments and formatting are preserved on ordinary leaf writes instead of going through a hand-rolled par…。

原文小纸条

dependency, so comments and formatting are preserved on ordinary leaf writes instead of going through a hand-rolled parser/re-render path.

像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:observe call decides whether to promote / recover. set --batch for atomic multi-set through the LKG promote/recover lif…。

原文小纸条

observe call decides whether to promote / recover. set --batch for atomic multi-set through the LKG promote/recover lifecycle is planned alongside the LKG-recovery substrate.

像准备清单

这一串条目别硬背,把它当成“Notes”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:set writes bytes through the substrate's…、JSONC parsing and leaf edits use the 新本领插…、path does not know about LKG. If the file…。

原文小纸条
  • set writes bytes through the substrate's emit path, which applies the
  • JSONC parsing and leaf edits use the plugin-local jsonc-parser
  • path does not know about LKG. If the file is LKG-tracked, the next

第 24 站

Related

这一节主要在解释“Related”到底是干什么的,以及你什么时候会遇到它。

这段在解决什么

这一节主要在解释“Related”到底是干什么的,以及你什么时候会遇到它。

为什么值得看

如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。

真要动手时

真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。

先别急着背术语

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。

像准备清单

这一串条目别硬背,把它当成“Related”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:CLI reference。

原文小纸条
像讲绘本

如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。

原文小纸条

---

AdSense 连接验证已经放在页面头部;广告单元等站点审批通过后再启用。

google-adsense-account: ca-pub-3833673520933536