v3.4.2 • Stable

Infrastructure at your fingertips

The official CloudNexus CLI lets you provision, manage, and scale cloud resources directly from your terminal. Scriptable, fast, and built for DevOps workflows.

Install CLI View on GitHub

Installation

Choose your platform below. The CLI requires Node.js 18+ or a supported package manager.

$ brew install cloudnexus/cli/cloudnexus

Requires Homebrew. Tap our official formula repository for automatic updates.

$ curl -fsSL https://cli.cloudnexus.io/install.sh | sh
$ sudo apt update && sudo apt install cloudnexus-cli

Supports Debian 11+, Ubuntu 20.04+, and RHEL 8+ derivatives. ARM64 binaries included.

PS > winget install CloudNexus.CLI

Works natively in PowerShell 7+ and Windows Terminal. WSL2 users can use the Linux method.

$ npm install -g @cloudnexus/cli
# or with pnpm
$ pnpm add -g @cloudnexus/cli

Ideal for CI/CD pipelines and Node.js environments. Requires Node 18.0+.

Quick Start

Get up and running in under 60 seconds. These commands will authenticate you and provision your first server.

1

Authenticate

Open an interactive OAuth flow or use an API key for non-interactive environments.

$ cnx login
2

Provision a Server

Create a Professional tier instance in US East with auto-scaling enabled.

$ cnx server create --tier professional --region us-east-1 --auto-scale
3

Verify & Connect

List active instances and get SSH credentials with a single command.

$ cnx server list
$ cnx server ssh <instance-id>

Command Reference

Core commands organized by category. Run cnx <command> --help for detailed flags.

Authentication & Profiles

CommandDescription
cnx login
Authenticate via browser OAuth or CI token. Supports multi-account profiles.
cnx logout
Clear active session and local token cache.
cnx profile use <name>
Switch between saved authentication profiles.

Infrastructure

CommandDescription
cnx server create
Provision a new VPS or container host. Supports YAML manifests.
cnx server destroy
Terminate instances with optional grace period and backup retention.
cnx k8s cluster deploy
Spin up a managed Kubernetes cluster with optional autoscaling policies.
cnx scale --replicas <n>
Adjust horizontal scaling for stateless deployments.

Storage & Networking

CommandDescription
cnx bucket create
Initialize S3-compatible object storage with lifecycle rules.
cnx cdn purge
Invalidate cached assets across all edge nodes instantly.
cnx firewall rule add
Append ingress/egress rules to instance security groups.

Configuration & Environment

Customize behavior using environment variables or the local config file at ~/.cnx/config.json.

🔑 API Authentication

For CI/CD pipelines, set CNX_API_KEY and CNX_SECRET to bypass interactive login. Keys are scoped to your organization.

🌐 Default Region

Override the default deployment zone with CNX_DEFAULT_REGION. Useful for multi-region teams who want consistent baselines.

⚙️ Verbose Logging

Enable debug output for troubleshooting by setting CNX_LOG_LEVEL=debug or using the --verbose flag on any command.

📁 Config Directory

Profiles, aliases, and telemetry preferences live in ~/.cnx/. Use cnx config edit to open it in your default editor.