opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Windows Support

Open thdxr opened this issue 1 year ago • 11 comments

thdxr avatar Jun 16 '25 15:06 thdxr

Seems to just be a few issues with the weird paths that windows has.

packages/opencode/src/app/app.ts:49 Here you try to write to a file with a : in it's name, which is not supported in windows (the colon is there because of the drive letter). packages/opencode/src/external/ripgrep.ts:112 This isn't finding rg.exe, probably another path issue, since windows uses \ as a path separator. packages/opencode/src/index.ts:72 For some reason this path starts with a /, which is wrong on windows, since it has drive letters at the start (e.g. C:/rest/of/path). packages/opencode/src/util/log.ts:22 This is another : in name issue.

These can probably be fixed pretty easily.

Mulej avatar Jun 16 '25 16:06 Mulej

yep some minor issues going to go through at the end of this week and fix

thdxr avatar Jun 16 '25 17:06 thdxr

when i installed it with bun it says "/bin/sh" not found, but that only exists on linux, i think

notlousybook avatar Jun 17 '25 11:06 notlousybook

how can i install it for windows

kshabanaa avatar Jun 17 '25 15:06 kshabanaa

Happy to help windows development or testing, I use both windows/mac 50/50 daily. Would love to get this running as Claude code isn't cross platform so this looks like a much better alternative!

One note on path separators, / is fine on Windows, has been for many years, the : and paths starting with / will be the main issues.

Southclaws avatar Jun 22 '25 09:06 Southclaws

I think having windows native support really good for people want to sync project without using wsl2

QDaed avatar Jun 23 '25 22:06 QDaed

i tried to install using npm i -g opencode-ai@latest but it showed the output below:

14:52:50 [@justin] [/Documents]
$ npm i -g opencode-ai@latest
npm error code 1
npm error path C:\Users\user\AppData\Roaming\npm\node_modules\opencode-ai
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node ./postinstall.mjs
npm error Failed to create opencode binary symlink: Could not find package opencode-win32-x64: Cannot find module 'opencode-win32-x64/package.json'
npm error Require stack:
npm error - C:\Users\user\AppData\Roaming\npm\node_modules\opencode-ai\postinstall.mjs
npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2025-06-24T12_52_59_495Z-debug-0.log

here is the log file:

2025-06-24T12_52_59_495Z-debug-0.log

justindotdevv avatar Jun 24 '25 12:06 justindotdevv

Same here, I am testing on Windows Arm (Microsoft DevKit). :)

BleedingDev avatar Jun 24 '25 16:06 BleedingDev

I've started testing out on Windows - grabbed the binary from releases. When using / command to search for files, get an instant crash after the /file_search request

Bun v1.2.17 (282dda62) Windows x64 (baseline)         ┃                                                                              ┃
Windows v.win11_dt                                     enter send                                    GitHub Copilot Claude Sonnet 3.7 
CPU: sse42 avx avx2
Args: "C:\dev\Tooling\bin\opencode.exe"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(3) http_server jsc shell(2) spawn standalone_executable transpiler_cache
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:readline" "node:stream" "node:url" "node:util" "node:http2"
Elapsed: 2227ms | User: 218ms | Sys: 109ms
RSS: 0.25GB | Peak: 0.25GB | Commit: 0.54GB | Faults: 62842

panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF

I'm guessing Ripgrep related

I also experience #404

imackle-rcs avatar Jun 27 '25 03:06 imackle-rcs

Just tried v0.1.150 from releases.

I was able to run it with bash. No inputs are recognized when using Command Prompt and Powershell. However newlines doesn't seem to work, and the last word or from the AI seems to be split into a new message every time. And scrolling is weird I can't explain it so here's a video.

https://github.com/user-attachments/assets/f93d6ecb-438b-4aa6-b51f-c841c83989e0

damywise avatar Jun 27 '25 04:06 damywise

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

rekram1-node avatar Dec 28 '25 01:12 rekram1-node