Installation
The SDK is the only package required for your application code. Zero runtime dependencies, ~1.5KB gzipped.
npm install @rep-protocol/sdkFramework adapters (optional)
Section titled “Framework adapters (optional)”If you’re using React, Vue, or Svelte, install the corresponding adapter for hot-reload-aware hooks and stores:
npm install @rep-protocol/react @rep-protocol/sdknpm install @rep-protocol/vue @rep-protocol/sdknpm install @rep-protocol/svelte @rep-protocol/sdkThe CLI provides rep validate, rep typegen, rep lint, and rep dev commands. It automatically downloads the correct gateway binary for your platform during installation.
npm install -g @rep-protocol/cliOr use without installing:
npx @rep-protocol/cli validatenpx @rep-protocol/cli dev --proxy http://localhost:5173Gateway binary
Section titled “Gateway binary”The gateway is a standalone Go binary (~3MB). There are several ways to get it:
Via the CLI (recommended)
Section titled “Via the CLI (recommended)”The @rep-protocol/cli package downloads the gateway binary automatically during npm install.
Docker image
Section titled “Docker image”docker pull ghcr.io/ruachtech/rep/gateway:latestOr use in a multi-stage build:
COPY --from=ghcr.io/ruachtech/rep/gateway:latest /usr/local/bin/rep-gateway /usr/local/bin/rep-gatewayDirect download
Section titled “Direct download”Download from GitHub Releases for your platform:
# Linux amd64curl -fsSL https://github.com/RuachTech/rep/releases/download/gateway/v0.1.2/rep-gateway_0.1.2_linux_amd64.tar.gz | tar -xzmv rep-gateway /usr/local/bin/
# macOS arm64curl -fsSL https://github.com/RuachTech/rep/releases/download/gateway/v0.1.2/rep-gateway_0.1.2_darwin_arm64.tar.gz | tar -xzmv rep-gateway /usr/local/bin/Build from source
Section titled “Build from source”Requires Go >= 1.24.5:
cd gatewaymake build# Binary at gateway/bin/rep-gatewayDevelopment prerequisites
Section titled “Development prerequisites”For contributing to REP itself:
| Tool | Version | Purpose |
|---|---|---|
| Node.js | >= 20.0.0 | TypeScript packages |
| pnpm | >= 9.0.0 | Workspace management |
| Go | >= 1.24.5 | Gateway development |
git clone https://github.com/ruachtech/rep.gitcd reppnpm installpnpm run build