🔍
v2.4.1 ⌘ GitHub

CloudNexus CLI Documentation →

Manage your entire cloud infrastructure from the terminal. Deploy, scale, monitor, and secure workloads with the official CloudNexus command-line interface.

â„šī¸ Prerequisite: Ensure you have Node.js 18+ or Go 1.20+ installed. The CLI is distributed as a single binary or via npm.

Installation

Install the CloudNexus CLI using your preferred package manager or download the pre-built binary.

npm
npm install -g @cloudnexus/cli
curl
curl -fsSL https://cli.cloudnexus.dev/install | sh
homebrew
brew tap cloudnexus/cli
brew install nexus

Authentication

Authenticate your CLI session using your personal access token or OAuth flow. Tokens are stored securely in ~/.nexus/credentials.json.

bash
nexus login
# Opens browser for OAuth2 consent...
# ✓ Authenticated as dev@example.com
# Region: us-east-1 (default)
🔐 CI/CD Environments: Use the NEXUS_API_TOKEN environment variable instead of interactive login.

Common Commands

Command Description
nexus init Scaffold a new project with infrastructure-as-code templates
nexus deploy Build and push artifacts, then spin up a new immutable deployment
nexus scale --replicas 4 Horizontally scale your application across availability zones
nexus logs --follow Stream real-time stdout/stderr from all running instances
nexus db create Provision a managed PostgreSQL or MySQL cluster
nexus region set eu-west Switch default deployment region for subsequent commands

Deployment Workflow

The CLI handles containerization, registry pushing, and orchestration automatically. Provide a nexus.yaml config or use convention-over-configuration.

yaml
name: my-saas-app
runtime: node:20-alpine
build:
  cmd: npm run build
scale:
  min: 2
  max: 20
env:
  DATABASE_URL: ${NEXUS_DB_PRIMARY}
  NODE_ENV: production
bash
nexus deploy --auto-scale --health-path /healthz
# 🚀 Building project...
# đŸ“Ļ Pushing to registry.cloudnexus.dev/my-saas-app@sha256:abc...
# đŸŸĸ Deployment succeeded (23s)
# 🔗 https://my-saas-app.cloudnexus.app

Troubleshooting

Enable verbose logging with the --debug flag. CLI diagnostics output a system report compatible with our support portal.

bash
nexus doctor
# Checking CLI version... ✓ 2.4.1
# Validating auth token... ✓ Active
# Network connectivity... ✓ 12ms latency
# Disk space... âš ī¸ 89% used (consider cleanup)