Milady Electrobun Init
Use when scaffolding a new Electrobun project, choosing a template, or understanding what each template provides. Activates on electrobun init, new project setup, or template questions.
install
source · Clone the upstream repo
git clone https://github.com/milady-ai/milady
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/milady-ai/milady "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/plugins/electrobun-dev/skills/electrobun-init" ~/.claude/skills/milady-ai-milady-electrobun-init && rm -rf "$T"
manifest:
.claude/plugins/electrobun-dev/skills/electrobun-init/SKILL.mdsource content
Electrobun Init
Scaffolds a new Electrobun desktop app from a built-in template.
Commands
electrobun init # interactive template picker electrobun init <project-name> # pick template interactively, name set electrobun init <template-name> # template name = project name electrobun init <project-name> --template=<name> # explicit name + template
After init:
cd <project-name> bun install bun start # runs: electrobun dev
Template Reference
Choose based on what your app primarily does:
Minimal / Learning
| Template | Use when |
|---|---|
| Starting from scratch, learning Electrobun |
| Demo/mascot, visual showcase |
UI Framework Integration
| Template | Use when |
|---|---|
| You use Svelte |
| You use Vue |
| You use SolidJS |
| You use Angular |
| React + Tailwind, Vite bundler |
| No framework, just Tailwind |
| No framework, Vite bundler |
App Patterns
| Template | Use when |
|---|---|
| App needs multiple independent windows |
| Menu bar / system tray app, no main window |
| CRUD app with local storage |
| App with a local SQLite database |
| Camera/media capture |
Browser / Multi-tab
| Template | Use when |
|---|---|
| Multi-tab browser shell with navigation |
3D / Graphics
| Template | Use when |
|---|---|
| 3D scene with Three.js on native WebGPU |
| Native GPU rendering with Dawn/WebGPU |
| WebGPU neural net inference |
| BabylonJS on WebGPU |
What Gets Generated
Every template produces at minimum:
<project-name>/ ├── package.json # scripts: start, dev, build, build:canary ├── electrobun.config.ts # app identity + build config ├── tsconfig.json ├── bun.lock └── src/ ├── bun/ │ └── index.ts # main process entry └── <viewname>/ # one or more renderer dirs ├── index.html ├── index.ts └── index.css
GPU templates (
wgpu, wgpu-mlp, wgpu-babylon, wgpu-threejs) skip the renderer dirs and use GpuWindow directly.
Post-Init Checklist
cd <project-name> && bun install- Update
,app.name
,app.identifier
inapp.versionelectrobun.config.ts - Run
to verify the template runsbun start - For GPU templates: confirm
is set per platformbundleWGPU: true - For CEF templates: confirm
is set per platformbundleCEF: true - Commit the scaffold before making changes
Common Issues
- "Template not found" → Run
with no args to see the interactive picker with valid nameselectrobun init
fails → Ensure Bun ≥ 1.0. Runbun installbun --version- App launches but blank window → Check that the view name in
electrobun.config.ts
matches the directory name inviewssrc/