CLI 命令完整參考
本頁完整列出 NBTExplorerCLI(nbtcli.exe)註冊的所有命令與子命令,內容與自動化測試驗證的機器命令表(nbtcli.command-surface 版本 1)完全同步。
全域協定與旗標規則
Section titled “全域協定與旗標規則”- 單行 JSON 標準輸出:所有指令皆會在標準輸出(
stdout)回傳單一 UTF-8 JSON 信封物件(schemaFamily: "nbtcli.cli",schemaVersion: 1)。 - 介面顯示語言(
--ui-locale):可於指令前後加上--ui-locale zh-TW(預設)或--ui-locale en-US,僅改變說明與錯誤訊息文字,不影響地圖翻譯與資源包的語言設定(--source-language、--target-language、--lang、--original-lang、--target-lang)。 - 參數語法:帶值參數支援
--option value或--option=value兩種寫法;布林旗標不帶值。若檔案路徑以連字號開頭,可使用--結束旗標解析。 - 支援的簡寫別名(Aliases):
- 根命令
--help與-h等同於help。 - 根命令
--version與-v等同於version。 - 所有命令皆支援以
-h查詢該命令的--help說明。
- 根命令
結構化檔案與標準輸入(-)格式對照
Section titled “結構化檔案與標準輸入(-)格式對照”當指令透過檔案路徑或標準輸入(-)讀取 JSON 時,皆會先驗證對應的 schemaFamily 與 schemaVersion:
| 輸入 JSON Schema Family | 使用該格式的指令與參數 |
|---|---|
nbtcli.typed-nbt |
set --value <json> 或 set --value-file <檔案|-> |
nbtcli.operations |
batch <檔案|-> --world <世界目錄> 或 plan <世界目錄> --request <檔案|-> |
nbtcli.patch-plan |
apply <世界目錄> --plan <檔案|-> |
nbtcli.session-reply |
translate submit --reply <檔案|-> 或 translate advance --reply <檔案|-> |
nbtcli.session-command |
translate jump、note、glossary 或 reset 搭配 --request <檔案|-> |
nbtcli.agent-questionnaire |
agent submit <世界目錄> --request <檔案|-> |
查閱與搜尋命令(Inspection & Query)
Section titled “查閱與搜尋命令(Inspection & Query)”用於檢查版本、查詢參數說明、讀取 NBT 節點、檢視區塊與搜尋資料包 JSON 的唯讀命令。
nbtcli help [command]安全查閱:不改存檔以 JSON 格式列出可用的命令、子命令與接受的參數選項。
--help--ui-localenbtcli version安全查閱:不改存檔輸出產品名稱(nbtcli)與目前版本號(1.0.0)。
--help--ui-localenbtcli get <world-or-file>安全查閱:不改存檔讀取指定的 NBT 節點、JSON 屬性或區塊資料,不修改任何檔案。
--path--pointer--segments--chunk--dimension--entry--compression--types--help--ui-localenbtcli list <world-or-file>安全查閱:不改存檔列出世界的維度與區塊檔數量、區塊檔內已生成的區塊座標,或指定節點的直屬子項目。
--path--pointer--segments--chunk--dimension--entry--compression--types--limit--offset--help--ui-localenbtcli search <world-or-file>安全查閱:不改存檔依據內容文字、欄位名稱或標籤型別搜尋子樹,支援分頁檢視。
--path--pointer--segments--chunk--dimension--entry--compression--types--limit--offset--query--name--type--help--ui-locale世界文字掃描與驗證命令(Scanning & Validation)
Section titled “世界文字掃描與驗證命令(Scanning & Validation)”用於掃描世界文字、抽取字串、驗證檔案完整性與查詢支援版本的唯讀命令。
nbtcli scan <world>安全查閱:不改存檔掃描世界中的告示牌、書本、物品、實體、指令方塊與資料包文字,並建立外部快取索引。
--path--dimension--region--types--limit--offset--summary--show-items--refresh--no-cache--cache-root--workers--verbose--debug--help--ui-localenbtcli extract <world>安全查閱:不改存檔抽取解碼後的文字與精確來源位址,支援以 --unique 合併相同文字預覽或用正規表示式篩選。
--path--dimension--region--types--limit--offset--all--unique--match-pattern--output--refresh--no-cache--cache-root--workers--verbose--debug--help--ui-localenbtcli validate <world>安全查閱:不改存檔檢查世界目錄結構(--quick)或完整解碼所選文字來源,提前發現損壞或不支援的資料格式。
--path--dimension--region--types--limit--offset--quick--refresh--no-cache--cache-root--workers--verbose--debug--help--ui-localenbtcli capabilities安全查閱:不改存檔列出已註冊的命令清單,以及各 Minecraft DataVersion 支援組合的宣告支援程度。
--help--ui-locale安全編輯、備份與復原命令(Editing, Backup & Recovery)
Section titled “安全編輯、備份與復原命令(Editing, Backup & Recovery)”用於預覽修改計畫、離線套用變更、建立備份與從中斷狀態復原世界的命令。
nbtcli set <world> --path <rel-path> (--value <json> | --value-file <file>)預覽模式:僅產出計畫以明確型別的 typed-nbt JSON 替換指定節點的值。預設為預覽模式,不會直接修改世界,除非加上 --apply --world-offline。
--path--pointer--segments--chunk--dimension--compression--value--value-file--operation-id--apply--world-offline--state-root--output--help--ui-localenbtcli batch <file-or-dash> --world <world>預覽模式:僅產出計畫對目標世界預覽或批次套用多筆結構化編輯操作(nbtcli.operations)。
--world--apply--world-offline--state-root--output--help--ui-localenbtcli plan <world> --request <file-or-dash>預覽模式:僅產出計畫根據操作請求建立並驗證不可變的修補計畫(patch-plan),完全不更動世界存檔。
--request--state-root--output--help--ui-localenbtcli apply <world> --plan <file-or-dash> --world-offline修改存檔:請先關遊戲並備份執行已驗證的修補計畫,自動建立寫前備份、暫存驗證、日誌紀錄(Journal)與寫後讀回校驗。
--plan--world-offline--state-root--output--help--ui-localenbtcli status <world> --plan-hash <hash>安全查閱:不改存檔查詢特定計畫的執行日誌與回執狀態,判斷寫入是否已完成、需要復原,或已回滾。
--plan-hash--state-root--output--help--ui-localenbtcli recover <world> --plan-hash <hash> --world-offline修改存檔:請先關遊戲並備份安全接續完成被中斷的寫入作業,或加上 --rollback 將世界完整還原至修改前的狀態。
--plan-hash--world-offline--rollback--state-root--output--help--ui-localenbtcli backup <world> [--suffix <name>]安全查閱:不改存檔在外部狀態目錄中建立經雜湊驗證的世界快照(亦可透過 --path 指定單一檔案),不更動世界本身。
--path--suffix--state-root--output--help--ui-localenbtcli restore <world> --manifest-hash <hash>預覽模式:僅產出計畫從已驗證的備份清單預覽或還原世界檔案,即使目前世界內的目標檔案已損壞或遺失也能修復。
--manifest-hash--path--apply--world-offline--state-root--output--help--ui-locale地圖翻譯、轉換與外部助手設定命令(Translation & Agent)
Section titled “地圖翻譯、轉換與外部助手設定命令(Translation & Agent)”用於單次翻譯鍵轉換、分頁式翻譯工作階段以及外部翻譯助手偏好設定的根命令。
nbtcli convert <world> --lang <locale>預覽模式:僅產出計畫將世界內的原始文字結構化轉換為翻譯鍵(Translation Keys),並同步產生對應的語言檔與資源包。
--lang--prefix--keepdup--no-backup--language-output--apply--world-offline--state-root--output--path--dimension--region--types--match-pattern--workers--verbose--help--ui-localenbtcli translate <subcommand> <world> [options]預覽模式:僅產出計畫管理分頁式地圖翻譯工作階段、術語表、翻譯計畫生成、獨立資源包匯出與完成封存(seal)。
--help--ui-localenbtcli agent <setup|submit|status|help> <world>預覽模式:僅產出計畫建立與管理外部翻譯工具或 AI 助手的預設來源/目標語言及每頁筆數偏好設定。
--help--ui-localetranslate 子命令完整參考
Section titled “translate 子命令完整參考”除 translate help 外,所有 translate 子命令皆需指定目標 <world> 路徑,並支援 --state-root、--output、--help 與 --ui-locale。
nbtcli translate start <world>預覽模式:僅產出計畫掃描指定範圍並建立新的翻譯工作階段,將世界文字切分為可分頁處理的翻譯槽位(Slots)。
--session-id--state-root--output--help--source-language--target-language--operation-id--page-size--page-bytes--match-pattern--types--path--dimension--region--standalone--no-group--ui-localenbtcli translate status <world>安全查閱:不改存檔查看目前的翻譯進度,並檢查世界檔案自工作階段建立以來是否曾被外部修改。
--session-id--state-root--output--help--ui-localenbtcli translate export <world>安全查閱:不改存檔匯出指定頁碼的待譯文字與結構化回覆範本(Reply Template)。
--session-id--state-root--output--help--page--operation-id--no-group--ui-localenbtcli translate advance <world>預覽模式:僅產出計畫可選擇同時提交並驗證已完成的回覆檔,接著自動回傳下一個待處理的分頁。
--session-id--state-root--output--help--reply--no-group--ui-localenbtcli translate submit <world>預覽模式:僅產出計畫驗證並儲存翻譯回覆 JSON(支援檔案或標準輸入),更新工作階段版本號並回傳下一頁。
--session-id--state-root--output--help--reply--no-group--ui-localenbtcli translate get <world>安全查閱:不改存檔查詢單一翻譯槽位(Slot)的原文、格式限制與目前儲存的譯文。
--session-id--state-root--output--help--slot-id--ui-localenbtcli translate jump <world>預覽模式:僅產出計畫透過版本化的 session-command 請求切換目前手動檢視的目標頁碼。
--session-id--state-root--output--help--request--ui-localenbtcli translate note <world>預覽模式:僅產出計畫查閱或新增工作階段內的譯者備註與背景說明。
--session-id--state-root--output--help--request--limit--offset--ui-localenbtcli translate glossary <world>預覽模式:僅產出計畫查閱或更新專有名詞術語表,確保地圖內重複出現的人名、地名與物品譯名一致。
--session-id--state-root--output--help--request--limit--offset--ui-localenbtcli translate reset <world>預覽模式:僅產出計畫預覽或確認將指定的槽位重置回待翻譯狀態(保留歷史紀錄,不會刪除已寫入世界的檔案)。
--session-id--state-root--output--help--request--confirm--ui-localenbtcli translate groups <world>安全查閱:不改存檔分頁列出世界內具相同語境關聯的文字群組。
--session-id--state-root--output--help--limit--offset--ui-localenbtcli translate memory <world>安全查閱:不改存檔從本機其他翻譯工作階段中查詢相容的歷史翻譯記憶候選詞。
--session-id--state-root--output--help--slot-id--source-sessions--glossary-version--limit--offset--ui-localenbtcli translate plan <world>預覽模式:僅產出計畫根據已完成的翻譯產生修補計畫:可選擇 --direct(直接替換世界文字)或 --keys(轉為翻譯鍵並附加語言檔)。
--session-id--state-root--output--help--direct--keys--prefix--language-output--revision--operation-id--synchronize-references--ui-localenbtcli translate export-lang <world>預覽模式:僅產出計畫從工作階段匯出獨立的原文/譯文語言檔(.json),不修改世界內的遊戲 NBT 資料。
--session-id--state-root--output--help--revision--original-lang--target-lang--prefix--plan-output--apply--world-offline--ui-localenbtcli translate create-pack <world>預覽模式:僅產出計畫預覽或建立獨立的 Minecraft 資源包(ZIP 或資料夾格式),支援與既有資源包安全合併(--merge)。
--session-id--state-root--output--help--revision--original-lang--target-lang--prefix--plan-output--apply--world-offline--name--format--merge--pack-format--ui-localenbtcli translate seal <world>預覽模式:僅產出計畫在確認世界已完成 apply 寫入並核對 plan-hash 後,將翻譯工作階段正式封存為已完成狀態。
--session-id--state-root--output--help--revision--operation-id--plan-hash--ui-localenbtcli translate help安全查閱:不改存檔--help--ui-locale如需個別子命令的說明,請在該子命令後加上 --help,例如 nbtcli translate start --help。
agent 子命令參考
Section titled “agent 子命令參考”nbtcli agent setup <world>預覽模式:僅產出計畫--state-root--output--help--source-language--target-language--operation-id--ui-localenbtcli agent submit <world>預覽模式:僅產出計畫--state-root--output--help--request--ui-localenbtcli agent status <world>安全查閱:不改存檔--state-root--output--help--ui-localenbtcli agent help安全查閱:不改存檔--help--ui-locale