anomalyco / anomalyco/opencode
[FEATURE] Desktop: "screenshot / mockup → working code" workflow with built-in live preview (like CUE / code-to-UI)
Open
@Brendonovich is already working on this.
Since Aug 9, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Feature request
GitHub/Codex CLI have agentic PR review loops; Claude Code desktop has visual diff; Trae has entire "screenshot to UI code". OpenCode currently does not have a first-class "image/screenshot → working UI code" workflow in the desktop app.
What I'd like
In the Desktop app, a flow like Trae's "CUE" / Gemini CLI's "Design to Code":
- User drags a screenshot (or picks a clip) into the chat → the image is attached (already works via drag & drop).
- A dedicated workflow (e.g.
/screenshot-codeor a "convert to UI" button) tells the model:- generate a complete single-file HTML/CSS/JS (or based on project's framework: React/Vue) implementing that mock,
- plus a running preview (live). Desktop currently has no way to preview a rendered result.
Why
- Many users use opencode desktop to build UIs; "截图转页面" is the single most requested productivity flow in async (Chinese) forums, and is the biggest Trae/Claude difference for UI tasks.
- There's currently no built-in preview: we can only open an external browser and commit changes.
Related
- #906 (paste to attach image) — that's the input side, works. This request is about the workflow side: next step generated code + live preview inside the desktop app.
Scope suggestion
- MVP: detect image attachments → ask model to generate a single self-contained
index.htmlprototype → open in embedded webview (desktop has webui already) with hot-reload on file save. - Later: framework-aware generation (next/src/app) and diff apply.
This is a quick win: the tools exist (model can read images; desktop has webview), only the UX workflow is missing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.