v2.4.1

CloudNexus CLI Reference

Command-line interface for managing your cloud infrastructure. Fast, intuitive, and fully scriptable.

Overview

The nx CLI provides a unified interface to interact with the CloudNexus platform. It supports resource provisioning, monitoring, billing queries, and infrastructure-as-code workflows.

💡
Run nx help or nx --help for a quick overview of all available commands.
Terminal
$ nx --version CloudNexus CLI v2.4.1 (build 20250312)

Installation

Install the CLI via package managers or download the binary directly.

macOS (Homebrew)

Terminal
$ brew tap cloudnexus/tap $ brew install cloudnexus-cli

npm / yarn

Terminal
$ npm install -g @cloudnexus/cli # or $ yarn global add @cloudnexus/cli

Linux (APT)

Terminal
$ curl -fsSL https://repo.cloudnexus.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloudnexus.gpg $ echo "deb [signed-by=/usr/share/keyrings/cloudnexus.gpg] https://repo.cloudnexus.io/apt stable main" | sudo tee /etc/apt/sources.list.d/cloudnexus.list $ sudo apt update && sudo apt install cloudnexus-cli

Authentication

Authenticate using API keys or OAuth tokens. Credentials are stored securely in your system keychain.

Terminal
$ nx auth login ? API Key: •••••••••••••••• ✓ Successfully authenticated as user@company.com
CommandDescription
nx auth loginInteractive login via API key or OAuth
nx auth use-profile <name>Switch to an existing auth profile
nx auth logoutClear stored credentials

Compute

Manage virtual machines, containers, and serverless functions.

nx compute create

Provision a new compute instance.

Syntax
nx compute create <name> --region us-east-1 --type c-standard-4 --image ubuntu-22.04
FlagDescriptionDefault
--regionDeployment regionus-east-1
--typeInstance flavorc-standard-2
--imageOS image ID or slugdebian-11
--tagsComma-separated tagscli-provisioned

nx compute list / scale / destroy

Examples
$ nx compute list --region eu-west $ nx compute scale web-prod --replicas 5 $ nx compute destroy dev-test --force

Network & DNS

Configure firewalls, load balancers, and DNS records.

nx network dns set

Create or update a DNS record.

Syntax
nx network dns set app.example.com --type A --value 192.0.2.1 --ttl 300
⚠️
DNS changes may take up to 60 seconds to propagate across edge nodes.

nx network firewall allow

Example
$ nx network firewall allow --name allow-https --protocol tcp --ports 443 --direction inbound

Object Storage

Manage S3-compatible buckets and files.

Terminal
$ nx storage bucket create my-assets --region us-west-2 $ nx storage bucket ls $ nx storage cp ./upload/ s3://my-assets/public/ --recursive

Global Flags

These flags can be used with any nx command.

FlagTypeDescription
--jsonbooleanOutput results in JSON format (machine-readable)
--verbosebooleanEnable debug logging
--timeoutintegerRequest timeout in seconds (default: 30)
--no-promptbooleanDisable interactive prompts (for CI/CD)

Environment Variables

Configure the CLI behavior without flags.

VariableDescription
NX_API_KEYAuthentication API key
NX_REGIONDefault deployment region
NX_OUTPUTDefault output format (table, json, yaml)
NX_CONFIG_DIRCustom config directory path
Example
$ export NX_API_KEY=your-api-key-here $ export NX_OUTPUT=json $ nx compute list