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, andlocales/*.json. Mention files with@(or click@ AIin 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 organizesindex.tsx,deskpack.json, modularsrc/*.tsxfiles,locales/*.jsondictionaries, andassets/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 streamsconsole.logentries, syntax/runtime errors with line numbers,I18Nmissing-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 customCanvas W × Hdimensions or presets. Below the canvas, Live Options Debugger auto-generates localized controls fromdeskpack.jsonoptionsand_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 Preset | Best For | Example Models |
|---|---|---|
| OpenAI | General widget generation & complex layouts | gpt-4.1, gpt-4o |
| DeepSeek | Fast, cost-effective TSX & Chinese/English prompts | deepseek-chat, deepseek-reasoner |
| OpenRouter | One key across Claude, Gemini, Llama, and more | anthropic/claude-sonnet-4 |
| Gemini | Long context & visual layout reasoning | gemini-2.5-pro, gemini-2.5-flash |
| SiliconFlow | Direct access to hosted open-weight coder models | Qwen/Qwen2.5-Coder |
| Local Ollama | 100% offline private development at zero cost | qwen2.5-coder, llama3.3 |
| Custom OpenAI-Compatible | Any self-hosted proxy or corporate gateway | Custom 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:
- 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.deskpackor Folder… from Studio's menu). - Studio links directly to the widget folder and loads
index.tsx,deskpack.json,src/*.tsx,locales/*.json, andassets/in the File Explorer. - Change colors, translations, typography, layout, or API URLs while watching the live SwiftUI preview update on every keystroke.
- Click Save & Hot Reload (or Save to Library / Install to Desktop) — every live instance on your desktop hot-reloads in place while preserving existing
useStoragestate 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, andLto 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 customCanvas W × Hdimensions or pick Presets, testing freeform (custom) layouts and responsiveuseWidget().width / heightbreakpoints 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/*.jsontag, pick wallpaper backdrops, and (for widgets declaringstyles) 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#
| Shortcut | Action |
|---|---|
⌘S | Save current draft (or Save to Library) and trigger immediate compile & preview |
⌘B | Toggle Project File Explorer |
⌘P | Quick Open any source, locale, or asset file in the project |
⌘↵ (in AI composer) | Send prompt to the AI assistant |
⌘Z / ⇧⌘Z | Undo / Redo inside the code editor |
⌘F | Find and replace in the active file |