What is Flowbun?
Flowbun is a flow-based home automation runtime: a small flow-based programming-style engine where blocks are pure(-ish) async TypeScript functions, wiring is plain JSON on disk, effects live strictly at the boundary, and the visual editor is optional sugar over the same plaintext files a human or an IDE can edit directly.
Why it exists
Section titled “Why it exists”Node-RED gets a lot right: flows are mostly pure(-ish) data transformations wired together, and its Home Assistant integration is good. But it has real problems:
- Effects and pure functions aren’t segregated.
- The palette is full of programming primitives (“switch”, “change”) that are better expressed as code.
- Flows live in an opaque JSON blob that fights version control and IDEs.
- Reusing logic across flows is awkward.
Digital Alchemy proves the alternative — typed TypeScript against your actual Home Assistant instance — is a genuinely nice experience, but it has no visual layer.
Flowbun is the synthesis:
- Blocks are just TypeScript. Named, typed inputs and outputs on a plain async function. If you need a switch statement, you write a switch statement.
- Wires are type-checked before anything runs. Every flow compiles through a generated assertion file with real
tsc. A wire carrying the wrong shape fails the reload, and the old flow keeps running. - Effects live at the boundary. Only
@hass/*blocks can touch Home Assistant, and each flow runs in its own process. - Plaintext is the source of truth. Wiring is diffable JSON; blocks are ordinary
.tsfiles; every write from any tool is auto-committed to a dedicated git history.
Status
Section titled “Status”Flowbun is a working proof-of-concept, running real automations against a real Home Assistant instance — including a live grid-zero battery export controller and a sun-tracking blind controller. See the GitHub repository for the full architecture writeup and phase-by-phase history.
