Widget Studio
GUIDE

GUIDES / WIDGET STUDIO

Widget Studio Guide

Widget Studio is Deskset's built-in native macOS development workbench. Manage multi-file TSX projects without Node.js or bundlers, pair with your own AI API key, inspect live SwiftUI previews across sizes, locales, and backdrops, and hot-reload straight onto your desktop.

1. Workbench Layout Overview#

The top toolbar keeps draft switching, live sync status (Live Synced / Error), four pane toggles (AI Assistant, Project File Explorer ⌘B, Console & Diagnostics, Live Preview), Export .deskpack, Save to Library (⌘S), and Install to Desktop within reach (when editing a linked or built-in widget, Save & Hot Reload and Reset Default appear automatically):

  • Left — BYOK AI Assistant: A clean header holds Auto apply and undo/clear controls. Describe edits in plain English or Chinese to stream changes across index.tsx, deskpack.json, src/*.tsx, and locales/*.json. Mention files with @ (or click @ AI in the editor breadcrumb), pick your model or API Key right from the bottom composer pill, and use one-click AI Fix directly from Console diagnostics.
  • Project File Explorer (⌘B) + Native Code Editor + Diagnostics Console: The collapsible file tree organizes index.tsx, deskpack.json, modular src/*.tsx files, locales/*.json dictionaries, and assets/ images (with drag-and-drop upload and inline preview). The editor pairs open working tabs, breadcrumbs, Quick Open (⌘P), native TypeScript/TSX/JSON highlighting, code folding, and a built-in SDK Ref drawer. Below, Console & Diagnostics streams console.log entries, syntax/runtime errors with line numbers, I18N missing-key checks, and multi-size verification hints.
  • Right — Live SwiftUI Preview & Options Debugger: A single-row header switches S / M / L (and custom sizes), Light/Dark appearance, a Preview Environment popover (for Glass/Minimal material when declared, wallpaper backdrop, and Preview Locale), and Reload. Click the bottom dimensions pill (344×164 · medium · 88%) to adjust custom Canvas W × H dimensions or presets. Below the canvas, Live Options Debugger auto-generates localized controls from deskpack.json options and _meta.options.

2. Setting Up BYOK AI#

Deskset uses a strict Bring Your Own Key (BYOK) model: requests go directly from your Mac to your chosen model provider, and API keys are stored exclusively in your macOS Keychain.

Click Configure API Key… in the left pane (or the inline API Key / model pill at the bottom of the composer) and choose a built-in preset or any OpenAI-compatible endpoint:

Provider PresetBest ForExample Models
OpenAIGeneral widget generation & complex layoutsgpt-4.1, gpt-4o
DeepSeekFast, cost-effective TSX & Chinese/English promptsdeepseek-chat, deepseek-reasoner
OpenRouterOne key across Claude, Gemini, Llama, and moreanthropic/claude-sonnet-4
GeminiLong context & visual layout reasoninggemini-2.5-pro, gemini-2.5-flash
SiliconFlowDirect access to hosted open-weight coder modelsQwen/Qwen2.5-Coder
Local Ollama100% offline private development at zero costqwen2.5-coder, llama3.3
Custom OpenAI-CompatibleAny self-hosted proxy or corporate gatewayCustom Base URL + model ID

3. Four Everyday Workflows#

3.1 New Widget Wizard & Starter Templates#

Press ⇧⌘N (or click New Widget… in the menu bar or Widget Library) to open the New Widget wizard — set a name, author, description, category, and curated starter template (Daily Counter, Countdown, Live API Card, Custom-Size Instrument), or use the top-left draft menu → New from Template…. Every starter ships with useWidget().match multi-size layouts, starter locales/ files, semantic theme colors, and live options.

3.2 Remix Built-in or Community Widgets in Place#

Inspired by classic Rainmeter customization:

  1. Right-click any built-in or community widget on your desktop (or use the ⋯ menu on its Widget Library card) and select Edit Source in Studio (or choose Open .deskpack or Folder… from Studio's menu).
  2. Studio links directly to the widget folder and loads index.tsx, deskpack.json, src/*.tsx, locales/*.json, and assets/ in the File Explorer.
  3. Change colors, translations, typography, layout, or API URLs while watching the live SwiftUI preview update on every keystroke.
  4. Click Save & Hot Reload (or Save to Library / Install to Desktop) — every live instance on your desktop hot-reloads in place while preserving existing useStorage state and user settings. Built-in widget edits can be reverted anytime via Reset Default.

3.3 Multi-Size, Custom Canvas & Locale Verification#

Use the preview pane on the right to verify every supported layout and language before sharing:

  • Switch between S, M, and L to inspect proportions. Studio automatically probes every declared size and surfaces orange/red indicator dots plus Console hints if a layout overflows or collapses two sizes to an identical tree.
  • Click the bottom dimensions pill (e.g. 344×164 · medium) to adjust custom Canvas W × H dimensions or pick Presets, testing freeform (custom) layouts and responsive useWidget().width / height breakpoints against tight aspect ratios.
  • Open the Preview Environment popover (sliders icon in the top-right preview bar) to switch Preview Locale between Follow System and any locales/*.json tag, pick wallpaper backdrops, and (for widgets declaring styles) flip between Glass and Minimal — all without changing macOS system settings.

3.4 Export & Share as .deskpack#

Click Export .deskpack in the top-right toolbar to package deskpack.json, index.tsx, modular src/*.tsx files, locales/, and assets/ into a single lightweight .deskpack archive. Anyone can double-click it to install on their Mac and remix the source code freely.

4. Keyboard Shortcuts#

ShortcutAction
⌘SSave current draft (or Save to Library) and trigger immediate compile & preview
⌘BToggle Project File Explorer
⌘PQuick Open any source, locale, or asset file in the project
⌘↵ (in AI composer)Send prompt to the AI assistant
⌘Z / ⇧⌘ZUndo / Redo inside the code editor
⌘FFind and replace in the active file