Answer: You define a GUI plugin with Plugin.define, which declares the systems the plugin runs on, its stored window state, its icons, and its copy. You must also define setup, main, or both, since a GUI without either fails to load. Status: Confirmed Entry: tool/opencode/integrations/define-gui-plugin Revision: 2 Digest: sha256:0375987b136f984a (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:48Z Last changed: 2026-11-19T13:34:47Z (full definition type: — → Plugin.Definition) Last verified: 2026-11-20T13:44:36Z Next check: 2026-11-21T13:44:36Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of definition method | Plugin.define | [1] | 2026-11-20 required setups | Define setup , main , or both. | [1] | 2026-11-20 declarations type | Plugin.Declarations | [1] | 2026-11-20 full definition type | Plugin.Definition | [1] | 2026-11-20 import source | @opencode/plugin/gui | [1] | 2026-11-20 Sources: [1] opencode. "GUI | OpenCode". https://opencode.ai/docs/build/plugins/gui/ Role: primary. Accessed: 2026-11-20T13:44:36Z Quote: "Define the GUI plugin Plugin.define declares the systems the plugin runs on, its stored window state, its icons, and its copy." (Supports: definition method) Quote: "Define setup , main , or both. A GUI without either fails to load." (Supports: required setups) Quote: "Without setups, Plugin.define returns the declarations as a Plugin.Declarations" (Supports: declarations type) Quote: "Plugin.Definition is the type of the full definition." (Supports: full definition type) Quote: "import { Plugin , Store } from "@opencode/plugin/gui"" (Supports: import source) Snapshot SHA-256: 326eaeb3ad935eb18bbcc5bbb10c7a6ba4d7a1eb6a469b5d3f4f1ca35f1407ee (captured 2026-11-19T13:34:47Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-19T13:34:47Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:36Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:36Z Last attempt: 2026-11-20T13:44:36Z Notes and limitations: Extracted automatically from a single official source (section "Define the GUI plugin"). Related: https://latestn.com/tool/opencode/integrations/define-rpc-methods-errors-events How do I define RPC methods, errors, and events in an opencode plugin? https://latestn.com/tool/opencode/integrations/define-rpc-methods-events How do I define an RPC with methods and events in an opencode Effect plugin? https://latestn.com/tool/opencode/integrations/effect-client-headers How do I add custom headers to requests with the opencode Effect client? https://latestn.com/tool/opencode/integrations/create-host How do I create an embedded opencode host in my application? https://latestn.com/tool/opencode/integrations/create-pairing-code How do I create a pairing code with the opencode API? https://latestn.com/tool/opencode/integrations/customize-effect-layers How do I customize or provide layers in the opencode Effect SDK? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:34:47Z | changed | full definition type: — → Plugin.Definition | [1] 2026-11-19T13:34:47Z | changed | declarations type: — → Plugin.Declarations | [1] 2026-11-19T13:34:47Z | changed | required setups: Define setup , main , or both. A GUI without either fails to load. → Define setup , main , or both. | [1] 2026-11-19T13:34:47Z | changed | i18n declaration: i18n → — | [1] 2026-11-19T13:34:47Z | changed | stores declaration: stores → — | [1] 2026-11-19T13:34:47Z | changed | os declaration: os → — | [1] 2026-11-13T03:55:48Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/define-gui-plugin/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/integrations/define-gui-plugin POST: https://latestn.com/dispute/tool/opencode/integrations/define-gui-plugin with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/define-gui-plugin?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I define a GUI plugin for opencode? Revision 2, last verified 2026-11-20T13:44:36Z. https://latestn.com/tool/opencode/integrations/define-gui-plugin (accessed 2026-11-21T09:50:29Z). @misc{LatestN_tool_opencode_integrations_define_gui_plugin_r2, title = {How do I define a GUI plugin for opencode?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/define-gui-plugin}}, note = {Revision 2; digest sha256:0375987b136f984a; last verified 2026-11-20T13:44:36Z; accessed 2026-11-21T09:50:29Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/integrations/define-gui-plugin