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.

riven.config.ts
ts
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:

VariableDescriptionRequired
RIVEN_API_KEYYour platform API key for authenticationYes
RIVEN_CLUSTER_URLURL of your Riven cluster endpointYes
RIVEN_ORG_IDOrganization ID for multi-tenant setupsNo
RIVEN_TOKENAuth token for CI/CD (see Authentication)No
RIVEN_LOG_LEVELLog verbosity: debug, info, warn, errorNo

Set these in your shell profile or in a .env file at the project root. The CLI automatically loads .env files.

.env
bash
RIVEN_API_KEY=rk_live_xxxxxxxxxxxxxxxxxxxx
RIVEN_CLUSTER_URL=https://cluster.riven-ai.dev
RIVEN_LOG_LEVEL=info

Never 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.

Terminal
bash
# 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 status

The 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.ts and 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.