Skip to content

Installation

The SDK is the only package required for your application code. Zero runtime dependencies, ~1.5KB gzipped.

Terminal window
npm install @rep-protocol/sdk

If you’re using React, Vue, or Svelte, install the corresponding adapter for hot-reload-aware hooks and stores:

Terminal window
npm install @rep-protocol/react @rep-protocol/sdk

The CLI provides rep validate, rep typegen, rep lint, and rep dev commands. It automatically downloads the correct gateway binary for your platform during installation.

Terminal window
npm install -g @rep-protocol/cli

Or use without installing:

Terminal window
npx @rep-protocol/cli validate
npx @rep-protocol/cli dev --proxy http://localhost:5173

The gateway is a standalone Go binary (~3MB). There are several ways to get it:

The @rep-protocol/cli package downloads the gateway binary automatically during npm install.

Terminal window
docker pull ghcr.io/ruachtech/rep/gateway:latest

Or use in a multi-stage build:

COPY --from=ghcr.io/ruachtech/rep/gateway:latest /usr/local/bin/rep-gateway /usr/local/bin/rep-gateway

Download from GitHub Releases for your platform:

Terminal window
# Linux amd64
curl -fsSL https://github.com/RuachTech/rep/releases/download/gateway/v0.1.2/rep-gateway_0.1.2_linux_amd64.tar.gz | tar -xz
mv rep-gateway /usr/local/bin/
# macOS arm64
curl -fsSL https://github.com/RuachTech/rep/releases/download/gateway/v0.1.2/rep-gateway_0.1.2_darwin_arm64.tar.gz | tar -xz
mv rep-gateway /usr/local/bin/

Requires Go >= 1.24.5:

Terminal window
cd gateway
make build
# Binary at gateway/bin/rep-gateway

For contributing to REP itself:

ToolVersionPurpose
Node.js>= 20.0.0TypeScript packages
pnpm>= 9.0.0Workspace management
Go>= 1.24.5Gateway development
Terminal window
git clone https://github.com/ruachtech/rep.git
cd rep
pnpm install
pnpm run build