CLI & SDK Setup

📦 v2.4.0 🕒 Last updated: Oct 15, 2025

Install the CloudNexus command-line interface and client SDKs to provision infrastructure, manage deployments, and automate workflows directly from your terminal or codebase.

System Requirements

Component Minimum Version Recommended
macOS 11.0 (Big Sur) 14.0+
Windows 10 (1903+) 11 / WSL2
Linux Ubuntu 20.04 / Debian 11 Ubuntu 22.04+ / Rocky 9
Network HTTPS access to api.cloudnexus.io Proxy configured if applicable

CLI Installation

Choose your operating system to install the cnx command-line tool.

# Using Homebrew (Recommended) brew install cloudnexus-cli # Verify installation cnx --version
# Using Winget (Windows 10/11) winget install CloudNexus.CLI # Or via Chocolatey choco install cloudnexus-cli # Verify installation cnx --version
# Automated install script curl -fsSL https://cli.cloudnexus.io/install.sh | bash # Manual (tarball) wget https://releases.cloudnexus.io/cnx-linux-amd64.tar.gz tar -xzf cnx-linux-amd64.tar.gz -C /usr/local/bin/ # Verify installation cnx --version

Authentication & Configuration

The CLI uses API keys for authentication. You can generate keys from your CloudNexus Dashboard.

🔐 Security Note Never commit API keys to version control. Use environment variables or secret managers in production pipelines.
# Interactive login cnx auth login # Or set via environment variable export CNX_API_KEY="cnx_live_8f7g6h5j4k3l2m1n" # Verify configuration cnx config list

On first run, cnx creates ~/.cloudnexus/config.json with your credentials, default region, and organization ID.

SDK Installation

Client SDKs are available for Python, Node.js, Go, and Rust. Install the package for your runtime environment.

# Python 3.9+ pip install cloudnexus-sdk # Or with Poetry poetry add cloudnexus-sdk
# Node.js 18+ / Deno / Bun npm install @cloudnexus/sdk # Or with Yarn yarn add @cloudnexus/sdk # Or with pnpm pnpm add @cloudnexus/sdk
# Go 1.21+ go get github.com/cloudnexus/sdk-go@latest # Import in your code import "github.com/cloudnexus/sdk-go/cnx"

Quick Start Example

Provision a managed VPS, deploy a container, and attach a load balancer in under 60 seconds.

# 1. Create infrastructure project cnx infra init --name "production-cluster" --region eu-west-1 # 2. Apply configuration cnx infra apply --auto-approve # 3. Verify deployment cnx status --watch # Output: # ✓ VPS node-01 provisioned (34.8s) # ✓ Container registry connected # ✓ Load balancer active: lb.eu-west-1.cnx.cloud

SDK Usage (Python)

import cloudnexus # Initialize client client = cloudnexus.Client(region="us-east-1") # List all running instances instances = client.compute.list_instances(status="running") for inst in instances: print(f"Instance: {inst.id} | CPU: {inst.cpu} vCores") # Deploy a new container group client.deploy.create( name="api-service", image="cnx-registry/api:v2.4.0", replicas=3, auto_scale=True )

Troubleshooting

  • Command not found: Ensure your shell is reloaded after installation. Run hash -r (Linux/macOS) or restart your terminal (Windows).
  • Authentication failed: Verify your API key has admin or developer scope. Regenerate keys in the Dashboard if expired.
  • SSL/Proxy errors: Set HTTPS_PROXY and NO_PROXY=api.cloudnexus.io for corporate networks.
  • Version mismatch: Run cnx update to fetch the latest CLI binaries.

Need help? Open a ticket at support.cloudnexus.io or join our Discord.

"}