Quick Install

Get up and running in seconds. Supports macOS, Linux, Windows, and all major package managers.

The CloudNexus CLI and SDKs provide a unified interface to the CloudNexus Control Plane. Whether you're scripting CI/CD pipelines, building custom dashboards, or managing multi-region deployments, our developer tools handle authentication, rate limiting, and retry logic automatically.

Installation

$ brew install cloudnexus/tap/cn-cli $ cn --version
$ curl -fsSL https://install.cloudnexus.dev/linux | sudo sh $ cn --version
PS> winget install CloudNexus.CLI PS> cn --version

Authentication

Authenticate the CLI using your account credentials or a service account token. Tokens are recommended for CI/CD and non-interactive environments.

# Interactive login (opens browser) $ cn auth login # Token-based auth (CI/CD) $ cn auth login --token $CLOUDNEXUS_TOKEN # Verify authentication $ cn auth whoami

Your credentials are securely stored in your system keychain or `~/.cloudnexus/config.json`.

CLI Reference

Core Commands

CommandDescription
cn compute createProvision a new virtual machine or container cluster
cn network deployConfigure VPCs, subnets, and load balancers
cn storage initInitialize object storage buckets and lifecycle rules
cn monitor watchStream real-time metrics and logs to terminal
cn config setUpdate global or project-level configuration

Global Flags

  • --project <id> - Target a specific project
  • --region <code> - Override default region (e.g., us-east-1)
  • --json - Output structured JSON for scripting
  • --verbose - Enable debug logging

SDKs

First-class SDKs for modern development workflows. All SDKs share the same underlying gRPC/REST protocol and automatic retry logic.

Node.js SDK

// Install $ npm install @cloudnexus/sdk // Usage import { CloudNexus } from '@cloudnexus/sdk'; const cn = new CloudNexus({ token: process.env.CN_TOKEN, project: process.env.CN_PROJECT }); async function main() { const instance = await cn.compute.create({ type: 'highperf-8', region: 'eu-west-2', image: 'ubuntu-22.04' }); console.log(`Deployed: ${instance.id}`); } main();

Python SDK

# Install $ pip install cloudnexus-sdk # Usage import cloudnexus client = cloudnexus.Client( token=os.environ["CN_TOKEN"], project=os.environ["CN_PROJECT"] ) instance = client.compute.create( type="highperf-8", region="eu-west-2", image="ubuntu-22.04" ) print(f"Deployed: {instance.id}")

Go SDK

// Install $ go get github.com/cloudnexus/sdk-go/v2 // Usage package main import ( "context" "fmt" cn "github.com/cloudnexus/sdk-go/v2" ) func main() { client := cn.NewClient(os.Getenv("CN_TOKEN")) inst, _ := client.Compute.Create(context.Background(), &cn.InstanceRequest{ Type: "highperf-8", Region: "eu-west-2", }) fmt.Println("Deployed:", inst.ID) }

Java SDK

// Maven <dependency> <groupId>io.cloudnexus</groupId> <artifactId>cloudnexus-java</artifactId> <version>2.4.1</version> </dependency> // Usage CloudNexusClient client = CloudNexusClient.builder() .token(System.getenv("CN_TOKEN")) .project(System.getenv("CN_PROJECT")) .build(); Instance instance = client.compute().create( new CreateInstanceRequest() .type("highperf-8") .region("eu-west-2") ); System.out.println("Deployed: " + instance.id());

SDK Authentication & Environment

All SDKs automatically resolve credentials in this order:

  1. CN_TOKEN environment variable
  2. CLI configuration file (~/.cloudnexus/config.json)
  3. Instance metadata service (for in-cloud workloads)

For production deployments, use Service Accounts with scoped API keys instead of personal credentials. Service accounts support role-based access control (RBAC) and automatic rotation.

Code Examples & Patterns

Explore production-ready patterns in our SDK repositories:

  • Auto-scaling triggers - Dynamic compute allocation based on custom metrics
  • Multi-region failover - Cross-region routing and DNS updates
  • IaC integration - Terraform/CDK providers powered by our SDKs
  • Event-driven workflows - Webhook handlers and queue processors
# View all example projects $ cn examples list # Deploy the multi-region failover pattern $ cn examples deploy multi-region-failover --dry-run

Support & Community

Need help? Our SDKs and CLI are open source. Contributions and bug reports are welcome.