Install pinned Claude Code launchers to keep using an older Opus model after Claude Code moves to a newer default. Your regular claude command continues to auto-update normally.
| Launcher | Pins to | Claude Code | Model ID | Install dir (macOS/Linux) |
|---|---|---|---|---|
claude47 |
Opus 4.7 | 2.1.153 |
claude-opus-4-7[1m] |
~/.local/share/claude47 |
claude46 |
Opus 4.6 | 2.1.110 |
claude-opus-4-6[1m] |
~/.local/share/claude46 |
This project is not affiliated with Anthropic. Claude and Claude Code are Anthropic products/trademarks. This repository only provides helper scripts for installing and launching Claude Code.
Published by Sparkling Neuronics · GitHub
install-claude47.sh installs a pinned Claude Code launcher named claude47.
It is intended for users who want to keep running Claude Opus 4.7 after Opus 4.8 became the default, while leaving the regular claude command free to auto-update.
On macOS/Linux, the script installs:
- Claude Code
2.1.153 - Launcher command:
claude47 - Default model:
claude-opus-4-7[1m] - Binary path:
~/.local/share/claude47/claude-2.1.153 - Launcher path:
~/.local/bin/claude47
(Native Windows install layout is described in the Windows section.)
The launcher sets DISABLE_AUTOUPDATER=1 and DISABLE_UPDATES=1, so claude47 stays pinned (background auto-updates blocked, and an explicit claude47 update is a no-op). Your normal claude command is not modified.
Run the installer directly from GitHub:
curl -fsSL https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/main/install-claude47.sh | bashIf you prefer to inspect the script before running it:
curl -fsSL https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/main/install-claude47.sh -o install-claude47.sh
less install-claude47.sh
bash install-claude47.shFrom this repository:
chmod +x install-claude47.sh
./install-claude47.shIf ~/.local/bin was not already on your PATH, open a new terminal after installation or run:
export PATH="$HOME/.local/bin:$PATH"The installer appends that export PATH=... line to ~/.zshrc only. If your shell is bash (common on Linux), add the same line to ~/.bashrc or ~/.bash_profile yourself.
install-claude46.sh installs a pinned Claude Code launcher named claude46.
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.
On macOS/Linux, the script installs:
- Claude Code
2.1.110 - Launcher command:
claude46 - Default model:
claude-opus-4-6[1m] - Binary path:
~/.local/share/claude46/claude-2.1.110 - Launcher path:
~/.local/bin/claude46
(Native Windows install layout is described in the Windows section.)
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.
Run the stable installer directly from GitHub:
curl -fsSL https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/v0.1.0/install-claude46.sh | bashIf you prefer to inspect the script before running it:
curl -fsSL https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/v0.1.0/install-claude46.sh -o install-claude46.sh
less install-claude46.sh
bash install-claude46.shTo run the latest version from main instead:
curl -fsSL https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/main/install-claude46.sh | bashFrom this repository:
chmod +x install-claude46.sh
./install-claude46.shIf ~/.local/bin was not already on your PATH, open a new terminal after installation or run:
export PATH="$HOME/.local/bin:$PATH"The installer appends that export PATH=... line to ~/.zshrc only. If your shell is bash (common on Linux), add the same line to ~/.bashrc or ~/.bash_profile yourself.
Start a pinned launcher:
claude47
claude46Check the installed version:
claude47 --version
claude46 --versionYour regular Claude Code installation remains available separately:
claudeEach launcher defaults to its pinned model (claude-opus-4-7[1m] for claude47, claude-opus-4-6[1m] for claude46). Whether your account actually gets the 1M context window depends on your Anthropic plan/tier.
For a single run, pass a different model:
claude47 --model sonnet
claude46 --model claude-opus-4-6CLI arguments take precedence over the default model set by the wrapper.
Run the relevant installer again:
./install-claude47.sh
./install-claude46.shThis replaces the pinned binary and launcher at the same paths.
Remove the pinned binary and launcher for whichever version you want to uninstall.
macOS / Linux / WSL:
# claude47
rm -f "$HOME/.local/bin/claude47"
rm -rf "$HOME/.local/share/claude47"
# claude46
rm -f "$HOME/.local/bin/claude46"
rm -rf "$HOME/.local/share/claude46"Optionally remove this line from ~/.zshrc if you no longer need it:
export PATH="$HOME/.local/bin:$PATH"Native Windows:
# claude47
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\claude47"
# claude46
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\claude46"Optionally remove the corresponding %LOCALAPPDATA%\claude4X\bin entry from your user PATH via System Properties > Environment Variables.
- macOS or Linux (including WSL)
curlbash~/.local/binon yourPATH
For native Windows, see Windows below.
The bash installers do not run on native Windows. Use one of these paths:
Open a WSL shell and follow the bash install steps above. The bash script identifies WSL as Linux, and the launcher will be available from your WSL terminals.
The PowerShell installers pin @anthropic-ai/claude-code via npm into an isolated prefix, write a .cmd wrapper that sets DISABLE_AUTOUPDATER=1, DISABLE_UPDATES=1, and the appropriate ANTHROPIC_MODEL, and add the bin directory to your user PATH. No admin rights needed. Your global claude (if any) is untouched.
| Launcher | Script | Install prefix | npm package version |
|---|---|---|---|
claude47 |
install-claude47.ps1 |
%LOCALAPPDATA%\claude47\ |
@anthropic-ai/claude-code@2.1.153 |
claude46 |
install-claude46.ps1 |
%LOCALAPPDATA%\claude46\ |
@anthropic-ai/claude-code@2.1.110 |
Prerequisites:
- Node.js 18+ and npm
- Git for Windows (Claude Code requires Git Bash on native Windows; set
CLAUDE_CODE_GIT_BASH_PATHif Git is installed in a nonstandard location)
Quick install from PowerShell:
# claude47
irm https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/main/install-claude47.ps1 | iex
# claude46
irm https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/v0.2.0/install-claude46.ps1 | iexOr from cmd.exe:
REM claude47
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/main/install-claude47.ps1 | iex"
REM claude46
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/sparklingneuronics/claude-code-helpers/v0.2.0/install-claude46.ps1 | iex"To run the latest from main instead, replace the tag with main in the URL.
Local install from a cloned repo:
install-claude47.cmd
install-claude46.cmdOpen a new terminal after install, then run the launcher.
For a one-off pinned session without installing anything globally:
PowerShell:
# Opus 4.7
$env:DISABLE_AUTOUPDATER="1"
$env:DISABLE_UPDATES="1"
$env:ANTHROPIC_MODEL="claude-opus-4-7[1m]"
npx --yes --package=@anthropic-ai/claude-code@2.1.153 claude
# Opus 4.6
$env:DISABLE_AUTOUPDATER="1"
$env:DISABLE_UPDATES="1"
$env:ANTHROPIC_MODEL="claude-opus-4-6[1m]"
npx --yes --package=@anthropic-ai/claude-code@2.1.110 claudecmd.exe:
REM Opus 4.7
set "DISABLE_AUTOUPDATER=1"
set "DISABLE_UPDATES=1"
set "ANTHROPIC_MODEL=claude-opus-4-7[1m]"
npx --yes --package=@anthropic-ai/claude-code@2.1.153 claude
REM Opus 4.6
set "DISABLE_AUTOUPDATER=1"
set "DISABLE_UPDATES=1"
set "ANTHROPIC_MODEL=claude-opus-4-6[1m]"
npx --yes --package=@anthropic-ai/claude-code@2.1.110 claudeInstall the claude47 launcher from this repo and run claude47 instead of claude. It installs Claude Code 2.1.153 and defaults the model to claude-opus-4-7[1m].
Install the claude46 launcher and run claude46. It installs Claude Code 2.1.110 and defaults the model to claude-opus-4-6[1m].
Both launchers set their model ID with the [1m] suffix, which requests the 1M context variant. Whether your account actually gets the 1M window depends on your Anthropic plan/tier.
No. The pinned launchers do not replace your normal claude binary -- they live at different paths. claude keeps updating, and the pinned launchers stay frozen. 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 all.
Just run claude as usual, or follow the commands in the Uninstall section for your platform.
Yes. They use separate install directories and separate launcher names, so they coexist without conflict.
This repository is shared as a small personal helper. Issues and pull requests may not be reviewed, and no maintenance, compatibility, or support commitment is implied.
This repository is licensed under the MIT License. The license applies only to the scripts and documentation in this repository. It does not apply to Claude Code or any Anthropic software downloaded by the helper script.
