Electrobun Init
Installation
SKILL.md
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 |
|---|---|
hello-world |
Starting from scratch, learning Electrobun |
bunny |
Demo/mascot, visual showcase |
UI Framework Integration
| Template | Use when |
|---|---|
svelte |
You use Svelte |
vue |
You use Vue |
solid |
You use SolidJS |
angular |
You use Angular |
react-tailwind-vite |
React + Tailwind, Vite bundler |
tailwind-vanilla |
No framework, just Tailwind |
vanilla-vite |
No framework, Vite bundler |
App Patterns
| Template | Use when |
|---|---|
multi-window |
App needs multiple independent windows |
tray-app |
Menu bar / system tray app, no main window |
notes-app |
CRUD app with local storage |
sqlite-crud |
App with a local SQLite database |
photo-booth |
Camera/media capture |
Browser / Multi-tab
| Template | Use when |
|---|---|
multitab-browser |
Multi-tab browser shell with navigation |
3D / Graphics
| Template | Use when |
|---|---|
wgpu-threejs |
3D scene with Three.js on native WebGPU |
wgpu |
Native GPU rendering with Dawn/WebGPU |
wgpu-mlp |
WebGPU neural net inference |
wgpu-babylon |
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,app.versioninelectrobun.config.ts - Run
bun startto verify the template runs - For GPU templates: confirm
bundleWGPU: trueis set per platform - For CEF templates: confirm
bundleCEF: trueis set per platform - Commit the scaffold before making changes
Common Issues
- "Template not found" → Run
electrobun initwith no args to see the interactive picker with valid names bun installfails → Ensure Bun ≥ 1.0. Runbun --version- App launches but blank window → Check that the view name in
electrobun.config.tsviewsmatches the directory name insrc/