Installation
Web SDK (React)
Section titled “Web SDK (React)”Install
Section titled “Install”@revturbine/sdk is published to the public npm registry — no auth, token, or registry configuration required.
npm install @revturbine/sdkpnpm add @revturbine/sdkyarn add @revturbine/sdkPeer Dependencies
Section titled “Peer Dependencies”The web SDK requires:
| Package | Version |
|---|---|
| react | >=18.0.0 |
| react-dom | >=18.0.0 |
TypeScript
Section titled “TypeScript”The SDK ships with full TypeScript declarations. No additional @types/ packages are needed.
Recommended tsconfig.json settings:
{ "compilerOptions": { "strict": true, "moduleResolution": "bundler", "esModuleInterop": true, "jsx": "react-jsx" }}Headless / Non-React
Section titled “Headless / Non-React”The same @revturbine/sdk package includes a headless entry point for use without React:
import { initRevTurbine } from '@revturbine/sdk/headless';This import tree-shakes React dependencies. See the Headless API guide for usage patterns with vanilla JS, Vue, Svelte, and Angular.
Server-Side
Section titled “Server-Side”Server SDKs are available for backend entitlement checks and placement resolution:
| Language | Package |
|---|---|
| Node.js | @revturbine/sdk (headless entry) |
| Python | revturbine (PyPI) |
The @revturbine/cli package manages your RevTurbine configuration (plans, entitlements, placements) and change sets from the terminal — verify, diff, upload, and deploy an ExportedConfig.
npm install -g @revturbine/clirevturbine --helpOr run it without installing:
npx @revturbine/cli verify ./exported_config.jsonSee the CLI reference for the full command surface (verify, diff, upload, deploy, export, status, and the change-set lifecycle).
Environment Variables
Section titled “Environment Variables”Set these in your environment (.env, CI secrets, etc.) — never commit them to source:
| Variable | Description | Required |
|---|---|---|
| REVTURBINE_TENANT_ID | Your tenant identifier | Yes |
| REVTURBINE_API_KEY | API key (prefixed rt_live_ or rt_test_) | Yes |
| REVTURBINE_ENDPOINT | API endpoint URL | Yes (defaults to https://api.revturbine.io) |
REVTURBINE_TENANT_ID=tenant_abcREVTURBINE_API_KEY=rt_live_your_key_hereREVTURBINE_ENDPOINT=https://api.revturbine.ioSupported Runtimes
Section titled “Supported Runtimes”| Runtime | Minimum Version | |---|---| | Node.js | 20+ | | Modern browsers | Chrome 90+, Firefox 90+, Safari 15+, Edge 90+ | | React | 18.0+ | | TypeScript | 5.0+ |
Next Steps
Section titled “Next Steps”- Quickstart — render your first placement
- Runtime modes — choose server, custom endpoints, or local-only