This repo contains the official TypeScript SDK for S2, a serverless data store for streams, built on the service's REST API.
S2 is a managed service that provides unlimited, durable streams.
Streams can be appended to, with all new records added to the tail of the stream. You can read from any portion of a stream – indexing by record sequence number, or timestamp – and follow updates live.
See it in action on the playground.
Quick links:
- Runnable examples directory
- Patterns package
- SDK documentation
- S2 REST API documentation
Note: The repository for releases prior to 0.16.x can be found at this link.
Install
npm add @s2-dev/streamstore
# or
yarn add @s2-dev/streamstore
# or
bun add @s2-dev/streamstoreQuick start
Want to get up and running? Head to the S2 dashboard to sign-up and grab an access key, and create a new "basin" from the UI.
Then define the following environment variables respectively:
export S2_ACCESS_TOKEN="<token>"
export S2_BASIN="<basin>"





