@fredlackey/devutils 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
  3. package/src/commands/install.js +374 -36
  4. package/src/installs/adobe-creative-cloud.js +527 -25
  5. package/src/installs/adobe-creative-cloud.md +605 -0
  6. package/src/installs/appcleaner.js +303 -26
  7. package/src/installs/appcleaner.md +699 -0
  8. package/src/installs/apt-transport-https.js +390 -0
  9. package/src/installs/apt-transport-https.md +678 -0
  10. package/src/installs/atomicparsley.js +624 -26
  11. package/src/installs/atomicparsley.md +795 -0
  12. package/src/installs/aws-cli.js +779 -26
  13. package/src/installs/aws-cli.md +727 -0
  14. package/src/installs/balena-etcher.js +688 -26
  15. package/src/installs/balena-etcher.md +761 -0
  16. package/src/installs/bambu-studio.js +912 -26
  17. package/src/installs/bambu-studio.md +780 -0
  18. package/src/installs/bash-completion.js +554 -23
  19. package/src/installs/bash-completion.md +833 -0
  20. package/src/installs/bash.js +399 -26
  21. package/src/installs/bash.md +993 -0
  22. package/src/installs/beyond-compare.js +585 -26
  23. package/src/installs/beyond-compare.md +813 -0
  24. package/src/installs/build-essential.js +511 -26
  25. package/src/installs/build-essential.md +977 -0
  26. package/src/installs/ca-certificates.js +618 -0
  27. package/src/installs/ca-certificates.md +937 -0
  28. package/src/installs/caffeine.js +490 -26
  29. package/src/installs/caffeine.md +839 -0
  30. package/src/installs/camtasia.js +577 -25
  31. package/src/installs/camtasia.md +762 -0
  32. package/src/installs/chatgpt.js +458 -26
  33. package/src/installs/chatgpt.md +814 -0
  34. package/src/installs/chocolatey.js +447 -0
  35. package/src/installs/chocolatey.md +661 -0
  36. package/src/installs/chrome-canary.js +472 -26
  37. package/src/installs/chrome-canary.md +641 -0
  38. package/src/installs/chromium.js +645 -26
  39. package/src/installs/chromium.md +838 -0
  40. package/src/installs/claude-code.js +558 -26
  41. package/src/installs/claude-code.md +1173 -0
  42. package/src/installs/curl.js +361 -26
  43. package/src/installs/curl.md +714 -0
  44. package/src/installs/cursor.js +561 -26
  45. package/src/installs/cursor.md +970 -0
  46. package/src/installs/dbschema.js +674 -26
  47. package/src/installs/dbschema.md +925 -0
  48. package/src/installs/dependencies.md +435 -0
  49. package/src/installs/development-tools.js +600 -0
  50. package/src/installs/development-tools.md +977 -0
  51. package/src/installs/docker.js +1010 -25
  52. package/src/installs/docker.md +1109 -0
  53. package/src/installs/drawio.js +1001 -26
  54. package/src/installs/drawio.md +795 -0
  55. package/src/installs/elmedia-player.js +328 -25
  56. package/src/installs/elmedia-player.md +556 -0
  57. package/src/installs/ffmpeg.js +870 -25
  58. package/src/installs/ffmpeg.md +852 -0
  59. package/src/installs/file.js +464 -0
  60. package/src/installs/file.md +987 -0
  61. package/src/installs/gemini-cli.js +793 -26
  62. package/src/installs/gemini-cli.md +1153 -0
  63. package/src/installs/git.js +382 -26
  64. package/src/installs/git.md +907 -0
  65. package/src/installs/gitego.js +931 -26
  66. package/src/installs/gitego.md +1172 -0
  67. package/src/installs/go.js +913 -26
  68. package/src/installs/go.md +958 -0
  69. package/src/installs/google-chrome.js +801 -25
  70. package/src/installs/google-chrome.md +862 -0
  71. package/src/installs/gpg.js +412 -73
  72. package/src/installs/gpg.md +1056 -0
  73. package/src/installs/homebrew.js +1015 -26
  74. package/src/installs/homebrew.md +988 -0
  75. package/src/installs/imageoptim.js +950 -26
  76. package/src/installs/imageoptim.md +1119 -0
  77. package/src/installs/installers.json +2297 -0
  78. package/src/installs/jq.js +382 -26
  79. package/src/installs/jq.md +809 -0
  80. package/src/installs/keyboard-maestro.js +701 -26
  81. package/src/installs/keyboard-maestro.md +825 -0
  82. package/src/installs/latex.js +771 -26
  83. package/src/installs/latex.md +1095 -0
  84. package/src/installs/lftp.js +338 -26
  85. package/src/installs/lftp.md +907 -0
  86. package/src/installs/lsb-release.js +346 -0
  87. package/src/installs/lsb-release.md +814 -0
  88. package/src/installs/messenger.js +829 -26
  89. package/src/installs/messenger.md +900 -0
  90. package/src/installs/microsoft-office.js +550 -26
  91. package/src/installs/microsoft-office.md +760 -0
  92. package/src/installs/microsoft-teams.js +782 -25
  93. package/src/installs/microsoft-teams.md +886 -0
  94. package/src/installs/node.js +886 -26
  95. package/src/installs/node.md +1153 -0
  96. package/src/installs/nordpass.js +698 -26
  97. package/src/installs/nordpass.md +921 -0
  98. package/src/installs/nvm.js +977 -26
  99. package/src/installs/nvm.md +1057 -0
  100. package/src/installs/openssh.js +734 -64
  101. package/src/installs/openssh.md +1056 -0
  102. package/src/installs/pandoc.js +644 -26
  103. package/src/installs/pandoc.md +1036 -0
  104. package/src/installs/pinentry.js +492 -26
  105. package/src/installs/pinentry.md +1142 -0
  106. package/src/installs/pngyu.js +851 -26
  107. package/src/installs/pngyu.md +896 -0
  108. package/src/installs/postman.js +781 -26
  109. package/src/installs/postman.md +940 -0
  110. package/src/installs/procps.js +425 -0
  111. package/src/installs/procps.md +851 -0
  112. package/src/installs/safari-tech-preview.js +355 -25
  113. package/src/installs/safari-tech-preview.md +533 -0
  114. package/src/installs/sfnt2woff.js +640 -26
  115. package/src/installs/sfnt2woff.md +795 -0
  116. package/src/installs/shellcheck.js +463 -26
  117. package/src/installs/shellcheck.md +1005 -0
  118. package/src/installs/slack.js +722 -25
  119. package/src/installs/slack.md +865 -0
  120. package/src/installs/snagit.js +566 -25
  121. package/src/installs/snagit.md +844 -0
  122. package/src/installs/software-properties-common.js +372 -0
  123. package/src/installs/software-properties-common.md +805 -0
  124. package/src/installs/spotify.js +858 -25
  125. package/src/installs/spotify.md +901 -0
  126. package/src/installs/studio-3t.js +803 -26
  127. package/src/installs/studio-3t.md +918 -0
  128. package/src/installs/sublime-text.js +780 -25
  129. package/src/installs/sublime-text.md +914 -0
  130. package/src/installs/superwhisper.js +687 -25
  131. package/src/installs/superwhisper.md +630 -0
  132. package/src/installs/tailscale.js +727 -26
  133. package/src/installs/tailscale.md +1100 -0
  134. package/src/installs/tar.js +389 -0
  135. package/src/installs/tar.md +946 -0
  136. package/src/installs/termius.js +780 -26
  137. package/src/installs/termius.md +844 -0
  138. package/src/installs/terraform.js +761 -26
  139. package/src/installs/terraform.md +899 -0
  140. package/src/installs/tidal.js +752 -25
  141. package/src/installs/tidal.md +864 -0
  142. package/src/installs/tmux.js +328 -26
  143. package/src/installs/tmux.md +1030 -0
  144. package/src/installs/tree.js +393 -26
  145. package/src/installs/tree.md +833 -0
  146. package/src/installs/unzip.js +460 -0
  147. package/src/installs/unzip.md +879 -0
  148. package/src/installs/vim.js +403 -26
  149. package/src/installs/vim.md +1040 -0
  150. package/src/installs/vlc.js +803 -26
  151. package/src/installs/vlc.md +927 -0
  152. package/src/installs/vscode.js +825 -26
  153. package/src/installs/vscode.md +1002 -0
  154. package/src/installs/wget.js +415 -0
  155. package/src/installs/wget.md +791 -0
  156. package/src/installs/whatsapp.js +710 -25
  157. package/src/installs/whatsapp.md +854 -0
  158. package/src/installs/winpty.js +352 -0
  159. package/src/installs/winpty.md +620 -0
  160. package/src/installs/woff2.js +535 -26
  161. package/src/installs/woff2.md +977 -0
  162. package/src/installs/wsl.js +572 -0
  163. package/src/installs/wsl.md +699 -0
  164. package/src/installs/xcode-clt.js +520 -0
  165. package/src/installs/xcode-clt.md +351 -0
  166. package/src/installs/xcode.js +542 -26
  167. package/src/installs/xcode.md +573 -0
  168. package/src/installs/yarn.js +806 -26
  169. package/src/installs/yarn.md +1074 -0
  170. package/src/installs/yq.js +636 -26
  171. package/src/installs/yq.md +944 -0
  172. package/src/installs/yt-dlp.js +683 -26
  173. package/src/installs/yt-dlp.md +946 -0
  174. package/src/installs/yum-utils.js +297 -0
  175. package/src/installs/yum-utils.md +648 -0
  176. package/src/installs/zoom.js +740 -25
  177. package/src/installs/zoom.md +884 -0
  178. package/src/scripts/README.md +567 -45
  179. package/src/scripts/STATUS.md +208 -0
  180. package/src/scripts/afk.js +395 -7
  181. package/src/scripts/backup-all.js +731 -9
  182. package/src/scripts/backup-source.js +711 -8
  183. package/src/scripts/brewd.js +373 -7
  184. package/src/scripts/brewi.js +505 -9
  185. package/src/scripts/brewr.js +512 -9
  186. package/src/scripts/brews.js +462 -9
  187. package/src/scripts/brewu.js +488 -7
  188. package/src/scripts/c.js +185 -7
  189. package/src/scripts/ccurl.js +325 -8
  190. package/src/scripts/certbot-crontab-init.js +488 -8
  191. package/src/scripts/certbot-init.js +641 -9
  192. package/src/scripts/ch.js +339 -7
  193. package/src/scripts/claude-danger.js +253 -8
  194. package/src/scripts/clean-dev.js +419 -8
  195. package/src/scripts/clear-dns-cache.js +525 -7
  196. package/src/scripts/clone.js +417 -7
  197. package/src/scripts/code-all.js +420 -7
  198. package/src/scripts/count-files.js +195 -8
  199. package/src/scripts/count-folders.js +195 -8
  200. package/src/scripts/count.js +248 -8
  201. package/src/scripts/d.js +203 -7
  202. package/src/scripts/datauri.js +373 -8
  203. package/src/scripts/delete-files.js +363 -7
  204. package/src/scripts/docker-clean.js +410 -8
  205. package/src/scripts/dp.js +426 -7
  206. package/src/scripts/e.js +375 -9
  207. package/src/scripts/empty-trash.js +497 -7
  208. package/src/scripts/evm.js +428 -9
  209. package/src/scripts/fetch-github-repos.js +441 -10
  210. package/src/scripts/get-channel.js +329 -8
  211. package/src/scripts/get-course.js +384 -11
  212. package/src/scripts/get-dependencies.js +290 -9
  213. package/src/scripts/get-folder.js +783 -10
  214. package/src/scripts/get-tunes.js +411 -10
  215. package/src/scripts/get-video.js +352 -9
  216. package/src/scripts/git-backup.js +561 -9
  217. package/src/scripts/git-clone.js +477 -9
  218. package/src/scripts/git-pup.js +303 -7
  219. package/src/scripts/git-push.js +380 -8
  220. package/src/scripts/h.js +607 -9
  221. package/src/scripts/hide-desktop-icons.js +483 -7
  222. package/src/scripts/hide-hidden-files.js +522 -7
  223. package/src/scripts/install-dependencies-from.js +440 -9
  224. package/src/scripts/ips.js +647 -10
  225. package/src/scripts/iso.js +354 -8
  226. package/src/scripts/killni.js +561 -7
  227. package/src/scripts/ll.js +451 -8
  228. package/src/scripts/local-ip.js +310 -8
  229. package/src/scripts/m.js +508 -8
  230. package/src/scripts/map.js +293 -8
  231. package/src/scripts/mkd.js +287 -7
  232. package/src/scripts/ncu-update-all.js +441 -8
  233. package/src/scripts/nginx-init.js +702 -12
  234. package/src/scripts/npmi.js +366 -7
  235. package/src/scripts/o.js +495 -8
  236. package/src/scripts/org-by-date.js +321 -7
  237. package/src/scripts/p.js +208 -7
  238. package/src/scripts/packages.js +313 -8
  239. package/src/scripts/path.js +209 -7
  240. package/src/scripts/ports.js +582 -8
  241. package/src/scripts/q.js +290 -8
  242. package/src/scripts/refresh-files.js +378 -10
  243. package/src/scripts/remove-smaller-files.js +500 -8
  244. package/src/scripts/rename-files-with-date.js +517 -9
  245. package/src/scripts/resize-image.js +523 -9
  246. package/src/scripts/rm-safe.js +653 -8
  247. package/src/scripts/s.js +525 -9
  248. package/src/scripts/set-git-public.js +349 -7
  249. package/src/scripts/show-desktop-icons.js +459 -7
  250. package/src/scripts/show-hidden-files.js +456 -7
  251. package/src/scripts/tpa.js +265 -8
  252. package/src/scripts/tpo.js +264 -7
  253. package/src/scripts/u.js +489 -7
  254. package/src/scripts/vpush.js +422 -8
  255. package/src/scripts/y.js +267 -7
  256. package/src/utils/common/os.js +94 -2
  257. package/src/utils/ubuntu/apt.js +13 -7
  258. package/src/utils/windows/choco.js +82 -26
  259. package/src/utils/windows/winget.js +89 -27
