Installation
Install the Tenzro SDK in your project. Choose the package that fits your use case.
Main SDK
The core Tenzro SDK for Node.js and server-side applications:
npm install tenzro# orpnpm add tenzro# oryarn add tenzro
React SDK
React hooks and components for building AI-powered UIs:
npm install @tenzro/react# orpnpm add @tenzro/react
Edge SDK
Browser-safe SDK with client ID authentication:
npm install @tenzro/edge# orpnpm add @tenzro/edge
Network SDK
Blockchain and P2P networking primitives:
npm install @tenzro/network# orpnpm add @tenzro/network
CLI
Command-line tools for development and deployment:
npm install -g @tenzro/cli# ornpx @tenzro/cli
create-tenzro-app
Scaffold a new Tenzro project:
npx create-tenzro-app my-appcd my-appnpm run dev
Requirements
| Package | Node.js | TypeScript |
|---|---|---|
| tenzro | >= 18.0 | >= 5.0 |
| @tenzro/react | >= 18.0 | >= 5.0 |
| @tenzro/edge | Browser or >= 18.0 | >= 5.0 |
| @tenzro/network | Browser or >= 18.0 | >= 5.0 |
| @tenzro/cli | >= 18.0 | >= 5.0 |
Environment Setup
Create a .env file in your project root:
# RequiredTENZRO_API_KEY=your_api_key_here# OptionalTENZRO_PROJECT_ID=your_project_idTENZRO_API_URL=https://api.cloud.tenzro.com
TypeScript Configuration
Recommended tsconfig.json settings:
{"compilerOptions": {"target": "ES2022","module": "ESNext","moduleResolution": "bundler","strict": true,"esModuleInterop": true,"skipLibCheck": true,"resolveJsonModule": true}}
Framework Integration
Next.js
npx create-tenzro-app my-app --template next-app
Vite
npm create vite@latest my-app -- --template react-tscd my-appnpm install tenzro @tenzro/react
Express
npm init -ynpm install express tenzro
Verify Installation
import { Tenzro } from 'tenzro';const tenzro = new Tenzro();// Test connectionconst health = await tenzro.health();console.log('Connected:', health.status);