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。