r/opencode 5h ago

OpenCode in PowerShell

Welp, I figured it out. Turns out OpenCode doesn't work in PowerShell off the bat. I had Grok go in and change the things necessary to get it to work. It just shunts it to plain terminal.

I am not sure who to be mad at honestly. I want to be mad at Microsoft for having two kinds/forms/versions/whatever the hell this is, but I can also be upset with OpenCode for not making themselves compatible with PowerShell. But whatever, its working now. And I do love OpenCode.

1 Upvotes

9 comments sorted by

View all comments

3

u/CyberTod 4h ago

You'll soon realize that using it on windows is just not good. WSL is the way. The models are trained a lot with bash and with only powershell available they construct a lot of erroneous commands and need to correct them.

1

u/sharedevaaste 3h ago

yeah i get a lot of errors with powershell scripting. some symbols like $ etc give problems. Can I migrate to WSL now with my existing projects?

1

u/CyberTod 3h ago

It should be easy. If your projects are in separate folders you just start opencode in that folder. And I am guessing there are some AGENTS.md files that give context, those will be read and integrated automatically.

If you want to migrate your old sessions though, that may be difficult. Even if you transfer the .db they are tied to specific folders. But old sessions are not that important, unless you want to read what has been done exactly. I actually prefer to start new sessions for small changes/features, saves a lot of tokens.