SpyBara
Go Premium

Documentation 2026-11-12 23:02 UTC to 2026-11-13 01:02 UTC

10 files changed +21 −45. View all changes and history on the product overview
2026
Fri 13 01:02 Thu 12 23:02 Wed 11 22:59 Tue 10 21:57 Mon 9 23:02 Sun 8 22:58 Sat 7 23:58 Fri 6 23:01 Thu 5 23:03 Wed 4 23:59 Tue 3 23:58 Mon 2 23:57 Sun 1 23:57
Details

315 {315 {

316 "matcher": "Edit|Write",316 "matcher": "Edit|Write",

317 "hooks": [317 "hooks": [

318 { "type": "command", "command": "npx prettier --write --ignore-unknown \"$(jq -r '.tool_input.file_path')\"" }318 { "type": "command", "command": "f=$(jq -r '.tool_input.file_path') && npx prettier --write --ignore-unknown \"$f\"" }

319 ]319 ]

320 }320 }

321 ]321 ]

Details

92 92 

93除了二進位檔案,映像還需要:93除了二進位檔案,映像還需要:

94 94 

95* **基於 glibc 的映像**:glibc 建置的唯一動態依賴項是 glibc 庫。基於 Musl 的映像需要 `linux-x64-musl` 或 `linux-arm64-musl` 建置加上額外套件;請參閱 [Alpine Linux 設定](https://code.claude.com/docs/zh-TW/setup.md#alpine-linux-and-musl-based-distributions)。95* **基於 glibc 的映像**:glibc 建置的唯一動態相依性是 glibc 函式庫。基於 Musl 的映像需要 `linux-x64-musl` 或 `linux-arm64-musl` 建置,其唯一的動態相依性是 musl。

96* **可寫入的狀態目錄**:閘道以任何使用者身份執行,但最小映像沒有可寫入的主目錄。將 `CLAUDE_CONFIG_DIR` 設定為可寫入的路徑,例如 `/tmp/.claude`。96* **可寫入的狀態目錄**:閘道以任何使用者身份執行,但最小映像沒有可寫入的主目錄。將 `CLAUDE_CONFIG_DIR` 設定為可寫入的路徑,例如 `/tmp/.claude`。

97* **容器命令**:`claude gateway --config /etc/claude/gateway.yaml`,設定檔案以唯讀方式掛載,祕密作為環境變數提供;閘道在 `listen.port` 上監聽,預設為 `8080`。97* **容器命令**:`claude gateway --config /etc/claude/gateway.yaml`,設定檔案以唯讀方式掛載,祕密作為環境變數提供;閘道在 `listen.port` 上監聽,預設為 `8080`。

98 98 

hooks.md +1 −1

Details

3334 "hooks": [3334 "hooks": [

3335 {3335 {

3336 "type": "command",3336 "type": "command",

3337 "command": "bash -c 'jq -r .worktree_path | xargs rm -rf'"3337 "command": "bash -c 'p=$(jq -er .worktree_path) && rm -rf -- \"$p\"'"

3338 }3338 }

3339 ]3339 ]

3340 }3340 }

hooks-guide.md +2 −2

Details

50 "PostToolUse": [50 "PostToolUse": [

51 {51 {

52 "matcher": "Edit|Write",52 "matcher": "Edit|Write",

53 "hooks": [{ "type": "command", "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write" }]53 "hooks": [{ "type": "command", "command": "f=$(jq -r '.tool_input.file_path') && npx prettier --write --ignore-unknown \"$f\"" }]

54 }54 }

55 ],55 ],

56 "Notification": [56 "Notification": [


221 "hooks": [221 "hooks": [

222 {222 {

223 "type": "command",223 "type": "command",

224 "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"224 "command": "f=$(jq -r '.tool_input.file_path') && npx prettier --write --ignore-unknown \"$f\""

225 }225 }

226 ]226 ]

227 }227 }

Details

