electric-sql/electric-circuits — explained in plain English
Analysis updated 2026-07-25
Build a live dashboard that updates instantly when database rows change.
Create infinite scrolling lists with live updates as new data arrives.
Sync live query results to a local collection for offline-aware apps.
Feed continuously updating query results to an automated agent.
| electric-sql/electric-circuits | bcallender/agent-context-workshop | celestia-island/ratatui-markdown | |
|---|---|---|---|
| Stars | 16 | 16 | 16 |
| Language | Rust | Rust | Rust |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 4/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a Postgres database and familiarity with the Electric protocol, though a local demo boots its own temporary database.
Electric Circuits is a tool that makes database queries "live," meaning their results update automatically whenever the underlying data changes. You write normal database queries, the kind your application already uses for joins, filtering, and subqueries. Instead of your app constantly polling or refetching data, every query result becomes a live stream. You can bind it to a user interface component, sync it to a local collection, or feed it to an automated agent. Your application writes data to Postgres using ordinary SQL, and a separate engine keeps every query result in sync as changes happen. A live query works by sending you the current matching rows first, then a continuous feed of updates. The feed sends one of three messages: a row was added or changed, a row was removed, or nothing, meaning a change elsewhere did not affect this particular query. Only the matching rows and columns travel across the network, so the local copy on the client is always exactly the query result. There is never a stale cache to clear or refresh. The engine is built in Rust on top of a library called DBSP, which handles incremental computation. When a row changes, the engine processes only the difference, not the entire dataset. It represents changes as signed values, where an insert is a positive one and a delete is a negative one. This means keeping a result up to date never requires running the full query again. The cost depends on the size of the change, not the size of the table. The engine keeps no copy of any table, and memory scales with the number of query types your app runs, not with the amount of data stored. The system connects to Postgres, which remains the source of truth. Changes flow from Postgres through a log into the engine, which maintains shared data pipelines called circuits. The engine provides two ways for clients to connect: the standard Electric protocol, and an extended client that adds ordered pages for infinite scrolling and live aggregations like counts and sums. You can try it locally with a demo that boots its own temporary database and a visual pipeline explorer. The full README is longer than what was shown.
Electric Circuits makes database queries live so results update automatically when data changes. You write normal SQL queries against Postgres and get a continuous stream of updates instead of polling.
Mainly Rust. The stack also includes Rust, Postgres, DBSP.
The license is not specified in the available documentation, so check the repository for details.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.