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
{{ message }}
Repository navigation
[FEATURE]: Windows desktop ships the CLI but there is no way to run it #55772
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
On Windows the desktop app already contains the full CLI binary, but there is no way to run it.
The build copies the CLI binary into the app as opencode-cli.exe, and at startup it stages it to %APPDATA%\ai.opencode.desktop\cli\<version>\opencode-cli.exe. It is only ever started as a server. The file is not named opencode, it is not on PATH, and nothing in the UI starts it in TUI mode.
macOS has an install action that puts it at ~/.opencode/bin/opencode, but that code returns for other platforms: "CLI installation requires macOS".
Could Windows get the same thing? The app already has an "open PowerShell in the project directory" action, which looks like a natural place to run the CLI from. Otherwise the only way to get a TUI on Windows is the zip, since package managers are not supported there.
Thanks for the detailed request! You're asking for the Windows desktop app to give you a way to run the CLI it already bundles: either an install action like the one on macOS that puts an opencode command on PATH, or a way to start the TUI from the existing "open PowerShell in the project directory" action.
You're right that the install action only supports macOS for now: packages/desktop/src/main/service/desktop-cli.ts stops on every other platform. Maintainers will consider this.
The bundled CLI is already staged on Windows: DesktopCli.resolve copies resources/opencode-cli.exe to <userData>/cli/<version>-<arch>/opencode-cli.exe and returns it as cli.binary. So the smallest fix that gives Windows a TUI without touching PATH:
packages/app/src/shell/commands/desktop-menu.ts: the app.installCli item lives in the app menu, which is platforms: ["macos"], and menu.ts returns early on non-darwin — so on Windows there is no entry point at all. Add the item to file or help with platforms: ["windows"].
packages/desktop/src/main/service/desktop-cli.ts: the process.platform !== "darwin" guard sits in front of the whole install, but only the PATH installer is macOS-only. A Windows branch can just open the project directory and spawn the resolved cli.binary via wt.exe, falling back to powershell.exe.
That avoids editing PATH, stale versioned shortcuts, and collisions with an existing npm/zip opencode on PATH.
If you'd rather have the real install-to-PATH behaviour, it's a copy to %USERPROFILE%\.opencode\bin\opencode.exe plus an idempotent HKCU\Environment PATH edit that preserves REG_EXPAND_SZ (so not setx), which needs more care, and it should probably be skippable for WSL users (#53952).
Happy to do this work if a maintainer approves the direction — I've read the code paths above but haven't built the desktop app yet.
Activity
opencode-agent commentedon Oct 15, 2026
Thanks for the detailed request! You're asking for the Windows desktop app to give you a way to run the CLI it already bundles: either an install action like the one on macOS that puts an
opencodecommand on PATH, or a way to start the TUI from the existing "open PowerShell in the project directory" action.You're right that the install action only supports macOS for now:
packages/desktop/src/main/service/desktop-cli.tsstops on every other platform. Maintainers will consider this.Related issues:
cli/<version>binaries are never removedopencode-cliservice on Windowssogeisetsu commentedon Oct 26, 2026
The bundled CLI is already staged on Windows:
DesktopCli.resolvecopiesresources/opencode-cli.exeto<userData>/cli/<version>-<arch>/opencode-cli.exeand returns it ascli.binary. So the smallest fix that gives Windows a TUI without touching PATH:packages/app/src/shell/commands/desktop-menu.ts: theapp.installCliitem lives in theappmenu, which isplatforms: ["macos"], andmenu.tsreturns early on non-darwin — so on Windows there is no entry point at all. Add the item tofileorhelpwithplatforms: ["windows"].packages/desktop/src/main/service/desktop-cli.ts: theprocess.platform !== "darwin"guard sits in front of the wholeinstall, but only the PATH installer is macOS-only. A Windows branch can just open the project directory and spawn the resolvedcli.binaryviawt.exe, falling back topowershell.exe.That avoids editing PATH, stale versioned shortcuts, and collisions with an existing npm/zip
opencodeon PATH.If you'd rather have the real install-to-PATH behaviour, it's a copy to
%USERPROFILE%\.opencode\bin\opencode.exeplus an idempotentHKCU\EnvironmentPATH edit that preservesREG_EXPAND_SZ(so notsetx), which needs more care, and it should probably be skippable for WSL users (#53952).Happy to do this work if a maintainer approves the direction — I've read the code paths above but haven't built the desktop app yet.