NEXUS OS Documentation

Everything you need to build with NEXUS OS — from quickstart to production deployment.

Introduction to NEXUS OS

NEXUS OS is a multi-layer AI operating system for enterprise software teams. It provides a complete stack for planning, building, validating, and shipping production code using AI agents — with built-in cost control, quality gates, and constitutional safety.

Prerequisites

  • Node.js 20+ or Python 3.11+
  • A NEXUS OS account (free tier available)
  • Git 2.40+

1. Install the CLI

bash
# Install the NEXUS CLI
npm install -g @nexus-os/cli

# Or with pip
pip install nexus-os

# Authenticate
nexus login

# Create your first project
nexus init my-project
cd my-project

2. Configure your project

NEXUS OS uses a nexus.yaml file in your project root to configure agents, budget, and quality thresholds.

yaml
# nexus.yaml
project:
  name: my-project
  description: "My first NEXUS OS project"

agents:
  default_tier: sonnet          # haiku | sonnet | opus
  quality_threshold: 0.75       # MergeGate pass threshold

budget:
  monthly_tokens: 1_000_000
  hard_limit: true              # Block when budget exhausted
  apex_compression: true        # Enable 40-70% compression

forge:
  auto_merge: false             # Require human approval
  autofix_attempts: 3           # Retry count on failures

3. Dispatch your first task

typescript
import { NexusClient } from "@nexus-os/sdk";

const nexus = new NexusClient({
  apiKey: process.env.NEXUS_API_KEY,
  projectId: "proj_abc123",
});

// Dispatch a task to the optimal agent
const task = await nexus.forge.dispatch({
  description: "Add rate limiting to the /api/auth/login endpoint",
  domain: "backend",
  priority: "high",
  budget: { maxTokens: 50_000 },
});

// Wait for completion
const result = await nexus.forge.waitForCompletion(task.id);
console.log(`Quality score: ${result.qualityScore}/100`);
console.log(`Cost: $${result.cost.toFixed(4)}`);
console.log(`MergeGate: ${result.mergeGateStatus}`);

4. Integrate with CI/CD

yaml
# Listen for NEXUS events in your CI pipeline
# .github/workflows/nexus.yml

name: NEXUS Forge
on:
  push:
    branches: [main]

jobs:
  forge:
    runs-on: ubuntu-latest
    steps:
      - uses: nexus-os/forge-action@v2
        with:
          api-key: ${{ secrets.NEXUS_API_KEY }}
          quality-threshold: 0.80
          auto-merge: false

What's next?