How to product a opencode.exe with TUI mode? #4216

Open
opened 2026-02-16 17:43:03 -05:00 by yindo · 4 comments
Owner

Originally created by @RogerYe on GitHub (Jan 5, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

In the public release, OpenCode.exe is TUI mode, and opencode-cli.exe is CLI mode,is that right? Running "bun run packages/opencode/script/build.ts" only get a opencode.exe for cli mode

Originally created by @RogerYe on GitHub (Jan 5, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question In the public release, OpenCode.exe is TUI mode, and opencode-cli.exe is CLI mode,is that right? Running "bun run packages/opencode/script/build.ts" only get a opencode.exe for cli mode
yindo added the windows label 2026-02-16 17:43:03 -05:00
Author
Owner

@rekram1-node commented on GitHub (Jan 5, 2026):

a tui mode and cli mode... not sure ik what u mean?

@rekram1-node commented on GitHub (Jan 5, 2026): a tui mode and cli mode... not sure ik what u mean?
Author
Owner

@RogerYe commented on GitHub (Jan 5, 2026):

Hi OpenCode team and community,

I'm trying to build the full desktop application from the source code, but I'm encountering some confusion about the different interfaces.

When I download the official release installer, it installs two executables:

OpenCode.exe (approx. 45MB): This runs a modern desktop GUI with multiple panels (project list, sessions, etc.), which I believe is the "desktop" or "TUI" version mentioned in your documentation.
opencode-cli.exe (approx. 145MB): This runs a terminal-based interface (black background, central input box), which appears to be the CLI/Terminal UI.
However, when I clone the official repository and follow the build instructions, I only get a single executable named opencode.exe. Running this produces the terminal-based interface (similar to opencode-cli.exe), not the multi-panel desktop GUI (OpenCode.exe).

The documentation mentions both a "Native TUI" and running in the "terminal," but doesn't clearly differentiate between the two distinct UIs I'm seeing in the pre-built binaries. The "TUI" mentioned seems to refer to the terminal UI, not the graphical desktop app.

My primary goal is to compile the source code to generate the multi-panel desktop GUI application (like the official OpenCode.exe).

Is there a specific build target, flag, or branch required to generate this desktop version? Or is the desktop GUI built separately and not available from the main source repository?

I've attached screenshots for reference:

CLI.png: Shows the terminal interface generated by my compiled opencode.exe.
TUI.png: Shows the desired multi-panel desktop GUI from the official OpenCode.exe.
Any guidance on how to achieve this would be greatly appreciated!

Thanks!

Image Image
@RogerYe commented on GitHub (Jan 5, 2026): Hi OpenCode team and community, I'm trying to build the full desktop application from the source code, but I'm encountering some confusion about the different interfaces. When I download the official release installer, it installs two executables: OpenCode.exe (approx. 45MB): This runs a modern desktop GUI with multiple panels (project list, sessions, etc.), which I believe is the "desktop" or "TUI" version mentioned in your documentation. opencode-cli.exe (approx. 145MB): This runs a terminal-based interface (black background, central input box), which appears to be the CLI/Terminal UI. However, when I clone the official repository and follow the build instructions, I only get a single executable named opencode.exe. Running this produces the terminal-based interface (similar to opencode-cli.exe), not the multi-panel desktop GUI (OpenCode.exe). The documentation mentions both a "Native TUI" and running in the "terminal," but doesn't clearly differentiate between the two distinct UIs I'm seeing in the pre-built binaries. The "TUI" mentioned seems to refer to the terminal UI, not the graphical desktop app. My primary goal is to compile the source code to generate the multi-panel desktop GUI application (like the official OpenCode.exe). Is there a specific build target, flag, or branch required to generate this desktop version? Or is the desktop GUI built separately and not available from the main source repository? I've attached screenshots for reference: CLI.png: Shows the terminal interface generated by my compiled opencode.exe. TUI.png: Shows the desired multi-panel desktop GUI from the official OpenCode.exe. Any guidance on how to achieve this would be greatly appreciated! Thanks! <img width="678" height="451" alt="Image" src="https://github.com/user-attachments/assets/46edcbb9-9636-4f0d-ab23-6442adfa33ac" /> <img width="1289" height="614" alt="Image" src="https://github.com/user-attachments/assets/4993e311-a8a2-434d-a86d-f6bf122ac5e4" />
Author
Owner

@Inovvia commented on GitHub (Jan 5, 2026):

Maybe this will help you

https://github.com/anomalyco/opencode/blob/dev/packages/desktop/package.json

Run builds in opencode/packages/desktop

There might be tauri specific things that you need

https://v2.tauri.app/start/prerequisites/

Let me know if this helps

@Inovvia commented on GitHub (Jan 5, 2026): Maybe this will help you https://github.com/anomalyco/opencode/blob/dev/packages/desktop/package.json Run builds in ```opencode/packages/desktop``` There might be tauri specific things that you need https://v2.tauri.app/start/prerequisites/ Let me know if this helps
Author
Owner

@RogerYe commented on GitHub (Jan 5, 2026):

@Inovvia
With your guidance and the help of OpenCode, I successfully generated the desktop version of OpenCode.exe. However, it is only 21MB, which is quite a bit smaller than the official 45MB version. Will this be a problem?

Thank you very much!

@RogerYe commented on GitHub (Jan 5, 2026): @Inovvia With your guidance and the help of OpenCode, I successfully generated the desktop version of `OpenCode.exe`. However, it is only 21MB, which is quite a bit smaller than the official 45MB version. Will this be a problem? Thank you very much!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4216