API Reference
Start with @super-line/core — the contract is the single source of truth; everything else implements or consumes it. Packages marked (guide) are documented as hands-on guides rather than extracted API pages.
Cheatsheets
Hand-written quick lookups alongside the generated API:
- Contract entry shapes — the five flavors, field by field
- Wire frames — every
ton the wire - Error codes — the built-in
SuperLineErrorset - Server & client options — the common configuration
Core
@super-line/core—defineContract, wire types,SuperLineError, transport & collection interfaces@super-line/server—createSuperLineServer— implements the contract, owns rooms/topics/auth, cluster bus, collection co-writers@super-line/client—createSuperLineClient— calls the contract with full inference, reconnection, collections@super-line/react—createSuperLineHooks— typed hooks over the client (requests, events,useCollection/useDoc)
Transports — the client ↔ server wire
@super-line/transport-websocket— WebSocket wire, the default (guide)@super-line/transport-http— HTTP wire — SSE stream or long-poll (guide)@super-line/transport-libp2p— libp2p wire — WebRTC, NAT traversal, bring-your-own node (guide)@super-line/transport-loopback— in-memory wire for tests (guide)
Collections — typed, contract-declared persisted state
@super-line/collections-memory— typed LWW rows — in-memory · relay (guide)@super-line/collections-sqlite— typed LWW rows — durable (better-sqlite3) · relay (guide)@super-line/collections-pglite— typed LWW rows — self-clustering (Postgres + Electric) (guide)@super-line/collections-crdt-memory— CRDT documents — in-memory + the universal client engine (guide)@super-line/collections-crdt-libsql— CRDT documents — durable (libSQL/Turso) · relay (guide)@super-line/collections-crdt-pglite— CRDT documents — self-clustering (Postgres op-log + Electric) (guide)@super-line/tanstack-db— TanStack DB sync adapter — client joins + optimistic mutations (guide)
Adapters — server ↔ server fan-out
@super-line/adapter-redis— Redis pub/sub backbone@super-line/adapter-libp2p— broker-less gossipsub backbone@super-line/adapter-zeromq— ZeroMQ backbone@super-line/adapter-rabbitmq— RabbitMQ backbone
Plugins — contract fragments mounted on the server
@super-line/plugin-queue—queue()— durable jobs, retries, leases, cluster-wide cron@super-line/plugin-auth— first-party authentication — sessions, roles, API keys, JWT (guide)@super-line/plugin-chat— chat/messaging — channels, streaming messages, resources (guide)@super-line/plugin-inspector— inspector channel behind the Control Center (guide)
Tooling
@super-line/control-center— debug webapp — topology, live traffic, presence (npx @super-line/control-center) (guide)