Installation
This guide covers installing the S2 CLI and SDKs for various platforms and languages.S2 CLI
The S2 CLI provides command-line access to S2 and includes S2 Lite embedded as thes2 lite subcommand.
The CLI is distributed as
s2-cli in package managers but the binary is named s2.Homebrew (macOS/Linux)
The recommended way to install on macOS and Linux:Cargo (Rust)
Install using Cargo if you have Rust installed:--locked flag ensures you get the exact dependency versions tested with the release.
Installation script (macOS/Linux)
Download and install the latest release binary:Docker
Pull the S2 Docker image which includes both the CLI and S2 Lite:Kubernetes (Helm)
Deploy S2 Lite to Kubernetes using Helm:Verify installation
Check that the CLI is installed correctly:SDKs
S2 provides official SDKs for multiple languages.Rust SDK
Add the S2 SDK to yourCargo.toml:
TypeScript SDK
Install via npm:Go SDK
Install the Go SDK:Python SDK
Install via pip:Java SDK
Documentation:Configuration
After installation, configure the CLI and SDKs with your credentials.Using S2 cloud
For the managed S2 service:1
Get access token
Generate an access token from the S2 dashboard
2
Set environment variable
Export your access token:
3
Test connection
Verify the configuration:
Using S2 Lite
For local development with S2 Lite:S2 Lite doesn’t require authentication for local use, but you still need to set
S2_ACCESS_TOKEN to any non-empty value.Configuration file
You can also create a configuration file at~/.config/s2/config.toml:
Building from source
To build the CLI from source:Next steps
Quick start
Create your first basin and stream
Concepts
Learn about basins, streams, and records
CLI reference
Explore all CLI commands
API reference
Browse the REST API documentation
Getting help
If you run into issues:- Check the GitHub issues
- Join the Discord community
- Email support at hi@s2.dev