Configuration
Configure your Riven AI environment, project settings, and cluster connection.
Configuration File
Every Riven project uses a riven.config.ts file at the project root. This file defines your service metadata, build settings, and deployment targets.
import { defineConfig } from "@riven/cli";
export default defineConfig({
name: "my-service",
version: "1.0.0",
// Build configuration
build: {
runtime: "node",
entry: "src/index.ts",
dockerfile: "./Dockerfile",
},
// Deployment targets
deploy: {
cluster: "production",
namespace: "default",
replicas: 2,
resources: {
cpu: "500m",
memory: "512Mi",
},
},
// Service ports
ports: [
{ name: "http", port: 3000 },
{ name: "grpc", port: 50051 },
],
});The defineConfig helper provides full TypeScript autocompletion and validation for all configuration options.
Environment Variables
The following environment variables are used by the Riven CLI and SDKs:
| Variable | Description | Required |
|---|---|---|
RIVEN_API_KEY | Your platform API key for authentication | Yes |
RIVEN_CLUSTER_URL | URL of your Riven cluster endpoint | Yes |
RIVEN_ORG_ID | Organization ID for multi-tenant setups | No |
RIVEN_TOKEN | Auth token for CI/CD (see Authentication) | No |
RIVEN_LOG_LEVEL | Log verbosity: debug, info, warn, error | No |
Set these in your shell profile or in a .env file at the project root. The CLI automatically loads .env files.
RIVEN_API_KEY=rk_live_xxxxxxxxxxxxxxxxxxxx
RIVEN_CLUSTER_URL=https://cluster.riven-ai.dev
RIVEN_LOG_LEVEL=infoNever commit your .env file to version control. The default .gitignore generated by riven init already excludes it.
Cluster Connection
Connect the CLI to your Kubernetes cluster by configuring your kubeconfig. Riven uses standard Kubernetes authentication and works with any kubeconfig setup.
# Set your kubeconfig path
export KUBECONFIG=~/.kube/config
# For AWS EKS clusters
aws eks update-kubeconfig --name my-cluster --region us-east-1
# Verify connectivity
riven cluster statusThe riven cluster status command verifies that your CLI can reach the cluster and displays the current context, namespace, and node count.
IDE Integration
IDE extensions are coming soon. The planned features include:
- Auto-completion for
riven.config.tsand SDK methods. - Inline deployment status indicators in the sidebar.
- Live log streaming from running services.
- One-click deploy and rollback from the command palette.
VS Code and JetBrains IDE extensions are in development. Follow the changelog for updates.