Guide · Open source
How to use Electrobun: install, build and ship a desktop app
Updated · written with AI from the project's own documentation and checked against our catalogue data
Electrobun is an open-source framework for building cross-platform desktop applications where the app logic is written in TypeScript. It covers building, updating and shipping a desktop app in one workflow, using Bun as the default JavaScript runtime. This guide shows you how to install it, create a project from a template, and understand what the framework provides.
Quick start
- 1Install Hutch. Run the curl command for macOS or Linux, or the PowerShell command for Windows. Restart your terminal if hutch is not found.
- 2Open the template picker. Run hutch electrobun init and choose a template.
- 3Or start with Bun. If you use Bun or npm, run bunx electrobun init or npx electrobun init instead.
- 4Run the app. Follow the Quick Start guide on the official Electrobun site to run your new project.
- 5Build and update. Use the framework's workflow to build your app; updates use binary patches with a full download as fallback.
Install Hutch on macOS, Linux or Windows
Electrobun's native CLI is called Hutch. On macOS or Linux, install it with the curl command shown below. On Windows, run the PowerShell command instead.
If the hutch command isn't found after installing, restart your terminal first.
curl -fsSL https://hutch.blackboard.sh/hutch/install.sh | shCreate a project from a template
Run the command below to open the template picker. Choose a template, then follow the Quick Start guide on the official site to run your app.
Published templates include the Electrobun version they were tested with, and Hutch manages the SDKs and toolchains needed to build them.
hutch electrobun initStart without installing Hutch
If you already use Bun or npm, you can start with either command instead of installing Hutch first.
- Bun: bunx electrobun init
- npm: npx electrobun init
bunx electrobun initUnderstand how Electrobun manages dependencies
Hutch includes a built-in npm-compatible resolver that installs JavaScript dependencies by default and writes a hutch.lock file. The hutch pm exec command runs project-local package binaries.
A project's hutch.config.ts can instead select npm, Bun, pnpm, Yarn, or a custom executable, and Hutch delegates package operations to that choice. Package management is independent of whether the main process runs on Cottontail or Bun.
- hutch.lock: written by the default resolver
- hutch.config.ts: selects the package manager
Know the key features before you build
Electrobun uses self-extracting bundles that use Zstandard compression for compact distributables. Updates use a Zig-optimized BSDIFF implementation that can produce kilobyte-scale patches, and fall back to a compressed full download when needed.
The framework also offers an optional bundleCEF flag to bundle and pin Chromium, which trades file size for consistency, and bundleWGPU for controlling a native GPU surface from Bun TypeScript without a webview.
- Typed RPC between the main process and webviews
- <electrobun-webview> and <electrobun-wgpu> HTML elements for compositing views
- Three.js and Babylon.js adapters that run in the Bun main process
- Cottontail is an experimental JSC-based alternative runtime
Plan for the trade-offs
Electrobun is a young framework. The README does not document a long production track record, so check its guides and examples against your needs before committing a large project.
Bundling Chromium with bundleCEF makes apps larger. The default approach with the system webview keeps bundles small.
What people use it for
- A TypeScript developer building a desktop note-taking or productivity app without learning a new UI language
- A team wanting one workflow to build, update and distribute a desktop app
- Building a desktop GUI for a local tool, such as a markdown editor or file manager
- Experimenting with a Bun-powered main process that renders to a native GPU surface with bundleWGPU
- Creating small desktop apps where download size and small update patches matter
Frequently asked questions
Is Electrobun free and open source?
Yes. Electrobun is released under the MIT licence, as listed on its repository.
What do I need to install Electrobun?
The README lists Bun, npm, or the Hutch install script as the ways to start. Use the curl command on macOS or Linux, the PowerShell command on Windows, or bunx and npx if you already use Bun or npm.
How do I install Electrobun on Windows?
Open PowerShell and run the install.ps1 command shown in the guide. Then restart your terminal if hutch is not found, and run hutch electrobun init.
What languages can I write Electrobun apps in?
Electrobun app logic is written in TypeScript. The project description also mentions Zig, Rust, Go, and Odin, and its platform layer combines Zig, Objective-C, and C++.
How is Electrobun different from Electron or Tauri?
Electrobun is commonly compared with Electron, Tauri, Wails and Neutralinojs. Its README emphasises small bundles, binary-patch updates, and Bun as the main-process runtime. Compare them on the features you need and their production track record, which the README does not document for Electrobun.
Can Electrobun make small updates?
Yes. Updates use binary patches built with a Zig-optimized BSDIFF implementation, falling back to a compressed full download when a patch isn't suitable.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Electrobun suits developers who already write TypeScript and want a desktop app with building, updating and distribution in one workflow, plus small bundles and patches. Pick a more established framework like Electron or Tauri if you need a long production history, or if you only want to run existing apps rather than build one.
Install options & downloads