36| `Esc` | 中斷 Claude 或關閉對話框 | 停止目前的回應或工具呼叫中途,以便您可以重新導向。Claude 會保留迄今為止完成的工作。如果您有[訊息排隊](#queue-messages-while-claude-works),Claude Code 會在下一步傳送它們。當對話框開啟時,`Esc` 會關閉對話框。當頁尾項目被選中時(例如提示下方的[子代理面板](https://code.claude.com/docs/zh-TW/sub-agents.md#run-subagents-in-foreground-or-background)中的一列),`Esc` 會[取消選中它](https://code.claude.com/docs/zh-TW/keybindings.md#footer-actions)而不是中斷。在權限提示上,`Esc` 會拒絕該操作,與[**否**(不含註解)](https://code.claude.com/docs/zh-TW/permissions.md#add-a-comment-when-you-answer-a-permission-prompt)相同 |36| `Esc` | 中斷 Claude 或關閉對話框 | 停止目前的回應或工具呼叫中途,以便您可以重新導向。Claude 會保留迄今為止完成的工作。如果您有[訊息排隊](#queue-messages-while-claude-works),Claude Code 會在下一步傳送它們。當對話框開啟時,`Esc` 會關閉對話框。當頁尾項目被選中時(例如提示下方的[子代理面板](https://code.claude.com/docs/zh-TW/sub-agents.md#run-subagents-in-foreground-or-background)中的一列),`Esc` 會[取消選中它](https://code.claude.com/docs/zh-TW/keybindings.md#footer-actions)而不是中斷。在權限提示上,`Esc` 會拒絕該操作,與[**否**(不含註解)](https://code.claude.com/docs/zh-TW/permissions.md#add-a-comment-when-you-answer-a-permission-prompt)相同 |

37| `Esc` + `Esc` | 清除輸入草稿或回溯 | 當提示輸入包含文字時,雙 `Esc` 會清除它並將草稿儲存到歷史記錄,以便 `Up` 可以回憶它。當輸入為空時,雙 `Esc` 會開啟[回溯功能表](https://code.claude.com/docs/zh-TW/checkpointing.md)以從先前的時間點復原或摘要程式碼和對話 |37| `Esc` + `Esc` | 清除輸入草稿或回溯 | 當提示輸入包含文字時,雙 `Esc` 會清除它並將草稿儲存到歷史記錄,以便 `Up` 可以回憶它。當輸入為空時,雙 `Esc` 會開啟[回溯功能表](https://code.claude.com/docs/zh-TW/checkpointing.md)以從先前的時間點復原或摘要程式碼和對話 |

38| `Ctrl+Enter` 或 `Ctrl+X Ctrl+S` | 立即傳送排隊的訊息 | 傳送您的[排隊訊息](#queue-messages-while-claude-works)和您的草稿與它們一起立即發出。[Claude Code 何時傳送您排隊的內容](#when-claude-code-sends-what-you-queued)涵蓋了 Claude 正在處理的回合會發生什麼。在[shell 模式](#shell-mode-with-prefix)中,該鍵只會將您的命令排隊。在不報告延伸鍵的終端中,`Ctrl+Enter` 會以純 `Enter` 的形式到達;`Ctrl+X Ctrl+S` 在任何終端中都有效。需要 Claude Code v2.1.275 或更新版本 |38| `Ctrl+Enter` 或 `Ctrl+X Ctrl+S` | 立即傳送排隊的訊息 | 傳送您的[排隊訊息](#queue-messages-while-claude-works)和您的草稿與它們一起立即發出。[Claude Code 何時傳送您排隊的內容](#when-claude-code-sends-what-you-queued)涵蓋了 Claude 正在處理的回合會發生什麼。在[shell 模式](#shell-mode-with-prefix)中,該鍵只會將您的命令排隊。在不報告延伸鍵的終端中,`Ctrl+Enter` 會以純 `Enter` 的形式到達;`Ctrl+X Ctrl+S` 在任何終端中都有效。需要 Claude Code v2.1.275 或更新版本 |

39| `Shift+Tab` 或 `Alt+M`(當 Node 或 Bun 執行時間未啟用 VT 輸入模式時在 Windows 上) | 循環權限模式 | 循環通過 `default`(在模式指示器中標記為 Manual)、`acceptEdits`、`plan` 和(如果可用)`bypassPermissions`,然後是 `auto`。從 `auto`,第一次按下會切換到 `default`。請參閱[權限模式](https://code.claude.com/docs/zh-TW/permission-modes.md)。在檔案權限提示上,相同的鍵會關閉開啟的[註解欄位](https://code.claude.com/docs/zh-TW/permissions.md#add-a-comment-when-you-answer-a-permission-prompt)。沒有開啟欄位時,它會選擇允許該操作以供工作階段其餘部分的選項(當提示提供該選項時) |39| `Shift+Tab`,或在 Windows 上當 Node 或 Bun 執行環境未啟用 VT 輸入模式時使用 `Alt+M` | 循環權限模式 | 依序循環 `default`(在模式指示器中標記為 Manual)、`acceptEdits` 和 `plan`,然後在可用時循環 `bypassPermissions` 和 `auto`。請參閱[權限模式](https://code.claude.com/docs/zh-TW/permission-modes.md)。在檔案權限提示上,相同的鍵會關閉開啟的[註解欄位](https://code.claude.com/docs/zh-TW/permissions.md#add-a-comment-when-you-answer-a-permission-prompt)。沒有開啟欄位時,若提示提供該選項,它會選擇在工作階段其餘期間允許該操作的選項。在計畫核准提示上,它會核准該計畫 |

40| `Option+P`(macOS)或 `Alt+P`(Windows/Linux) | 切換模型 | 切換模型而不清除您的提示 |40| `Option+P`(macOS)或 `Alt+P`(Windows/Linux) | 切換模型 | 切換模型而不清除您的提示 |

41| `Option+T`(macOS)或 `Alt+T`(Windows/Linux) | 切換延伸思考 | 啟用或停用延伸思考模式。對 Opus 5.5、Sonnet 5.5、Haiku 5.5 或 Fable 模型沒有影響,它們始終使用延伸思考。在 macOS 上無需設定 Option 為 Meta 即可運作 |41| `Option+T`(macOS)或 `Alt+T`(Windows/Linux) | 切換延伸思考 | 啟用或停用延伸思考模式。對 Opus 5.5、Sonnet 5.5、Haiku 5.5 或 Fable 模型沒有影響,它們始終使用延伸思考。在 macOS 上無需設定 Option 為 Meta 即可運作 |

42| `Option+O`(macOS)或 `Alt+O`(Windows/Linux) | 切換快速模式 | 啟用或停用[快速模式](https://code.claude.com/docs/zh-TW/fast-mode.md) |42| `Option+O`(macOS)或 `Alt+O`(Windows/Linux) | 切換快速模式 | 啟用或停用[快速模式](https://code.claude.com/docs/zh-TW/fast-mode.md) |

Details

304claude --permission-mode plan304claude --permission-mode plan

305```305```

306 306 

307再次按下 `Shift+Tab` 即可在不核准計畫的情況下離開 plan mode。307在沒有開啟核准提示的情況下,再次按下 `Shift+Tab` 即可離開 plan mode。在核准提示中,請先按下 `Esc`,因為在該處按下 `Shift+Tab` 會核准計畫。

308 308 

309### 審查並核准計畫309### 審查並核准計畫

310 310 

Details

344 "PostToolUse": [344 "PostToolUse": [

345 {345 {

346 "matcher": "Write|Edit",346 "matcher": "Write|Edit",

347 "hooks": [{ "type": "command", "command": "jq -r '.tool_input.file_path' | xargs npm run lint:fix" }]347 "hooks": [{ "type": "command", "command": "f=$(jq -r '.tool_input.file_path') && npm run lint:fix -- \"$f\"" }]

348 }348 }

349 ]349 ]

350 }350 }

setup.md +8 −26

Details

40>40>

41> **macOS、Linux、WSL:**41> **macOS、Linux、WSL:**

42>42>

43> ```bash theme={null}43> ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

44> curl -fsSL https://claude.ai/install.sh | bash44> curl -fsSL https://claude.ai/install.sh | bash

45> ```45> ```

46>46>


48>48>

49> **Windows PowerShell:**49> **Windows PowerShell:**

50>50>

51> ```powershell theme={null}51> ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

52> irm https://claude.ai/install.ps1 | iex52> irm https://claude.ai/install.ps1 | iex

53> ```53> ```

54>54>

55> **Windows CMD:**55> **Windows CMD:**

56>56>

57> ```batch theme={null}57> ```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

58> curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd58> curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

59> ```59> ```

60>60>


72 72 

73> [tab] Homebrew73> [tab] Homebrew

74>74>

75> ```bash theme={null}75> ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

76> brew install --cask claude-code76> brew install --cask claude-code

77> ```77> ```

78>78>


84 84 

85> [tab] WinGet85> [tab] WinGet

86>86>

87> ```powershell theme={null}87> ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}

88> winget install Anthropic.ClaudeCode88> winget install Anthropic.ClaudeCode

89> ```89> ```

90>90>


141 141 

142### Alpine Linux 和 musl 型發行版142### Alpine Linux 和 musl 型發行版

143 143 

144在 Alpine 和其他 musl/uClibc 型發行版上安裝 Claude Code 需要 `bash` 和 `curl` 用於安裝命令,以及 `libgcc`、`libstdc++` 和 `ripgrep` 用於執行時。Alpine 預設不包含 `bash` 或 `curl`,因此在您安裝它們之前,文件中的安裝命令會失敗並出現 `not found` 錯誤。使用您的發行版套件管理員安裝這些套件,然後設定 `USE_BUILTIN_RIPGREP=0`。144在 Alpine 和其他 musl 型發行版上,[安裝命令](#install-claude-code)需要 `bash` 和 `curl`,而 Claude Code 本身需要 `bash` 或 `zsh`。Alpine 預設不包含 `bash` 或 `curl`,因此在您安裝它們之前,文件中的安裝命令會失敗並出現 `not found` 錯誤。

145 145 

146此範例在 Alpine 上安裝所需的套件:146此範例在 Alpine 上安裝所需的套件:

147 147 

148```bash theme={null}148```bash theme={null}

149apk add bash curl libgcc libstdc++ ripgrep149apk add bash curl

150```

151 

152在 Alpine 上,`ripgrep` 位於社群儲存庫中。如果 `apk` 報告套件遺失,請將社群儲存庫新增至 `/etc/apk/repositories`,使用您的 Alpine 版本:

153 

154```bash theme={null}

155echo "https://dl-cdn.alpinelinux.org/alpine/v3.22/community" >> /etc/apk/repositories

156```

157 

158執行 `apk update` 以重新整理套件索引,然後重試 `apk add` 命令。

159 

160然後在您的 [`settings.json`](https://code.claude.com/docs/zh-TW/settings-reference#all-settings) 檔案中將 `USE_BUILTIN_RIPGREP` 設定為 `0`:

161 

162```json theme={null}

163{

164 "env": {

165 "USE_BUILTIN_RIPGREP": "0"

166 }

167}

168```150```

169 151 

170## 驗證您的安裝152## 驗證您的安裝


443> wget -O /etc/apk/keys/claude-code.rsa.pub \425> wget -O /etc/apk/keys/claude-code.rsa.pub \

444> https://downloads.claude.ai/keys/claude-code.rsa.pub426> https://downloads.claude.ai/keys/claude-code.rsa.pub

445> echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories427> echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories

446> apk add claude-code428> apk add bash claude-code

447> ```429> ```

448>430>

449> 若要切換至 `latest` 通道,移除 `stable` 儲存庫行並新增 `latest` 儲存庫:431> 若要切換至 `latest` 通道,移除 `stable` 儲存庫行並新增 `latest` 儲存庫:

Details

388> Get-Command claude | Select-Object Source388> Get-Command claude | Select-Object Source

389> ```389> ```

390 390 

391在 Linux 上,檢查遺失的共用程式庫。如果 `ldd` 顯示遺失的程式庫,您可能需要安裝系統套件。在 Alpine Linux 和其他 musl 型發行版上,請參閱 [Alpine Linux 設定](https://code.claude.com/docs/zh-TW/setup.md#alpine-linux-and-musl-based-distributions)。391在 Linux 上,檢查遺失的共用程式庫。如果 `ldd` 顯示遺失的程式庫,您可能需要安裝系統套件。在 Alpine Linux 和其他 musl 型發行版上,請參閱 [Linux musl 或 glibc 二進位檔不符](#linux-musl-or-glibc-binary-mismatch)。

392 392 

393```bash theme={null}393```bash theme={null}

394ldd "$(command -v claude)" | grep "not found"394ldd "$(command -v claude)" | grep "not found"


906 906 

907### Linux musl 或 glibc 二進位不相符907### Linux musl 或 glibc 二進位不相符

908 908 

909如果在安裝後看到有關遺失共用程式庫的錯誤,如 `libstdc++.so.6` 或 `libgcc_s.so.1`,安裝程式可能為您的系統下載了錯誤的二進位變體。909如果在安裝後看到有關遺失共用程式庫的錯誤,如 `ld-linux-x86-64.so.2` 或 `ld-linux-aarch64.so.1`,安裝程式可能為您的系統下載了錯誤的二進位變體。

910 910 

911```text theme={null}911```text theme={null}

912Error loading shared library libstdc++.so.6: No such file or directory912Error loading shared library ld-linux-x86-64.so.2: No such file or directory

913```913```

914 914 

915這可能發生在已安裝 musl 交叉編譯套件的基於 glibc 的系統上,導致安裝程式將系統誤檢測為 musl。

916 

917**解決方案:**915**解決方案:**

918 916 

9191. **檢查您的系統使用哪個 libc**:9171. **檢查您的系統使用哪個 libc**:


924 922 

9252. **如果您在 glibc 上但得到了 musl 二進位檔**,移除安裝並重新安裝。您也可以使用 `https://downloads.claude.ai/claude-code-releases/{VERSION}/manifest.json` 上的清單手動下載正確的二進位檔。使用 `ldd --version` 和 `ls /lib/libc.musl*` 的輸出提交 [GitHub 問題](https://github.com/anthropics/claude-code/issues)。9232. **如果您在 glibc 上但得到了 musl 二進位檔**,移除安裝並重新安裝。您也可以使用 `https://downloads.claude.ai/claude-code-releases/{VERSION}/manifest.json` 上的清單手動下載正確的二進位檔。使用 `ldd --version` 和 `ls /lib/libc.musl*` 的輸出提交 [GitHub 問題](https://github.com/anthropics/claude-code/issues)。

926 924 

9273. **如果您實際上在 musl 上**,例如 Alpine Linux,請安裝所需的套件:9253. **如果您在 musl 上但得到了 glibc 二進位檔**,請[移除安裝](https://code.claude.com/docs/zh-TW/setup.md#uninstall-claude-code)。在 Alpine Linux 上,請先安裝 [Alpine Linux 設定](https://code.claude.com/docs/zh-TW/setup.md#alpine-linux-and-musl-based-distributions)中列出的套件。然後執行[安裝命令](https://code.claude.com/docs/zh-TW/setup.md#install-claude-code),它會安裝 musl 二進位檔。

928 ```bash theme={null}

929 apk add libgcc libstdc++ ripgrep

930 ```

931 在 Alpine 上,`ripgrep` 在社群儲存庫中。如果 `apk` 報告套件遺失,請參閱 [Alpine Linux 設定](https://code.claude.com/docs/zh-TW/setup.md#alpine-linux-and-musl-based-distributions)。

932 926 

933### `Illegal instruction`927### `Illegal instruction`

934 928 

Details

152> apk add ripgrep152> apk add ripgrep

153> ```153> ```

154>154>

155> `ripgrep` 在 Alpine 的社群儲存庫中。如果 `apk` 報告套件遺失,請參閱 [Alpine Linux 設定](https://code.claude.com/docs/zh-TW/setup.md#alpine-linux-and-musl-based-distributions)。155> `ripgrep` 在 Alpine 的社群儲存庫中。

156 156 

157> [tab] Arch157> [tab] Arch

158>158>