Skip to content

[FEATURE]: Windows desktop ships the CLI but there is no way to run it #55772

Open

Description

@sogeisetsu

Feature hasn't been suggested before.

  • 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.

Related, but not duplicates: #43605, #53617, #50633, #53952.

Activity

  1. opencode-agent commented on Oct 15, 2026

    @opencode-agent
    Contributor

    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.

    Related issues:

  2. sogeisetsu commented on Oct 26, 2026

    @sogeisetsu
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions