Getting Started with Causl

Causl is a state-management engine for the tangled middle of an application — the part where one input feeds three derivations, one of those derivations is read by a fetch handler, the fetch handler writes back two more inputs, and any of them can change in the same user gesture. It is built around a single idea: every mutation is a transaction, and every read is a pure function of the graph at one point in time. Glitch-freedom is not a scheduling trick — it is a theorem about the public API surface.

If you have used Redux, Jotai, MobX, or a spreadsheet engine, a lot of causl will feel familiar. The differences show up at the boundaries: transactions are the only mutation entry point; derivations are recomputed in topological order in one pass per commit; subscribers fire exactly once per commit that actually changed their projection; and the engine ships a static checker and a bounded model checker that catch the race conditions the type system cannot express. The five pages in this section walk you from "what is this" to "your first running app" in the order most readers want them.

If you are impatient, skip to the 5-Minute Quick Start — it installs the engine, writes a graph in fifteen lines, and runs it. If you are evaluating, start with Why Causl, which is honest about where causl is the wrong tool. If you are building something real, work through the pages top to bottom; they introduce one concept at a time, and each one builds on the previous.

The whole section assumes TypeScript, Node 20+, and a recent package manager (npm 10+, pnpm 9+, or yarn 4+). The engine itself has zero runtime dependencies; the React bindings depend only on react. Every code example on every page is typechecked against the current published API surface and lifted from the same fixture set the integration tests run, so copy-paste should compile.

A note on the eight commitments. Throughout the documentation you will see references to causl's "eight commitments" — atomic transactions, transactions-as-only-mutation, glitch-free reads, explicit observability, bounded retention, typed dispatch, exported IR, and reproducible builds. Each one shows up as a concrete API constraint, and the home page spells them out in plain English.

In this section

Where to go next

Once you have walked through this section, the Tutorial picks up with a complete application from scratch, and the Usage Guide covers patterns you will reach for in production: structured commit intents, statechart composition with @causl/sync, persistence adapters, devtools, and the static checker. The API reference is generated from the source and is the right page to keep open in another tab while you work.