electron-wrapper
Installation
SKILL.md
Electron Wrapper for Bun Web Apps
This skill guides wrapping an existing Bun web server into a native desktop app using Electron. It's based on a proven implementation that solved every major integration challenge.
Architecture
"Electron as chrome, Bun as server" — Two runtimes working together:
- Electron/Node.js handles window management, native menus, auto-updates, and IPC
- Bun runs the actual web server with all your application logic
The Electron main process spawns a bundled Bun binary that runs your server, then loads http://localhost:{port} in a BrowserWindow. Your web app doesn't know or care that it's inside Electron — it's just a web page with an optional window.electronAPI bridge for native features.
This architecture means:
- Zero changes to your server code (it's still a standard Bun HTTP server)
- The web app works identically in a browser or in Electron
- Electron handles only what browsers can't: window chrome, system tray, auto-updates, file system access
- Two separate
node_modules— Electron uses npm, your web app uses Bun