ait snapshot — 完整参考
创建并查看不可变的仓库状态,遍历它的父级历史,并重放或恢复已记录的内容。
适用人群: coding agent 与维护者
作用边界#
用途: 创建并查看不可变的仓库状态,遍历它的父级历史,并重放或恢复已记录的内容。
影响类别: create 记录不可变状态;revert、replay 以及与 restore 相关的操作会按说明改变当前的本地状态。
覆盖: ait snapshot 下共 11 个公开 help surface。
下面的代码块原样保留 1.1.1 二进制的输出,包含它给出的每一个参数、选项、 默认值、可选值、冲突关系和必填要求。
完整命令树#
ait snapshot
ait snapshot create
ait snapshot list
ait snapshot show
ait snapshot diff
ait snapshot restore-lines
ait snapshot revert
ait snapshot replay
ait snapshot ancestry
ait snapshot is-ancestor
ait snapshot merge-base原样输出的 help#
ait snapshot#
二进制描述: Create, inspect, compare, and query immutable local Snapshots. Snapshot create advances the current Line head; restore-lines, revert, and replay change only workspace files and never create a Snapshot, move a Line head, or change remote data.
Create, inspect, compare, and query immutable local Snapshots. Snapshot create advances the current Line head; restore-lines, revert, and replay change only workspace files and never create a Snapshot, move a Line head, or change remote data.
Usage: ait snapshot <COMMAND>
Commands:
create Capture the managed workspace as a new Snapshot.
list List repository-wide local Snapshot history.
show Inspect one immutable local Snapshot.
diff Compare two immutable local Snapshots.
restore-lines Preview or apply an exact line range from one Snapshot into the workspace.
revert Remove the current head Snapshot's recorded delta from the workspace.
replay Apply one Snapshot's recorded delta to the current Line workspace.
ancestry Query bounded Snapshot ancestors or descendants using metadata-only DAG traversal.
is-ancestor Test DAG ancestry; exits 0 when true, 1 when false, and 2 on lookup or storage errors.
merge-base Find the deterministic best common Snapshot ancestor.
help Print this message or the help of the given subcommand(s)
Options:
-h, --help
Print help (see a summary with '-h')说明
创建、查看、比较并查询不可变的本地 Snapshot。snapshot create 会推进当前 Line head;restore-lines、revert 和 replay 只改工作区文件,绝不创建 Snapshot、移动 Line head 或改动远程数据。
| 参数 / 选项 | 说明 |
|---|---|
create | 将受管工作区捕获为一个新 Snapshot。 |
list | 列出仓库范围的本地 Snapshot 历史。 |
show | 查看一个不可变的本地 Snapshot。 |
diff | 比较两个不可变的本地 Snapshot。 |
restore-lines | 预览或将一个 Snapshot 中确切的行范围应用到工作区。 |
revert | 从工作区移除当前 head Snapshot 记录的增量。 |
replay | 将一个 Snapshot 记录的增量应用到当前 Line 工作区。 |
ancestry | 使用仅元数据的 DAG 遍历查询有界的 Snapshot 祖先或后代。 |
is-ancestor | 测试 DAG 祖先关系;为真时退出码 0,为假时 1,查询或存储错误时 2。 |
merge-base | 查找确定性的最佳公共 Snapshot 祖先。 |
help | 打印本消息或给定子命令的帮助 |
ait snapshot create#
二进制描述: Capture the managed workspace as a new immutable local Snapshot and advance the current Line head. This command does not publish remote data.
Capture the managed workspace as a new immutable local Snapshot and advance the current Line head. This command does not publish remote data.
Usage: ait snapshot create [OPTIONS]
Options:
-m, --message <MESSAGE>
Record an optional human-readable Snapshot message.
--json
Emit the compact versioned machine-readable creation payload.
--full
With --json, emit the previous complete stable creation payload.
-h, --help
Print help (see a summary with '-h')说明
把受管工作区记录为新的不可变本地 Snapshot,并推进当前 Line head。此命令不会发布远程数据。
ait snapshot list#
二进制描述: List local Snapshots across every Line without modifying repository state. Text and JSON output are bounded to the recent view by default; --all emits complete history.
List local Snapshots across every Line without modifying repository state. Text and JSON output are bounded to the recent view by default; --all emits complete history.
Usage: ait snapshot list [OPTIONS]
Options:
--all
Show complete Snapshot history instead of the bounded recent text or JSON view.
--json
Emit the stable machine-readable Snapshot list.
-h, --help
Print help (see a summary with '-h')说明
跨所有 Line 列出本地 Snapshot,不修改仓库状态。文本和 JSON 输出默认有界于最近视图;--all 输出完整历史。
ait snapshot show#
二进制描述: Inspect one Snapshot resolved from an exact Snapshot ID or local AIT Tag. Default text includes identity and bounded primary-parent change evidence; --files expands the complete tree inventory. JSON is always complete.
Inspect one Snapshot resolved from an exact Snapshot ID or local AIT Tag. Default text includes identity and bounded primary-parent change evidence; --files expands the complete tree inventory. JSON is always complete.
Usage: ait snapshot show [OPTIONS] <SNAPSHOT_OR_TAG>
Arguments:
<SNAPSHOT_OR_TAG>
Exact immutable Snapshot ID or local AIT Tag to inspect.
Options:
--files
Show the complete Snapshot tree inventory in text output; JSON is always complete.
--json
Emit the complete stable machine-readable Snapshot payload.
-h, --help
Print help (see a summary with '-h')说明
查看一个由确切 Snapshot ID 或本地 AIT Tag 解析出的 Snapshot。默认文本包含身份信息和有界的主父级变更证据;--files 展开完整的树清单。JSON 始终是完整的。
ait snapshot diff#
二进制描述: Compare two Snapshots resolved from exact Snapshot IDs or local AIT Tags. Structural file changes are reported by default; --include-text adds bounded text diffs for eligible modified files. This command is read-only.
Compare two Snapshots resolved from exact Snapshot IDs or local AIT Tags. Structural file changes are reported by default; --include-text adds bounded text diffs for eligible modified files. This command is read-only.
Usage: ait snapshot diff [OPTIONS] <OLD_SNAPSHOT_OR_TAG> <NEW_SNAPSHOT_OR_TAG>
Arguments:
<OLD_SNAPSHOT_OR_TAG>
Exact Snapshot ID or local AIT Tag for the old side.
<NEW_SNAPSHOT_OR_TAG>
Exact Snapshot ID or local AIT Tag for the new side.
Options:
--include-text
Include bounded line-oriented text diffs for eligible modified files.
--max-bytes <BYTES>
Maximum old or new file size allowed for text diff generation; requires --include-text.
[default: 128000]
--json
Emit the complete stable machine-readable diff payload.
-h, --help
Print help (see a summary with '-h')说明
比较两个由确切 Snapshot ID 或本地 AIT Tag 解析出的 Snapshot。默认报告结构性文件变更;--include-text 为符合条件的已修改文件附加有界文本 diff。此命令为只读。
ait snapshot restore-lines#
二进制描述: Read one exact immutable Snapshot ID and preview replacement of the same existing regular workspace path at one positive 1-based line or inclusive range. Only --yes applies the selected lines; the command never creates a Snapshot or moves a Line head.
Read one exact immutable Snapshot ID and preview replacement of the same existing regular workspace path at one positive 1-based line or inclusive range. Only --yes applies the selected lines; the command never creates a Snapshot or moves a Line head.
Usage: ait snapshot restore-lines <SNAPSHOT_ID> <PATH> (--line <N> | --start <N> --end <N>) [--yes] [--json]
Arguments:
<SNAPSHOT_ID>
Exact immutable Snapshot ID to read line content from.
<PATH>
Existing regular workspace file to update.
Options:
--line <LINE>
Select one 1-based workspace line.
--start <START_LINE>
Start of one inclusive 1-based line range.
--end <END_LINE>
End of one inclusive 1-based line range.
--yes
Apply the selected Snapshot lines; omission is always a read-only preview.
--json
Emit the complete stable machine-readable preview or apply result.
-h, --help
Print help (see a summary with '-h')说明
读取一个确切的不可变 Snapshot ID,并预览在同一已存在的常规工作区路径上按正的 1 起始行号或闭区间范围进行替换。只有 --yes 才会应用所选行;此命令绝不会创建 Snapshot 或移动 Line head。
ait snapshot revert#
二进制描述: Remove one Line Snapshot's primary-parent-to-revision delta from the current workspace. The requested Snapshot must be the current Line head. This does not create a Snapshot, move the current Line head, or mutate remote state.
Remove one Line Snapshot's primary-parent-to-revision delta from the current workspace. The requested Snapshot must be the current Line head. This does not create a Snapshot, move the current Line head, or mutate remote state.
Usage: ait snapshot revert [OPTIONS] <SNAPSHOT_OR_TAG>
Arguments:
<SNAPSHOT_OR_TAG>
Current Line head Snapshot, identified by exact ID or local AIT Tag.
Options:
--force
Overwrite unsaved changes on paths selected by the Snapshot delta.
--dry-run
Preview affected paths and overwrite risk without modifying the workspace.
--json
Emit the complete stable machine-readable workspace plan or result.
-h, --help
Print help (see a summary with '-h')说明
从当前工作区移除一个 Line Snapshot 的自主父级到修订版的增量。请求的 Snapshot 必须是当前 Line head。此操作不会创建 Snapshot、移动当前 Line head,也不会改动远程状态。
ait snapshot replay#
二进制描述: Apply one non-root Line Snapshot's primary-parent-to-revision delta to the current Line workspace. This does not create a Snapshot, move the current Line head, or mutate remote state.
Apply one non-root Line Snapshot's primary-parent-to-revision delta to the current Line workspace. This does not create a Snapshot, move the current Line head, or mutate remote state.
Usage: ait snapshot replay [OPTIONS] <SNAPSHOT_OR_TAG>
Arguments:
<SNAPSHOT_OR_TAG>
Non-root Snapshot whose recorded delta will be applied to the workspace.
Options:
--force
Overwrite unsaved changes on paths selected by the Snapshot delta.
--dry-run
Preview affected paths and overwrite risk without modifying the workspace.
--json
Emit the complete stable machine-readable workspace plan or result.
-h, --help
Print help (see a summary with '-h')说明
将一个非根 Line Snapshot 的自主父级到修订版的增量应用到当前 Line 工作区。此操作不会创建 Snapshot、移动当前 Line head,也不会改动远程状态。
ait snapshot ancestry#
二进制描述: Query deterministic topological Snapshot ancestry resolved from an exact Snapshot ID or local AIT Tag. Ancestors across all parents are the default; direction, first-parent traversal, depth, and result bounds are explicit. The query Snapshot itself is excluded.
Query deterministic topological Snapshot ancestry resolved from an exact Snapshot ID or local AIT Tag. Ancestors across all parents are the default; direction, first-parent traversal, depth, and result bounds are explicit. The query Snapshot itself is excluded.
Usage: ait snapshot ancestry [OPTIONS] <SNAPSHOT_OR_TAG>
Arguments:
<SNAPSHOT_OR_TAG>
Exact Snapshot ID or local AIT Tag at the query boundary.
Options:
--ancestors
Traverse ancestors; this is the default direction.
--descendants
Traverse descendants instead of ancestors.
--first-parent
Follow only ordinal-zero parent edges instead of all parents.
--max-depth <DEPTH>
Stop traversal after this positive edge depth.
[default: 10000]
--limit <COUNT>
Admit at most this positive number of results.
[default: 10000]
--all
Show every result allowed by --limit in text output instead of the nearest 20; JSON already includes all of them.
--json
Emit the complete stable machine-readable bounded query payload.
-h, --help
Print help (see a summary with '-h')说明
查询由确切 Snapshot ID 或本地 AIT Tag 解析出的确定性拓扑 Snapshot 祖先关系。默认跨全部父级查询祖先;方向、第一父级遍历、深度和结果上界都需显式指定。查询的 Snapshot 本身不包含在结果中。
ait snapshot is-ancestor#
二进制描述: Test whether one Snapshot is reachable as an ancestor of another across the complete parent DAG. Each input accepts an exact Snapshot ID or local AIT Tag. The command exits 0 when true, 1 when false, and 2 on lookup or storage errors.
Test whether one Snapshot is reachable as an ancestor of another across the complete parent DAG. Each input accepts an exact Snapshot ID or local AIT Tag. The command exits 0 when true, 1 when false, and 2 on lookup or storage errors.
Usage: ait snapshot is-ancestor [OPTIONS] <OLDER_SNAPSHOT_OR_TAG> <NEWER_SNAPSHOT_OR_TAG>
Arguments:
<OLDER_SNAPSHOT_OR_TAG>
Candidate ancestor, identified by exact Snapshot ID or local AIT Tag.
<NEWER_SNAPSHOT_OR_TAG>
Candidate descendant, identified by exact Snapshot ID or local AIT Tag.
Options:
--json
Emit the stable machine-readable ancestry decision and distance.
-h, --help
Print help (see a summary with '-h')说明
测试一个 Snapshot 是否在完整父级 DAG 中作为另一个 Snapshot 的祖先可达。每个输入接受确切的 Snapshot ID 或本地 AIT Tag。为真时命令退出码为 0,为假时 1,查询或存储错误时 2。
ait snapshot merge-base#
二进制描述: Find the best common ancestor of two Snapshots resolved from exact Snapshot IDs or local AIT Tags. The default emits one deterministic best base; --all emits every equally best base. The command exits 0 when a base exists, 1 when none exists, and 2 on lookup or storage errors.
Find the best common ancestor of two Snapshots resolved from exact Snapshot IDs or local AIT Tags. The default emits one deterministic best base; --all emits every equally best base. The command exits 0 when a base exists, 1 when none exists, and 2 on lookup or storage errors.
Usage: ait snapshot merge-base [OPTIONS] <LEFT_SNAPSHOT_OR_TAG> <RIGHT_SNAPSHOT_OR_TAG>
Arguments:
<LEFT_SNAPSHOT_OR_TAG>
Left Snapshot, identified by exact ID or local AIT Tag.
<RIGHT_SNAPSHOT_OR_TAG>
Right Snapshot, identified by exact ID or local AIT Tag.
Options:
--all
Emit every equally best common ancestor in deterministic order.
--json
Emit the complete stable machine-readable merge-base result.
-h, --help
Print help (see a summary with '-h')说明
查找两个由确切 Snapshot ID 或本地 AIT Tag 解析出的 Snapshot 的最佳公共祖先。默认输出一个确定性的最佳基点;--all 输出所有并列最佳的基点。存在基点时命令退出码为 0,不存在时为 1,查询或存储错误时为 2。