You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows installer (PowerShell + cmd shim) and CI smoke test (#1)
* Add Windows installer (PowerShell + cmd shim) and CI smoke test
install-claude46.ps1 installs @anthropic-ai/claude-code@2.1.110 via npm
into an isolated %LOCALAPPDATA%\claude46 prefix, writes a claude46.cmd
wrapper setting DISABLE_AUTOUPDATER, DISABLE_UPDATES, and ANTHROPIC_MODEL,
and adds the bin dir to user PATH. install-claude46.cmd is a cmd-entry
shim that hands off to the PowerShell installer.
Retrofit the bash installer with DISABLE_UPDATES=1 for parity, document
the Windows path in the README (WSL, native installer, ad-hoc npx), and
add a windows-2025 CI smoke test that exercises both wrappers end-to-end.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Scope CI to main pushes/PRs with installer-only paths filter
After landing, the smoke test should fire on direct pushes to main and
on PRs targeting main that touch installer files or the workflow itself,
not on every push to a feature branch. Manual dispatch remains.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Dimitar Stoyanov <dimitar.h.stoyanov@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+79-6Lines changed: 79 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,17 @@ This project is not affiliated with Anthropic. Claude and Claude Code are Anthro
10
10
11
11
It is intended for users who want to keep running Claude Opus 4.6 after Opus 4.7 became the default, while leaving the regular `claude` command free to auto-update.
The launcher sets `DISABLE_AUTOUPDATER=1`, so `claude46` stays pinned. Your normal `claude` command is not modified.
21
+
(Native Windows install layout is described in the [Windows](#windows) section.)
22
+
23
+
The launcher sets `DISABLE_AUTOUPDATER=1` and `DISABLE_UPDATES=1`, so `claude46` stays pinned (background auto-updates blocked, and an explicit `claude46 update` is a no-op). Your normal `claude` command is not modified.
22
24
23
25
## Install claude46 to Keep Using Claude Opus 4.6
24
26
@@ -104,7 +106,9 @@ This replaces the pinned binary and launcher at the same paths.
104
106
105
107
## Uninstall
106
108
107
-
Remove the pinned binary and launcher:
109
+
Remove the pinned binary and launcher.
110
+
111
+
macOS / Linux / WSL:
108
112
109
113
```bash
110
114
rm -f "$HOME/.local/bin/claude46"
@@ -117,13 +121,82 @@ Optionally remove this line from `~/.zshrc` if you no longer need it:
Optionally remove `%LOCALAPPDATA%\claude46\bin` from your user PATH via System Properties → Environment Variables.
131
+
120
132
## Requirements
121
133
122
-
- macOS or Linux
134
+
- macOS or Linux (including WSL)
123
135
-`curl`
124
136
-`bash`
125
137
-`~/.local/bin` on your `PATH`
126
138
139
+
For native Windows, see [Windows](#windows) below.
140
+
141
+
## Windows
142
+
143
+
`install-claude46.sh` does not run on native Windows. Use one of these paths:
144
+
145
+
### Inside WSL (recommended)
146
+
147
+
Open a WSL shell and follow the bash install steps in [Install](#install-claude46-to-keep-using-claude-opus-46) / [Local Install](#local-install) above. The bash script identifies WSL as Linux, and `claude46` will be available from your WSL terminals.
148
+
149
+
### Native Windows: `install-claude46.ps1`
150
+
151
+
The PowerShell installer pins `@anthropic-ai/claude-code@2.1.110` via npm into an isolated prefix at `%LOCALAPPDATA%\claude46\`, writes a `claude46.cmd` wrapper that sets `DISABLE_AUTOUPDATER=1`, `DISABLE_UPDATES=1`, and `ANTHROPIC_MODEL=claude-opus-4-6[1m]`, and adds `%LOCALAPPDATA%\claude46\bin` to your user PATH. No admin rights needed. Your global `claude` (if any) is untouched.
152
+
153
+
Prerequisites:
154
+
155
+
- Node.js 18+ and npm
156
+
- Git for Windows (Claude Code requires Git Bash on native Windows; set `CLAUDE_CODE_GIT_BASH_PATH` if Git is installed in a nonstandard location)
To run the latest from `main` instead, replace `v0.2.0` with `main` in the URL.
171
+
172
+
Local install from a cloned repo:
173
+
174
+
```cmd
175
+
install-claude46.cmd
176
+
```
177
+
178
+
Open a new terminal after install, then run `claude46`.
179
+
180
+
### Without installing (ad-hoc via npx)
181
+
182
+
For a one-off pinned Opus 4.6 session without installing anything globally, from PowerShell:
183
+
184
+
```powershell
185
+
$env:DISABLE_AUTOUPDATER="1"
186
+
$env:DISABLE_UPDATES="1"
187
+
$env:ANTHROPIC_MODEL="claude-opus-4-6[1m]"
188
+
npx --yes --package=@anthropic-ai/claude-code@2.1.110 claude
189
+
```
190
+
191
+
From `cmd.exe`:
192
+
193
+
```cmd
194
+
set "DISABLE_AUTOUPDATER=1"
195
+
set "DISABLE_UPDATES=1"
196
+
set "ANTHROPIC_MODEL=claude-opus-4-6[1m]"
197
+
npx --yes --package=@anthropic-ai/claude-code@2.1.110 claude
198
+
```
199
+
127
200
## FAQ
128
201
129
202
### How do I keep using Claude Opus 4.6 after Claude Code updated to Opus 4.7?
@@ -140,11 +213,11 @@ The launcher sets the default model ID to `claude-opus-4-6[1m]`, which requests
140
213
141
214
### Will this break my normal `claude` install?
142
215
143
-
No. `claude46` does not replace your normal `claude` binary — they live at different paths, `claude` keeps updating, and `claude46` stays pinned. They do share the same `~/.claude/`auth and config, so logging in for one logs in for both.
216
+
No. `claude46` does not replace your normal `claude` binary — they live at different paths, `claude` keeps updating, and `claude46` stays pinned. They do share Claude Code's per-user auth/config directory (`~/.claude/`on macOS/Linux/WSL, `%USERPROFILE%\.claude\` on native Windows), so logging in for one logs in for both.
144
217
145
218
### How do I switch back to the latest Claude Code?
146
219
147
-
Just run `claude` as usual, or uninstall `claude46` with the two `rm`commands in the [Uninstall](#uninstall) section.
220
+
Just run `claude` as usual, or follow the commands in the [Uninstall](#uninstall) section for your platform.
if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
10
+
Write-Error'Node.js is required. Install from https://nodejs.org/ (18+).'
11
+
exit1
12
+
}
13
+
$nodeVersion= (& node --version).TrimStart('v')
14
+
$nodeMajor= [int]($nodeVersion.Split('.')[0])
15
+
if ($nodeMajor-lt18) {
16
+
Write-Error"Node.js 18+ required (found v$nodeVersion). Update from https://nodejs.org/."
17
+
exit1
18
+
}
19
+
if (-not (Get-Command npm -ErrorAction SilentlyContinue)) {
20
+
Write-Error'npm is required and was not found on PATH.'
21
+
exit1
22
+
}
23
+
if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
24
+
Write-Warning'git not found on PATH. Claude Code needs Git for Windows on native Windows. Install from https://gitforwindows.org/ (or set CLAUDE_CODE_GIT_BASH_PATH if Git is installed in a nonstandard location).'
0 commit comments