Quick Start Guide

Get your first application deployed in under 5 minutes with OpsAgent.

Terminal
# Install OpsAgent CLI
npm install -g @opsagent/cli

# Navigate to your project
cd my-project

# Initialize OpsAgent (AI analyzes your code)
ops init

# Deploy to production
ops deploy

That's it! OpsAgent automatically detects your language, framework, dependencies, and configures everything for optimal deployment.

Installation

Prerequisites

  • Node.js 18+ or npm 8+
  • A supported cloud account (AWS, GCP, or Azure)
  • OpsAgent account (free tier available)

Install via npm

npm install -g @opsagent/cli

Verify Installation

ops --version

Login to OpsAgent

ops login

Configuration

When you run ops init, OpsAgent's AI analyzes your codebase and generates an opsagent.ymlconfiguration file.

AI-Detected Configuration

opsagent.yml
version: "1"
app:
  name: my-saas-app
  language: Node.js
  framework: Next.js

build:
  base_image: node:20-alpine
  port: 3000
  health_check: /api/health
  multi_stage: true

environments:
  production:
    replicas: 2
    resources:
      cpu: 500m
      memory: 1Gi
    scaling:
      enabled: true
      min: 1
      max: 10
      target_cpu: 70

services:
  postgresql:
    version: "15"
    backup:
      enabled: true
      frequency: daily
  redis:
    version: "7"

monitoring:
  metrics: true
  logging: true
  alerts:
    - cpu_usage > 80%
    - memory_usage > 85%
    - error_rate > 1%
    - latency_p99 > 500ms

security:
  ssl: auto
  secrets: encrypted
  scanning: true

What Gets Detected

FeatureDetection Method
Languagepackage.json, requirements.txt, go.mod
FrameworkDependency analysis (Next.js, Express, Django, etc.)
ServicesDatabase drivers, cache clients, API integrations
ResourcesDependency count, framework requirements

Deploying Your Application

Basic Deploy

ops deploy

Deploy to Specific Environment

ops deploy --env staging
ops deploy --env production

Dry Run (Preview Changes)

ops deploy --dry-run

Deployment Strategies

# Rolling deployment (default)
ops deploy --strategy rolling

# Blue-green deployment
ops deploy --strategy blue-green

# Canary deployment (10% traffic first)
ops deploy --strategy canary --canary-percent 10
💡 Pro Tip: Use --dry-run to preview what OpsAgent will deploy before making changes.

Monitoring & Observability

OpsAgent automatically configures monitoring for every deployment:

Default Alert Rules

  • CPU Usage > 80% - Triggers scale-up or alert
  • Memory Usage > 85% - Potential memory leak warning
  • Error Rate > 1% - Application health issue
  • P99 Latency > 500ms - Performance degradation

View Logs

ops logs
ops logs --follow
ops logs --since 1h

View Metrics

ops metrics

Security

Automatic Security Features

  • SSL/TLS: Automatic certificate provisioning
  • Secrets: Encrypted storage, never in plain text
  • Scanning: Vulnerability detection in dependencies
  • Compliance: SOC2, HIPAA-ready configurations

Managing Secrets

# Set a secret
ops secrets set DATABASE_URL "postgresql://..."

# List secrets (values hidden)
ops secrets list

# Remove a secret
ops secrets delete API_KEY

API Reference

OpsAgent provides a REST API for programmatic access to all features.

Authentication

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.opsagent.dev/v1/projects

Endpoints

MethodEndpointDescription
GET/v1/projectsList all projects
POST/v1/projectsCreate new project
POST/v1/projects/:id/deployTrigger deployment
GET/v1/deploymentsList deployments
GET/v1/metricsGet metrics
GET/v1/logsStream logs

Ready to Deploy?

Start your 7-day free trial and deploy your first app in minutes.

Start Free Trial →