Quick Install
Get up and running in seconds. Supports macOS, Linux, Windows, and all major package managers.
Interact with CloudNexus programmatically. Manage infrastructure, deploy services, and monitor resources from your terminal or application code.
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.
$ 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
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`.
| Command | Description |
|---|---|
cn compute create | Provision a new virtual machine or container cluster |
cn network deploy | Configure VPCs, subnets, and load balancers |
cn storage init | Initialize object storage buckets and lifecycle rules |
cn monitor watch | Stream real-time metrics and logs to terminal |
cn config set | Update global or project-level configuration |
--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 loggingFirst-class SDKs for modern development workflows. All SDKs share the same underlying gRPC/REST protocol and automatic retry logic.
// 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();
# 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}")
// 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)
}
// 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());
All SDKs automatically resolve credentials in this order:
CN_TOKEN environment variableFor production deployments, use Service Accounts with scoped API keys instead of personal credentials. Service accounts support role-based access control (RBAC) and automatic rotation.
Explore production-ready patterns in our SDK repositories:
# View all example projects
$ cn examples list
# Deploy the multi-region failover pattern
$ cn examples deploy multi-region-failover --dry-run
Need help? Our SDKs and CLI are open source. Contributions and bug reports are welcome.