@@ -0,0 +1,1173 @@
1
+ # Installing Claude Code
2
+
3
+ ## Overview
4
+
5
+ Claude Code is an agentic coding tool developed by Anthropic that runs in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows through natural language commands. It supports macOS, Linux, and Windows, and integrates with popular development environments including VS Code, JetBrains IDEs, and terminal-based workflows.
6
+
7
+ Claude Code is distinct from the Claude Desktop application. Claude Code is a command-line interface (CLI) tool designed for developers to interact with Claude directly within their terminal and codebase, while Claude Desktop is a standalone GUI application for general-purpose AI conversations.
8
+
9
+ ## Dependencies
10
+
11
+ ### macOS (Homebrew)
12
+ - **Required:**
13
+ - Homebrew - Install via `NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
14
+ - **Optional:** None
15
+ - **Auto-installed:** None
16
+
17
+ ### Ubuntu (APT/Snap)
18
+ - **Required:**
19
+ - `curl` - Install via `sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl` (automatically installed by the script if missing)
20
+ - **Optional:**
21
+ - Node.js 18+ - Install via `curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs` (only needed for npm fallback installation)
22
+ - `npm` - Included with Node.js installation (only needed for npm fallback installation)
23
+ - **Auto-installed:**
24
+ - `curl` - Automatically installed via APT if missing
25
+
26
+ ### Raspberry Pi OS (APT/Snap)
27
+ - **Required:**
28
+ - 64-bit OS (aarch64 architecture) - Verify with `uname -m` (must output `aarch64`, not `armv7l`)
29
+ - Node.js 18+ - Install via `curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs`
30
+ - `npm` - Included with Node.js installation
31
+ - **Optional:** None (npm installation is the primary method due to native installer compatibility issues on ARM64)
32
+ - **Auto-installed:** None
33
+
34
+ ### Amazon Linux (DNF/YUM)
35
+ - **Required:**
36
+ - `curl` - Install via `sudo dnf install -y curl` (AL2023/RHEL8+) or `sudo yum install -y curl` (AL2) - automatically installed by the script if missing
37
+ - **Optional:**
38
+ - Node.js 18+ - Install via `sudo dnf install -y nodejs` (AL2023) or `curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash - && sudo yum install -y nodejs` (AL2) - only needed for npm fallback installation
39
+ - `npm` - Included with Node.js installation (only needed for npm fallback installation)
40
+ - **Auto-installed:**
41
+ - `curl` - Automatically installed via DNF/YUM if missing
42
+
43
+ ### Windows (Chocolatey/winget)
44
+ - **Required:**
45
+ - Either winget OR Chocolatey:
46
+ - `winget` - Pre-installed on Windows 10 (version 1809+) and Windows 11. If missing, install "App Installer" from Microsoft Store: `start ms-windows-store://pdp/?productid=9NBLGGH4NNS1`
47
+ - `choco` - Install via `Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))`
48
+ - **Optional:** None
49
+ - **Auto-installed:** None (winget is pre-installed on modern Windows)
50
+
51
+ ### Git Bash (Manual/Portable)
52
+ - **Required:**
53
+ - Git for Windows - Download from https://git-scm.com/downloads/win (provides Git Bash environment)
54
+ - Either winget OR Chocolatey (same as Windows platform):
55
+ - `winget.exe` - Pre-installed on Windows 10/11, accessible from Git Bash
56
+ - `choco.exe` - Install Chocolatey on Windows, accessible from Git Bash via `choco.exe`
57
+ - **Optional:**
58
+ - PowerShell - Pre-installed on Windows 10/11 (needed for native installer script method)
59
+ - **Auto-installed:** None
60
+
61
+ ## Prerequisites
62
+
63
+ Before installing Claude Code on any platform, ensure the following:
64
+
65
+ 1. **Anthropic Account with Billing** - You need an Anthropic account with one of these:
66
+ - Active billing enabled in the [Anthropic Console](https://console.anthropic.com/)
67
+ - A Claude Pro or Max subscription at [claude.ai](https://claude.ai/)
68
+ - Enterprise access through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry
69
+
70
+ 2. **Internet Connection** - Required for authentication and all AI processing (Claude Code communicates with Anthropic servers)
71
+
72
+ 3. **Terminal Access** - Claude Code runs in a terminal environment (Bash, Zsh, Fish, PowerShell, or CMD)
73
+
74
+ 4. **Supported Architecture** - x86_64 (Intel/AMD 64-bit) or ARM64 (Apple Silicon, AWS Graviton, etc.)
75
+
76
+ **Hardware Recommendations**:
77
+ - 4 GB or more RAM
78
+ - Stable internet connection
79
+
80
+ ## Platform-Specific Installation
81
+
82
+ ### macOS (Homebrew)
83
+
84
+ #### Prerequisites
85
+
86
+ - macOS 10.15 (Catalina) or later
87
+ - Homebrew package manager installed
88
+ - Terminal access (Terminal.app, iTerm2, etc.)
89
+
90
+ Homebrew supports both Apple Silicon (M1/M2/M3/M4) and Intel Macs. If Homebrew is not installed, install it first:
91
+
92
+ ```bash
93
+ NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
94
+ ```
95
+
96
+ #### Installation Steps
97
+
98
+ Run the following command to install Claude Code via Homebrew:
99
+
100
+ ```bash
101
+ brew install --cask --quiet claude-code
102
+ ```
103
+
104
+ The `--cask` flag indicates this is a macOS application (not a command-line formula), and `--quiet` suppresses non-essential output for automation compatibility.
105
+
106
+ **Alternative Method - Native Installer**:
107
+
108
+ If you prefer the native installer from Anthropic (which includes automatic updates):
109
+
110
+ ```bash
111
+ curl -fsSL https://claude.ai/install.sh | bash
112
+ ```
113
+
114
+ After installation, reload your shell configuration:
115
+
116
+ ```bash
117
+ source ~/.zshrc
118
+ ```
119
+
120
+ For Bash users:
121
+
122
+ ```bash
123
+ source ~/.bashrc
124
+ ```
125
+
126
+ #### Verification
127
+
128
+ Confirm the installation succeeded by checking the version:
129
+
130
+ ```bash
131
+ claude --version
132
+ ```
133
+
134
+ Expected output (version number will vary):
135
+
136
+ ```
137
+ claude v2.0.76 (native)
138
+ ```
139
+
140
+ Run the built-in diagnostic tool to verify the installation is healthy:
141
+
142
+ ```bash
143
+ claude doctor
144
+ ```
145
+
146
+ This displays diagnostic information including the installation type, executable path, auto-update status, and configuration.
147
+
148
+ #### Troubleshooting
149
+
150
+ **Problem**: `brew: command not found`
151
+
152
+ **Solution**: Homebrew is not installed or not in PATH. Install Homebrew or add it to your PATH:
153
+
154
+ ```bash
155
+ eval "$(/opt/homebrew/bin/brew shellenv)"
156
+ ```
157
+
158
+ For Intel Macs, use:
159
+
160
+ ```bash
161
+ eval "$(/usr/local/bin/brew shellenv)"
162
+ ```
163
+
164
+ **Problem**: Installation fails with "Cask 'claude-code' is not available"
165
+
166
+ **Solution**: Update Homebrew to get the latest cask definitions:
167
+
168
+ ```bash
169
+ brew update
170
+ brew install --cask --quiet claude-code
171
+ ```
172
+
173
+ **Problem**: `claude: command not found` after installation
174
+
175
+ **Solution**: The binary is installed but not in PATH. For Homebrew cask installations, ensure `/usr/local/bin` (Intel) or `/opt/homebrew/bin` (Apple Silicon) is in your PATH. Open a new terminal window or run:
176
+
177
+ ```bash
178
+ export PATH="/opt/homebrew/bin:$PATH"
179
+ ```
180
+
181
+ **Problem**: Authentication fails after launching Claude Code
182
+
183
+ **Solution**: Ensure you have an active Anthropic account with billing enabled. Run `/login` within Claude Code to re-authenticate.
184
+
185
+ ---
186
+
187
+ ### Ubuntu/Debian (APT)
188
+
189
+ #### Prerequisites
190
+
191
+ - Ubuntu 20.04 or later, or Debian 10 or later (64-bit)
192
+ - sudo privileges
193
+ - curl installed (pre-installed on most systems)
194
+ - Active internet connection
195
+
196
+ Verify curl is installed:
197
+
198
+ ```bash
199
+ which curl || sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl
200
+ ```
201
+
202
+ #### Installation Steps
203
+
204
+ Run the following command to install Claude Code using the native installer:
205
+
206
+ ```bash
207
+ curl -fsSL https://claude.ai/install.sh | bash
208
+ ```
209
+
210
+ This downloads and installs the Claude Code binary to `~/.local/bin/claude`. The installer automatically adds the binary to your PATH.
211
+
212
+ After installation, reload your shell configuration:
213
+
214
+ ```bash
215
+ source ~/.bashrc
216
+ ```
217
+
218
+ For Zsh users:
219
+
220
+ ```bash
221
+ source ~/.zshrc
222
+ ```
223
+
224
+ **Alternative Method - npm Installation**:
225
+
226
+ If you prefer using npm (requires Node.js 18 or later):
227
+
228
+ First, ensure Node.js 18+ is installed:
229
+
230
+ ```bash
231
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
232
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
233
+ ```
234
+
235
+ Then install Claude Code globally:
236
+
237
+ ```bash
238
+ npm install -g @anthropic-ai/claude-code
239
+ ```
240
+
241
+ **Important**: Do NOT use `sudo npm install -g` as this causes permission issues. If you encounter permission errors, configure npm to use a user directory:
242
+
243
+ ```bash
244
+ mkdir -p ~/.npm-global
245
+ npm config set prefix ~/.npm-global
246
+ echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bashrc
247
+ source ~/.bashrc
248
+ npm install -g @anthropic-ai/claude-code
249
+ ```
250
+
251
+ #### Verification
252
+
253
+ Confirm the installation succeeded:
254
+
255
+ ```bash
256
+ claude --version
257
+ ```
258
+
259
+ Expected output (version number will vary):
260
+
261
+ ```
262
+ claude v2.0.76 (native)
263
+ ```
264
+
265
+ Run the diagnostic tool:
266
+
267
+ ```bash
268
+ claude doctor
269
+ ```
270
+
271
+ #### Troubleshooting
272
+
273
+ **Problem**: `curl: command not found`
274
+
275
+ **Solution**: Install curl:
276
+
277
+ ```bash
278
+ sudo DEBIAN_FRONTEND=noninteractive apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y curl
279
+ ```
280
+
281
+ **Problem**: `claude: command not found` after installation
282
+
283
+ **Solution**: The binary was installed but your shell has not reloaded. Run:
284
+
285
+ ```bash
286
+ source ~/.bashrc
287
+ ```
288
+
289
+ Or open a new terminal window. If the problem persists, manually add the binary to PATH:
290
+
291
+ ```bash
292
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
293
+ source ~/.bashrc
294
+ ```
295
+
296
+ **Problem**: Node.js version is too old for npm installation
297
+
298
+ **Solution**: Check your Node.js version:
299
+
300
+ ```bash
301
+ node --version
302
+ ```
303
+
304
+ If below v18, update Node.js using the NodeSource repository:
305
+
306
+ ```bash
307
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
308
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
309
+ ```
310
+
311
+ **Problem**: Permission errors with npm install
312
+
313
+ **Solution**: Never use `sudo npm install -g`. Instead, configure npm to use a user directory as shown in the installation steps above.
314
+
315
+ ---
316
+
317
+ ### Raspberry Pi OS (APT)
318
+
319
+ #### Prerequisites
320
+
321
+ - Raspberry Pi OS (64-bit) - ARM64/aarch64 architecture **required**
322
+ - Raspberry Pi 4 or later with 4 GB or more RAM recommended
323
+ - sudo privileges
324
+ - curl installed
325
+ - Node.js 18 or later (for npm installation method)
326
+
327
+ **Critical Architecture Requirement**: Claude Code requires a 64-bit operating system. Verify your architecture:
328
+
329
+ ```bash
330
+ uname -m
331
+ ```
332
+
333
+ This must output `aarch64`. If it outputs `armv7l`, you are running 32-bit Raspberry Pi OS and must install the 64-bit version from the [Raspberry Pi Imager](https://www.raspberrypi.com/software/).
334
+
335
+ #### Installation Steps
336
+
337
+ **Important Note**: The native Claude Code installer has had compatibility issues with Raspberry Pi ARM64 architecture in certain versions. The npm installation method is recommended for Raspberry Pi to avoid architecture detection bugs.
338
+
339
+ **Step 1**: Install Node.js 22 (LTS) from the NodeSource repository:
340
+
341
+ ```bash
342
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
343
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
344
+ ```
345
+
346
+ **Step 2**: Configure npm to use a user directory (prevents permission issues):
347
+
348
+ ```bash
349
+ mkdir -p ~/.npm-global
350
+ npm config set prefix ~/.npm-global
351
+ echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bashrc
352
+ source ~/.bashrc
353
+ ```
354
+
355
+ **Step 3**: Install Claude Code via npm:
356
+
357
+ ```bash
358
+ npm install -g @anthropic-ai/claude-code
359
+ ```
360
+
361
+ **Alternative - Native Installer** (may have compatibility issues):
362
+
363
+ You can try the native installer, which may work on recent versions:
364
+
365
+ ```bash
366
+ curl -fsSL https://claude.ai/install.sh | bash
367
+ source ~/.bashrc
368
+ ```
369
+
370
+ If the native installer fails with "Unsupported architecture: arm", use the npm method above.
371
+
372
+ #### Verification
373
+
374
+ Confirm the installation succeeded:
375
+
376
+ ```bash
377
+ claude --version
378
+ ```
379
+
380
+ Expected output (version number will vary):
381
+
382
+ ```
383
+ claude v2.0.76 (npm)
384
+ ```
385
+
386
+ Run the diagnostic tool:
387
+
388
+ ```bash
389
+ claude doctor
390
+ ```
391
+
392
+ #### Troubleshooting
393
+
394
+ **Problem**: Native installer fails with "Unsupported architecture: arm"
395
+
396
+ **Solution**: This is a known bug in certain versions of the native installer where aarch64 is incorrectly rejected. Use the npm installation method instead:
397
+
398
+ ```bash
399
+ npm install -g @anthropic-ai/claude-code
400
+ ```
401
+
402
+ **Problem**: Claude Code crashes on launch with memory errors
403
+
404
+ **Solution**: Some ARM64-specific bugs exist in certain Claude Code versions. If you experience crashes, you can install a known working version:
405
+
406
+ ```bash
407
+ npm uninstall -g @anthropic-ai/claude-code
408
+ npm install -g @anthropic-ai/claude-code@0.2.114
409
+ ```
410
+
411
+ Note that this older version may lack newer features but provides stability on ARM64.
412
+
413
+ **Problem**: `uname -m` shows `armv7l` instead of `aarch64`
414
+
415
+ **Solution**: You are running 32-bit Raspberry Pi OS. Claude Code requires 64-bit. Download and install the 64-bit Raspberry Pi OS image from https://www.raspberrypi.com/software/.
416
+
417
+ **Problem**: Node.js version below 18
418
+
419
+ **Solution**: Remove the old Node.js and install version 22:
420
+
421
+ ```bash
422
+ sudo DEBIAN_FRONTEND=noninteractive apt-get remove -y nodejs
423
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
424
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
425
+ ```
426
+
427
+ **Problem**: Slow performance or high memory usage
428
+
429
+ **Solution**: Raspberry Pi has limited resources. Close other applications, ensure you have at least 4 GB RAM, and consider using swap:
430
+
431
+ ```bash
432
+ sudo dphys-swapfile swapoff
433
+ sudo sed -i 's/CONF_SWAPSIZE=.*/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile
434
+ sudo dphys-swapfile setup
435
+ sudo dphys-swapfile swapon
436
+ ```
437
+
438
+ ---
439
+
440
+ ### Amazon Linux/RHEL (DNF/YUM)
441
+
442
+ #### Prerequisites
443
+
444
+ - Amazon Linux 2023 (AL2023), Amazon Linux 2 (AL2), RHEL 8+, or CentOS Stream 8+
445
+ - sudo privileges
446
+ - curl installed
447
+ - Active internet connection
448
+
449
+ Amazon Linux is typically used as a server operating system. Claude Code works well in headless server environments for AI-assisted development tasks.
450
+
451
+ #### Installation Steps
452
+
453
+ Run the following command to install Claude Code using the native installer:
454
+
455
+ ```bash
456
+ curl -fsSL https://claude.ai/install.sh | bash
457
+ ```
458
+
459
+ After installation, reload your shell configuration:
460
+
461
+ ```bash
462
+ source ~/.bashrc
463
+ ```
464
+
465
+ **Alternative Method - npm Installation**:
466
+
467
+ If you prefer npm (requires Node.js 18+):
468
+
469
+ **For Amazon Linux 2023**:
470
+
471
+ ```bash
472
+ sudo dnf install -y nodejs
473
+ ```
474
+
475
+ **For Amazon Linux 2**:
476
+
477
+ ```bash
478
+ curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
479
+ sudo yum install -y nodejs
480
+ ```
481
+
482
+ Configure npm to use a user directory:
483
+
484
+ ```bash
485
+ mkdir -p ~/.npm-global
486
+ npm config set prefix ~/.npm-global
487
+ echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bashrc
488
+ source ~/.bashrc
489
+ ```
490
+
491
+ Install Claude Code:
492
+
493
+ ```bash
494
+ npm install -g @anthropic-ai/claude-code
495
+ ```
496
+
497
+ #### Verification
498
+
499
+ Confirm the installation succeeded:
500
+
501
+ ```bash
502
+ claude --version
503
+ ```
504
+
505
+ Expected output (version number will vary):
506
+
507
+ ```
508
+ claude v2.0.76 (native)
509
+ ```
510
+
511
+ Run the diagnostic tool:
512
+
513
+ ```bash
514
+ claude doctor
515
+ ```
516
+
517
+ #### Troubleshooting
518
+
519
+ **Problem**: `curl: command not found`
520
+
521
+ **Solution**: Install curl:
522
+
523
+ For Amazon Linux 2023:
524
+
525
+ ```bash
526
+ sudo dnf install -y curl
527
+ ```
528
+
529
+ For Amazon Linux 2:
530
+
531
+ ```bash
532
+ sudo yum install -y curl
533
+ ```
534
+
535
+ **Problem**: `claude: command not found` after installation
536
+
537
+ **Solution**: The binary was installed but your shell has not reloaded. Run:
538
+
539
+ ```bash
540
+ source ~/.bashrc
541
+ ```
542
+
543
+ Or manually add to PATH:
544
+
545
+ ```bash
546
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
547
+ source ~/.bashrc
548
+ ```
549
+
550
+ **Problem**: Node.js version too old for npm installation
551
+
552
+ **Solution**: Use the NodeSource repository:
553
+
554
+ ```bash
555
+ curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
556
+ sudo dnf install -y nodejs
557
+ ```
558
+
559
+ Or for yum-based systems:
560
+
561
+ ```bash
562
+ sudo yum install -y nodejs
563
+ ```
564
+
565
+ **Problem**: SELinux blocking execution
566
+
567
+ **Solution**: If SELinux is enforcing and blocking Claude Code, you can check the audit log:
568
+
569
+ ```bash
570
+ sudo ausearch -m avc -ts recent
571
+ ```
572
+
573
+ You may need to create a custom SELinux policy or set the binary to permissive for testing:
574
+
575
+ ```bash
576
+ sudo setenforce 0
577
+ ```
578
+
579
+ Note: This is temporary. For production, create a proper SELinux policy.
580
+
581
+ ---
582
+
583
+ ### Windows (Chocolatey/winget)
584
+
585
+ #### Prerequisites
586
+
587
+ - Windows 10 version 1809 or later, or Windows 11
588
+ - Administrator privileges for installation
589
+ - PowerShell 5.1 or later (pre-installed on Windows 10/11)
590
+ - Active internet connection
591
+
592
+ Choose one of these package managers. Winget is pre-installed on Windows 10/11; Chocolatey requires installation.
593
+
594
+ #### Installation Steps
595
+
596
+ **Method 1 - Using winget (Recommended)**:
597
+
598
+ Open PowerShell or Command Prompt as Administrator and run:
599
+
600
+ ```powershell
601
+ winget install --id Anthropic.ClaudeCode --silent --accept-package-agreements --accept-source-agreements
602
+ ```
603
+
604
+ This command:
605
+ - `--id Anthropic.ClaudeCode` - Specifies the Claude Code package
606
+ - `--silent` - Runs without user prompts
607
+ - `--accept-package-agreements` - Automatically accepts license agreements
608
+ - `--accept-source-agreements` - Automatically accepts source agreements
609
+
610
+ **Method 2 - Using Chocolatey**:
611
+
612
+ If Chocolatey is not installed, install it first (run in Administrator PowerShell):
613
+
614
+ ```powershell
615
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
616
+ ```
617
+
618
+ Then install Claude Code:
619
+
620
+ ```powershell
621
+ choco install claude-code -y
622
+ ```
623
+
624
+ The `-y` flag automatically confirms the installation without prompts.
625
+
626
+ **Method 3 - Using Native PowerShell Installer**:
627
+
628
+ ```powershell
629
+ irm https://claude.ai/install.ps1 | iex
630
+ ```
631
+
632
+ This downloads and runs Anthropic's official installer script, which installs the native binary with automatic updates.
633
+
634
+ After installation, close and reopen your terminal for PATH updates to take effect.
635
+
636
+ #### Verification
637
+
638
+ Open a new PowerShell or Command Prompt window (required for PATH to update), then run:
639
+
640
+ ```powershell
641
+ claude --version
642
+ ```
643
+
644
+ Expected output (version number will vary):
645
+
646
+ ```
647
+ claude v2.0.76 (native)
648
+ ```
649
+
650
+ Run the diagnostic tool:
651
+
652
+ ```powershell
653
+ claude doctor
654
+ ```
655
+
656
+ #### Troubleshooting
657
+
658
+ **Problem**: `winget: The term 'winget' is not recognized`
659
+
660
+ **Solution**: Winget may not be installed. Install App Installer from the Microsoft Store:
661
+
662
+ ```powershell
663
+ start ms-windows-store://pdp/?productid=9NBLGGH4NNS1
664
+ ```
665
+
666
+ After installation, open a new terminal window.
667
+
668
+ **Problem**: `choco: The term 'choco' is not recognized`
669
+
670
+ **Solution**: Chocolatey is not installed. Install it using the command in the installation steps above.
671
+
672
+ **Problem**: `claude: The term 'claude' is not recognized` after installation
673
+
674
+ **Solution**: The PATH has not been updated. Close and reopen your terminal. If the problem persists, manually add Claude Code to your PATH:
675
+
676
+ For native installer:
677
+
678
+ ```powershell
679
+ $env:PATH += ";$env:LOCALAPPDATA\Programs\claude-code"
680
+ ```
681
+
682
+ **Problem**: Installation fails with "Administrator privileges required"
683
+
684
+ **Solution**: Right-click PowerShell or Command Prompt and select "Run as administrator", then retry the installation command.
685
+
686
+ **Problem**: Windows Defender SmartScreen blocks the installer
687
+
688
+ **Solution**: The native installer from Anthropic is signed and safe. Click "More info" and then "Run anyway". For enterprise environments, contact your IT administrator to whitelist the Anthropic installer.
689
+
690
+ ---
691
+
692
+ ### WSL (Ubuntu)
693
+
694
+ #### Prerequisites
695
+
696
+ - Windows 10 version 2004 or later, or Windows 11
697
+ - Windows Subsystem for Linux installed with Ubuntu distribution
698
+ - WSL 2 recommended for best performance
699
+ - sudo privileges within WSL
700
+
701
+ **Important**: Claude Code runs natively within WSL. There is no need to install it on both Windows and WSL - install only within the WSL environment for the best experience.
702
+
703
+ Verify WSL is installed and running Ubuntu:
704
+
705
+ ```bash
706
+ wsl --list --verbose
707
+ ```
708
+
709
+ #### Installation Steps
710
+
711
+ Open your WSL Ubuntu terminal and run the native installer:
712
+
713
+ ```bash
714
+ curl -fsSL https://claude.ai/install.sh | bash
715
+ ```
716
+
717
+ After installation, reload your shell configuration:
718
+
719
+ ```bash
720
+ source ~/.bashrc
721
+ ```
722
+
723
+ For Zsh users:
724
+
725
+ ```bash
726
+ source ~/.zshrc
727
+ ```
728
+
729
+ **Alternative Method - npm Installation**:
730
+
731
+ If you prefer npm (requires Node.js 18+):
732
+
733
+ ```bash
734
+ curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
735
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
736
+ ```
737
+
738
+ Configure npm to use a user directory:
739
+
740
+ ```bash
741
+ mkdir -p ~/.npm-global
742
+ npm config set prefix ~/.npm-global
743
+ echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bashrc
744
+ source ~/.bashrc
745
+ ```
746
+
747
+ Install Claude Code:
748
+
749
+ ```bash
750
+ npm install -g @anthropic-ai/claude-code
751
+ ```
752
+
753
+ #### Verification
754
+
755
+ Confirm the installation succeeded:
756
+
757
+ ```bash
758
+ claude --version
759
+ ```
760
+
761
+ Expected output (version number will vary):
762
+
763
+ ```
764
+ claude v2.0.76 (native)
765
+ ```
766
+
767
+ Run the diagnostic tool:
768
+
769
+ ```bash
770
+ claude doctor
771
+ ```
772
+
773
+ #### Troubleshooting
774
+
775
+ **Problem**: WSL is not installed
776
+
777
+ **Solution**: Install WSL from PowerShell (as Administrator):
778
+
779
+ ```powershell
780
+ wsl --install -d Ubuntu
781
+ ```
782
+
783
+ Restart your computer after installation.
784
+
785
+ **Problem**: `claude: command not found` after installation
786
+
787
+ **Solution**: Reload your shell configuration:
788
+
789
+ ```bash
790
+ source ~/.bashrc
791
+ ```
792
+
793
+ Or add the binary to PATH manually:
794
+
795
+ ```bash
796
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
797
+ source ~/.bashrc
798
+ ```
799
+
800
+ **Problem**: Authentication issues between WSL and Windows browser
801
+
802
+ **Solution**: When Claude Code opens a browser for OAuth, it may open in Windows. Ensure your default Windows browser is configured. If authentication callbacks fail, copy the authentication URL manually into your Windows browser.
803
+
804
+ **Problem**: Slow file access when working with Windows files
805
+
806
+ **Solution**: WSL has slower performance when accessing files on the Windows filesystem (`/mnt/c/`). For best performance, keep your projects within the WSL filesystem (`~/projects/` or similar).
807
+
808
+ **Problem**: Network connectivity issues within WSL
809
+
810
+ **Solution**: If Claude Code cannot reach Anthropic servers, check your WSL network configuration:
811
+
812
+ ```bash
813
+ cat /etc/resolv.conf
814
+ ```
815
+
816
+ For persistent DNS issues, add to `/etc/wsl.conf`:
817
+
818
+ ```bash
819
+ sudo tee -a /etc/wsl.conf > /dev/null << 'EOF'
820
+ [network]
821
+ generateResolvConf = false
822
+ EOF
823
+ ```
824
+
825
+ Then restart WSL from PowerShell:
826
+
827
+ ```powershell
828
+ wsl --shutdown
829
+ ```
830
+
831
+ ---
832
+
833
+ ### Git Bash (Manual/Portable)
834
+
835
+ #### Prerequisites
836
+
837
+ - Windows 10 or later
838
+ - Git for Windows installed (provides Git Bash)
839
+ - PowerShell available (for initial installation)
840
+
841
+ Git Bash provides a Unix-compatible environment on Windows, making it ideal for Claude Code. The tool translates Unix paths and commands automatically.
842
+
843
+ Download Git for Windows from https://git-scm.com/downloads/win if not already installed.
844
+
845
+ #### Installation Steps
846
+
847
+ Git Bash can execute Windows commands, so use the PowerShell installer from within Git Bash:
848
+
849
+ **Method 1 - Using PowerShell from Git Bash**:
850
+
851
+ ```bash
852
+ powershell.exe -Command "irm https://claude.ai/install.ps1 | iex"
853
+ ```
854
+
855
+ **Method 2 - Using winget from Git Bash**:
856
+
857
+ ```bash
858
+ winget.exe install --id Anthropic.ClaudeCode --silent --accept-package-agreements --accept-source-agreements
859
+ ```
860
+
861
+ **Method 3 - Using Chocolatey from Git Bash**:
862
+
863
+ ```bash
864
+ choco.exe install claude-code -y
865
+ ```
866
+
867
+ After installation, close and reopen Git Bash for PATH updates to take effect.
868
+
869
+ **Configure Git Bash Path (if needed)**:
870
+
871
+ If Claude Code has trouble locating Git Bash, set the environment variable in PowerShell before running Claude Code:
872
+
873
+ ```powershell
874
+ $env:CLAUDE_CODE_GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"
875
+ ```
876
+
877
+ For portable Git installations, adjust the path accordingly.
878
+
879
+ #### Verification
880
+
881
+ Open a new Git Bash window and run:
882
+
883
+ ```bash
884
+ claude --version
885
+ ```
886
+
887
+ Expected output (version number will vary):
888
+
889
+ ```
890
+ claude v2.0.76 (native)
891
+ ```
892
+
893
+ Run the diagnostic tool:
894
+
895
+ ```bash
896
+ claude doctor
897
+ ```
898
+
899
+ #### Troubleshooting
900
+
901
+ **Problem**: `winget.exe: command not found`
902
+
903
+ **Solution**: Winget may not be in the Git Bash PATH. Use the full path:
904
+
905
+ ```bash
906
+ /c/Users/$USER/AppData/Local/Microsoft/WindowsApps/winget.exe install --id Anthropic.ClaudeCode --silent --accept-package-agreements --accept-source-agreements
907
+ ```
908
+
909
+ **Problem**: `claude: command not found` after installation
910
+
911
+ **Solution**: The PATH in Git Bash may not include the Claude Code binary. Add it manually:
912
+
913
+ ```bash
914
+ echo 'export PATH="$PATH:/c/Users/$USER/AppData/Local/Programs/claude-code"' >> ~/.bashrc
915
+ source ~/.bashrc
916
+ ```
917
+
918
+ **Problem**: PowerShell command fails from Git Bash
919
+
920
+ **Solution**: Ensure PowerShell is accessible. Try using the full path:
921
+
922
+ ```bash
923
+ /c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command "irm https://claude.ai/install.ps1 | iex"
924
+ ```
925
+
926
+ **Problem**: Path translation issues between Git Bash and Windows
927
+
928
+ **Solution**: Git Bash automatically translates paths, but some edge cases may require explicit Windows paths. Use `cygpath` to convert:
929
+
930
+ ```bash
931
+ cygpath -w ~/.local/bin/claude
932
+ ```
933
+
934
+ **Problem**: Claude Code cannot execute shell commands
935
+
936
+ **Solution**: Ensure Git Bash's bash.exe is properly configured. Set the environment variable:
937
+
938
+ ```bash
939
+ export CLAUDE_CODE_GIT_BASH_PATH="/c/Program Files/Git/bin/bash.exe"
940
+ ```
941
+
942
+ Add this to `~/.bashrc` for persistence.
943
+
944
+ ---
945
+
946
+ ## Post-Installation Configuration
947
+
948
+ ### First-Time Setup
949
+
950
+ After installing Claude Code on any platform:
951
+
952
+ 1. **Launch Claude Code** - Open a terminal and run:
953
+
954
+ ```bash
955
+ claude
956
+ ```
957
+
958
+ 2. **Authenticate** - On first launch, Claude Code guides you through OAuth authentication:
959
+ - A browser window opens automatically
960
+ - Sign in with your Anthropic account (or Claude.ai account for Pro/Max subscribers)
961
+ - Authorize Claude Code to access your account
962
+ - Return to the terminal after authorization completes
963
+
964
+ 3. **Select Terminal Style** - Choose your preferred interface mode when prompted
965
+
966
+ 4. **Verify Authentication** - Run `/status` within Claude Code to confirm you are authenticated
967
+
968
+ ### Authentication Methods
969
+
970
+ Claude Code supports multiple authentication methods:
971
+
972
+ **OAuth (Recommended)**:
973
+ - Default method for most users
974
+ - Works with Claude Console accounts and Claude Pro/Max subscriptions
975
+ - Credentials stored securely (macOS Keychain, system keyring on Linux, Windows Credential Manager)
976
+
977
+ **API Key**:
978
+ - For programmatic or CI/CD use
979
+ - Set the `ANTHROPIC_API_KEY` environment variable:
980
+
981
+ ```bash
982
+ export ANTHROPIC_API_KEY="sk-ant-..."
983
+ ```
984
+
985
+ - API key usage incurs pay-as-you-go charges regardless of subscription status
986
+
987
+ **Enterprise Providers**:
988
+ - Configure Claude Code for Amazon Bedrock, Google Vertex AI, or Microsoft Foundry
989
+ - See the [Claude Code IAM documentation](https://code.claude.com/docs/en/iam) for enterprise setup
990
+
991
+ ### Configuration Files
992
+
993
+ Claude Code stores configuration in these locations:
994
+
995
+ | Platform | Configuration Location |
996
+ |----------|----------------------|
997
+ | macOS/Linux | `~/.claude/` and `~/.claude.json` |
998
+ | Windows | `%USERPROFILE%\.claude\` and `%USERPROFILE%\.claude.json` |
999
+
1000
+ Project-specific settings can be placed in `.claude/` within your project directory.
1001
+
1002
+ ### Auto-Updates
1003
+
1004
+ Claude Code automatically keeps itself up to date. Updates download and install in the background without interrupting your work.
1005
+
1006
+ To disable auto-updates (not recommended):
1007
+
1008
+ ```bash
1009
+ export DISABLE_AUTOUPDATER=1
1010
+ ```
1011
+
1012
+ To manually trigger an update (native installations only):
1013
+
1014
+ ```bash
1015
+ claude update
1016
+ ```
1017
+
1018
+ Note: The `claude update` command is only available for native installations, not npm installations.
1019
+
1020
+ ---
1021
+
1022
+ ## Common Issues
1023
+
1024
+ ### Issue: "Not authenticated" or 403 Forbidden Errors
1025
+
1026
+ **Symptoms**: Claude Code refuses to process requests, showing authentication errors.
1027
+
1028
+ **Solution**:
1029
+ 1. Run `/login` within Claude Code to re-authenticate
1030
+ 2. Ensure your Anthropic account has active billing or a valid subscription
1031
+ 3. Check if an API key is overriding OAuth: run `/status` to see which authentication method is active
1032
+ 4. If using an API key, verify it is valid at https://console.anthropic.com/
1033
+
1034
+ ### Issue: Slow Response Times
1035
+
1036
+ **Symptoms**: Claude Code takes a long time to respond to prompts.
1037
+
1038
+ **Solution**:
1039
+ 1. Check your internet connection stability
1040
+ 2. Verify Anthropic services are operational at https://status.anthropic.com/
1041
+ 3. Large codebases may take longer to analyze - consider using `.claudeignore` to exclude unnecessary files
1042
+ 4. Close unnecessary applications consuming system resources
1043
+
1044
+ ### Issue: "Unable to connect" Network Errors
1045
+
1046
+ **Symptoms**: Claude Code cannot communicate with Anthropic servers.
1047
+
1048
+ **Solution**:
1049
+ 1. Verify internet connectivity
1050
+ 2. Check if a firewall or proxy is blocking outbound connections to `*.anthropic.com` and `*.claude.ai`
1051
+ 3. For corporate networks, contact IT to whitelist Anthropic domains
1052
+ 4. Try using a different network to isolate the issue
1053
+
1054
+ ### Issue: High Memory or CPU Usage
1055
+
1056
+ **Symptoms**: Claude Code consumes excessive system resources.
1057
+
1058
+ **Solution**:
1059
+ 1. Large codebases increase memory usage - use `.claudeignore` to exclude large directories
1060
+ 2. Restart Claude Code to clear cached data
1061
+ 3. Check `claude doctor` for diagnostic information
1062
+ 4. On resource-constrained systems (like Raspberry Pi), close other applications
1063
+
1064
+ ### Issue: Multiple Installations Detected
1065
+
1066
+ **Symptoms**: `claude doctor` reports multiple Claude Code installations or configuration mismatches.
1067
+
1068
+ **Solution**:
1069
+ 1. Uninstall duplicate installations:
1070
+
1071
+ For npm:
1072
+ ```bash
1073
+ npm uninstall -g @anthropic-ai/claude-code
1074
+ ```
1075
+
1076
+ For Homebrew:
1077
+ ```bash
1078
+ brew uninstall --cask claude-code
1079
+ ```
1080
+
1081
+ For native (macOS/Linux):
1082
+ ```bash
1083
+ rm -f ~/.local/bin/claude
1084
+ rm -rf ~/.claude-code
1085
+ ```
1086
+
1087
+ 2. Reinstall using a single method (native installer recommended)
1088
+ 3. Run `claude doctor` to verify the configuration
1089
+
1090
+ ### Issue: Shell Commands Fail Inside Claude Code
1091
+
1092
+ **Symptoms**: Claude Code cannot execute shell commands or reports permission errors.
1093
+
1094
+ **Solution**:
1095
+ 1. Verify your shell is supported (Bash, Zsh, Fish, PowerShell)
1096
+ 2. On Windows, ensure Git Bash is properly configured with `CLAUDE_CODE_GIT_BASH_PATH`
1097
+ 3. Check file permissions in your project directory
1098
+ 4. On macOS, grant Terminal full disk access in System Preferences > Privacy & Security
1099
+
1100
+ ---
1101
+
1102
+ ## Uninstallation
1103
+
1104
+ ### Native Installation (macOS/Linux/WSL)
1105
+
1106
+ ```bash
1107
+ rm -f ~/.local/bin/claude
1108
+ rm -rf ~/.claude-code
1109
+ ```
1110
+
1111
+ ### Homebrew (macOS)
1112
+
1113
+ ```bash
1114
+ brew uninstall --cask claude-code
1115
+ ```
1116
+
1117
+ ### npm (All Platforms)
1118
+
1119
+ ```bash
1120
+ npm uninstall -g @anthropic-ai/claude-code
1121
+ ```
1122
+
1123
+ ### Windows Native
1124
+
1125
+ PowerShell:
1126
+
1127
+ ```powershell
1128
+ Remove-Item -Path "$env:LOCALAPPDATA\Programs\claude-code" -Recurse -Force
1129
+ Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\WindowsApps\claude.exe" -Force
1130
+ ```
1131
+
1132
+ ### Chocolatey (Windows)
1133
+
1134
+ ```powershell
1135
+ choco uninstall claude-code -y
1136
+ ```
1137
+
1138
+ ### winget (Windows)
1139
+
1140
+ ```powershell
1141
+ winget uninstall --id Anthropic.ClaudeCode --silent
1142
+ ```
1143
+
1144
+ ### Clean Up Configuration Files (Optional)
1145
+
1146
+ macOS/Linux/WSL:
1147
+
1148
+ ```bash
1149
+ rm -rf ~/.claude
1150
+ rm -f ~/.claude.json
1151
+ ```
1152
+
1153
+ Windows PowerShell:
1154
+
1155
+ ```powershell
1156
+ Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
1157
+ Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
1158
+ ```
1159
+
1160
+ ---
1161
+
1162
+ ## References
1163
+
1164
+ - [Claude Code Official Documentation](https://code.claude.com/docs/en/overview)
1165
+ - [Claude Code Setup Guide](https://code.claude.com/docs/en/setup)
1166
+ - [Claude Code GitHub Repository](https://github.com/anthropics/claude-code)
1167
+ - [Anthropic Console](https://console.anthropic.com/)
1168
+ - [Claude Code npm Package](https://www.npmjs.com/package/@anthropic-ai/claude-code)
1169
+ - [Claude Code Homebrew Cask](https://formulae.brew.sh/cask/claude-code)
1170
+ - [Claude Code Chocolatey Package](https://community.chocolatey.org/packages/claude-code)
1171
+ - [Claude Code winget Package](https://winstall.app/apps/Anthropic.ClaudeCode)
1172
+ - [Claude Code Troubleshooting](https://docs.claude.com/en/docs/claude-code/troubleshooting)
1173
+ - [Anthropic Status Page](https://status.anthropic.com/)