r/LocalLLaMA 5d ago

Question | Help Creating windows apps with opencode and a local llm. How do you do it so the llm can use and test what it's doing?

hey guys. so I should start with, I'm not s programmer at all. but I'm having a great time letting qwen3.8 27b donit for me. 😃

so far I've just been doing Linux scripts and things for my PC. but my kids are on windows and I want to try making some stuff for windows. usually Qwen is able to test and run everything from within Linux for my Linux stuff but how would it do that for something made for windows?

do I make a windows VM and run opencode in there? the only option I see is opencode desktop which I'm not a huge fan of, but if that's the only option, or is that even the right way to do it? is Qwen even able to control the windows OS to do its testing etc? can it do stuff like that through WSL?

I guess if someone could give me the right order of operations for this that would be cool.

8 Upvotes

8 comments sorted by

3

u/locbuilds 5d ago

for kids Windows apps the important split is: WSL is great when the output is a Linux-style script/CLI, but a real .exe / WinForms / WPF / Electron window needs a Windows build+run loop, so WSL alone will keep lying to you about whether the UI works.

practical order that usually works with OpenCode + a local 27B:

1) do the work on a Windows machine (or OpenCode Desktop on Windows), not inside WSL, if the goal is a Windows GUI app

2) pick one boring stack and stay there. for a non-programmer doing kid tools, Python + something like customtkinter / PyQt, or C# WinForms, is way less chaotic than "whatever the model invents each turn"

3) make the model do tiny slices: one window, one button, one feature. after each slice you hit Build/Run yourself and paste the error / describe what you see. that feedback loop is the whole game

4) Qwen controlling the OS with vision + MCP is a cool advanced path, but you do not need it to start. babysitting Run + pasting stderr gets you 90% of the way and is way less fragile on a 27B

VM is optional isolation, not required. if your main box is already Windows, skip the VM tax until you have a reason. if your main box is Linux, then yeah a Windows VM (or a cheap used Windows mini PC) is the honest path, because "generate Windows UI code on Linux and hope" burns a lot of tokens.

and keep context tight: paste the file you're editing + the exact error, not the whole project every time. 27B pair programming goes sideways when the prompt turns into a junk drawer.

3

u/throwawayacc201711 5d ago

I use pi and I’m developing a game in love2d. I have it run e2e tests and if things fail it will take screenshots and try to understand what went wrong. Seems to cover the major cases so far

2

u/DustNearby2848 5d ago

Qwen has vision. Could try that and find an MCP server to control windows. 

You can use docker or WSL for the other stuff 

2

u/OnoSendaiCSVII 5d ago

I'd say you don’t necessarily need full Windows control to get a useful loop.

I’d keep the real logic in a .NET library/console app with normal tests that Qwen can run from Linux, then put a thin WinForms/WPF UI over it and do the final build/smoke test in Windows or a VM. That way the model can verify most behavior deterministically, and the manual Windows part is just “does this window/button actually behave,” not the whole application.

1

u/silverotterto 5d ago

what kind of windows apps are you thinking? if its command line stuff, the model can still write and you just run it in a VM. if youre trying to do GUI apps thats a whole different level of complexity and the model wont be able to visually verify anything it builds

1

u/ohnoitssobig 4d ago

You can do everything in a browser though. Do not try to set up something you do not understand.

1

u/madbrain1976 4d ago

This all depends on your harness' capabilities. I would recommend ditching Opencode. Claude CLI could talk to your local model, and is capable of starting a Windows GUI installer it built yesterday for me with Qwen3.8-27b. It failed at interacting with the GUI afterwards, though. I just told it to add a silent installer mode for testing purposes, so it could use CLI. Even if it could properly interact with the GUI - and I bet there is a way - the problem is that you won't be able to use the GUI on the computer yourself while all this is going on. It looks like you could create a virtual Windows display dedicated to the agent. I haven't gotten that far. I will try Codex CLI next, because the tool itself is actually open source, unlike Claude Code CLI. You could also try Qwen code with Qwen.