Build ultra fast, tiny, and cross-platform desktop apps with Typescript.
Build ultra fast, tiny, and cross-platform desktop apps with Typescript.
Electrobun aims to be a complete solution-in-a-box for building, updating, and shipping fast, compact, cross-platform desktop applications written in TypeScript. Hutch is the native build and workspace CLI. Cottontail is Electrobun's JSC-based default JavaScript runtime. Electrobun's platform layer combines Zig, Objective-C, and C++.
Visit https://framework.blackboard.sh/electrobun/ to see api documentation, guides, and more.
Install Hutch globally, then use it to create and build a project. Published
templates include the exact Electrobun release they were tested with. In a
hand-written project that pin is optional; without one, Hutch uses an
npm-supplied paired default or floats on the active release channel. Hutch
verifies and installs the resolved release's platform archive under
~/.hutch/releases/electrobun and copies its SDKs into the project's generated
.hutch/devkit sysroot:
curl -fsSL https://hutch.blackboard.sh/hutch/install.sh | sh
hutch electrobun initInitialization requires network access to fetch the current template catalog and selected template. Later builds can reuse exact releases and managed toolchains that are already installed.
Or bootstrap the same interactive initializer from npm or Bun. The single,
dependency-free npm package downloads the exact paired Hutch archive from that
version's Electrobun GitHub Release when needed, verifies and caches it, and
forwards the command. The initializer also ensures a compatible global launcher
for the generated project's hutch tasks. It does not carry or own the
Electrobun runtime or SDKs:
npx electrobun init
# or
bunx electrobun initHutch's built-in npm-compatible resolver installs JavaScript dependencies by
default and writes hutch.lock; hutch pm exec runs project-local package
binaries. A project's hutch.config.ts may instead select npm, Bun, pnpm, Yarn,
or a custom executable, and Hutch delegates package operations to that explicit
choice. Package management is independent of whether the app's main process
runs on Cottontail or Bun.
Don't miss our:
bundleCEF flag to bundle and pin Chromium for those that want that tradeoff of consistency over file sizebundleWGPU that lets you use Bun Typescript -> WGPU to control a native GPU surface without a webview<electrobun-webview> and <electrobun-wgpu> HTML elements that let you composite isolated webviews and native GPU surfaces into your UIsProject Goals
.env files across your projects
star history 4 weeks after v1 launch
Electrobun is one piece of a vision I'm building. I'm optimizing for focus and execution. Issues and PRs can be used to share ideas, but there should be no expectation that I will review, respond to, or merge them.
Ways to get involved:
Building apps with Electrobun is as easy as installing Hutch and running hutch electrobun init.
This section is for building Electrobun from source locally in order to contribute fixes to it.
Install Hutch globally before building Electrobun:
curl -fsSL https://hutch.blackboard.sh/hutch/install.sh | shOn Windows PowerShell:
& ([scriptblock]::Create((irm https://hutch.blackboard.sh/hutch/install.ps1)))macOS:
brew install cmake)Windows:
Linux:
On Ubuntu/Debian based distros: sudo apt install build-essential cmake pkg-config libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev libpipewire-0.3-dev librsvg2-dev
Linux applications also require the corresponding GTK 3, WebKitGTK 4.1,
Ayatana AppIndicator, and librsvg runtime packages on end-user systems. See the
cross-platform development guide
for distro-specific install commands. The launcher reports the exact missing
shared library when these dependencies are unavailable.
Wayland screen-region capture additionally requires a working desktop portal,
PipeWire, and the libpipewire-0.3.so.0 runtime library (provided by
`libpipewi
[macOS] Double-click on a drag region doesn't zoom/fill the window
Electrobun 2 drops Intel Mac builds that 1.18.1 shipped
[Windows] Installed launcher opens a separate taskbar entry for the running app
[Windows] hiddenInset windows maximize over the taskbar (missing WS_MAXIMIZEBOX)
Cottontail 0.5.0 ships without cottontail-core, breaking mainProcess cottontail builds
Older CPU Support AVX
Linux launcher drops application arguments before spawning the main process
fileAssociations cannot register an app for an existing UTI such as Markdown
macOS: webview freezes after sleep (WebContent↔Networking IPC dies); no way to recycle the web process
Windows: Ctrl-click can trigger duplicate new-window-open events during the new window's initial navigation