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
Thanks for the report, @jorgeEF. I think this is a duplicate of #51755. Its remaining open part is a way to install (and upgrade) OpenCode v2 from native PowerShell without WSL or Git Bash, for example a PowerShell installer.
The curl ... | bash installer is a bash script. In PowerShell, bash usually points to the WSL launcher (C:\Windows\system32\bash.exe), which is why it asks you to install WSL. These options don't need WSL or npm:
Standalone binary: download the zip for your machine (x64, ARM64, or x64 baseline for older CPUs). Extract opencode.exe to a folder of your choice, e.g. %USERPROFILE%\.opencode\bin, and add that folder to your PATH.
Git Bash: if you have Git for Windows, run the same curl -fsSL https://opencode.ai/v2/install | bash command from Git Bash instead of PowerShell. The installer supports Windows when it runs there.
Desktop app: there is also a Windows installer for OpenCode Desktop (x64, ARM64).
Possible duplicates and related issues, ordered from most to least likely:
* **Standalone binary:** download the zip for your machine ([x64](https://opencode.ai/update/api/latest/cli/opencode/opencode-windows-x64.zip), [ARM64](https://opencode.ai/update/api/latest/cli/opencode/opencode-windows-arm64.zip), or [x64 baseline](https://opencode.ai/update/api/latest/cli/opencode/opencode-windows-x64-baseline.zip) for older CPUs). Extract `opencode.exe` to a folder of your choice, e.g. `%USERPROFILE%\.opencode\bin`, and add that folder to your `PATH`.
Manually downloading the binary and setting the environment variable works but the command opencode update doesn't work wich turn this "install" method useless because every update has to be made manually.
Thanks for trying it and reporting back, @jorgeEF. You're right: with only the zip, updating from native PowerShell isn't supported today. That gap is what #51755 tracks, which is why I think this is a duplicate of it.
Here is how opencode upgrade (update is an alias) works on Windows right now:
It only treats a binary as the installer-managed copy when it is at %USERPROFILE%\.opencode\bin\opencode.exe. Anywhere else it stops with "Could not detect the installation method. Pass --method to choose how to upgrade OpenCode."
For that copy, it downloads the same bash installer and runs it with Git Bash (from Git for Windows, not WSL). It finds Git Bash through git on your PATH, or you can point it there with the OPENCODE_GIT_BASH_PATH environment variable. If there is no Git Bash, it stops with "Git Bash is required to update OpenCode".
If you're OK with having Git for Windows installed (it doesn't need WSL), you can keep using the zip build and still upgrade in place:
Put opencode.exe in %USERPROFILE%\.opencode\bin\ and keep that folder on your PATH.
Run opencode upgrade from PowerShell. If it still can't detect the method, run opencode upgrade --method curl.
Updating without Git Bash (for example a native PowerShell installer or a working WinGet package) isn't available yet:
Unless you think your case is different from #51755, this issue will still be closed as a duplicate. If the upgrade fails even with Git Bash installed and the binary in %USERPROFILE%\.opencode\bin, please reply with the exact error message.
I'm closing this as a duplicate of #51755, which tracks installing and upgrading OpenCode v2 from native PowerShell without WSL or Git Bash. That's the gap you hit: the zip build runs fine, but opencode upgrade can't update it without Git Bash. Please follow #51755 and add your 👍 there. #56297 tracks the WinGet package, which isn't published yet.
I waited a day in case your problem turned out to be different, for example if the upgrade still failed with Git Bash installed and the binary in %USERPROFILE%\.opencode\bin. If that happens, or if you think this isn't covered by #51755, reply here with the exact error and this issue will be reopened.
Activity
opencodejr commentedon Nov 11, 2026
Thanks for the report, @jorgeEF. I think this is a duplicate of #51755. Its remaining open part is a way to install (and upgrade) OpenCode v2 from native PowerShell without WSL or Git Bash, for example a PowerShell installer.
The
curl ... | bashinstaller is a bash script. In PowerShell,bashusually points to the WSL launcher (C:\Windows\system32\bash.exe), which is why it asks you to install WSL. These options don't need WSL or npm:opencode.exeto a folder of your choice, e.g.%USERPROFILE%\.opencode\bin, and add that folder to yourPATH.curl -fsSL https://opencode.ai/v2/install | bashcommand from Git Bash instead of PowerShell. The installer supports Windows when it runs there.Possible duplicates and related issues, ordered from most to least likely:
Anomaly.OpenCode) not available yet.SST.opencodeon WinGet is still v1opencode upgradeused the WSLbashstub on Windows (fixed in v2)The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
jorgeEF commentedon Nov 11, 2026
Manually downloading the binary and setting the environment variable works but the command opencode update doesn't work wich turn this "install" method useless because every update has to be made manually.
opencodejr commentedon Nov 11, 2026
Thanks for trying it and reporting back, @jorgeEF. You're right: with only the zip, updating from native PowerShell isn't supported today. That gap is what #51755 tracks, which is why I think this is a duplicate of it.
Here is how
opencode upgrade(updateis an alias) works on Windows right now:%USERPROFILE%\.opencode\bin\opencode.exe. Anywhere else it stops with "Could not detect the installation method. Pass --method to choose how to upgrade OpenCode."giton yourPATH, or you can point it there with theOPENCODE_GIT_BASH_PATHenvironment variable. If there is no Git Bash, it stops with "Git Bash is required to update OpenCode".If you're OK with having Git for Windows installed (it doesn't need WSL), you can keep using the zip build and still upgrade in place:
opencode.exein%USERPROFILE%\.opencode\bin\and keep that folder on yourPATH.opencode upgradefrom PowerShell. If it still can't detect the method, runopencode upgrade --method curl.Updating without Git Bash (for example a native PowerShell installer or a working WinGet package) isn't available yet:
Anomaly.OpenCodeisn't published yetUnless you think your case is different from #51755, this issue will still be closed as a duplicate. If the upgrade fails even with Git Bash installed and the binary in
%USERPROFILE%\.opencode\bin, please reply with the exact error message.opencodejr commentedon Nov 12, 2026
I'm closing this as a duplicate of #51755, which tracks installing and upgrading OpenCode v2 from native PowerShell without WSL or Git Bash. That's the gap you hit: the zip build runs fine, but
opencode upgradecan't update it without Git Bash. Please follow #51755 and add your 👍 there. #56297 tracks the WinGet package, which isn't published yet.I waited a day in case your problem turned out to be different, for example if the upgrade still failed with Git Bash installed and the binary in
%USERPROFILE%\.opencode\bin. If that happens, or if you think this isn't covered by #51755, reply here with the exact error and this issue will be reopened.