CLI Installation & Setup
The CloudNexus CLI is the fastest way to manage your infrastructure from the terminal. Install it, authenticate with your API key, and start deploying in seconds.
Prerequisites
You need an active CloudNexus account and an API token with
read/write permissions. Generate one from Dashboard → Settings → API Keys.Installation
Choose your operating system to get started:
macOS
Terminal
# Using Homebrew
brew tap cloudnexus/cli
brew install cnx-cli
# Or download directly
curl -fsSL https://cli.cloudnexus.io/install.sh | sh
Linux
Terminal
# Debian/Ubuntu
curl -1sLf 'https://dl.cloudsmith.io/public/cloudnexus/cli/setup.deb.sh' | sudo bash
sudo apt install cnx-cli
# RHEL/CentOS/Fedora
curl -1sLf 'https://dl.cloudsmith.io/public/cloudnexus/cli/setup.rpm.sh' | sudo bash
sudo dnf install cnx-cli
Windows
PowerShell
winget install CloudNexus.CNXCli
# Or via Scoop
scoop bucket add cloudnexus https://github.com/cloudnexus/homebrew-cli
scoop install cnx-cli
Authentication
After installation, authenticate your CLI session:
Terminal
cnx auth login
# Output:
🔑 Paste your API token: cnx_sk_live_8f3a2c...
✅ Successfully authenticated as: developer@yourcompany.io
🌍 Default region set to: us-east-1
Security Note
Never commit API tokens to version control. Use environment variables or secret managers for CI/CD pipelines.
Verify Installation
Run the following command to verify everything is working:
Terminal
cnx system status
# Expected output:
CLOUDNEXUS v2.4.1
REGION us-east-1
CONNECTION ✓ Connected (14ms)
QUOTA 3/10 instances active
Configuration File
The CLI stores configuration in ~/.cloudnexus/config.yaml. You can customize defaults:
| Parameter | Type | Default | Description |
|---|---|---|---|
| region | string | us-east-1 | Default deployment region |
| output | string | table | Output format: table, json, yaml |
| auto_confirm | boolean | false | Skip confirmation prompts |
| retry_count | integer | 3 | API retry attempts on failure |
Pro Tip
Enable
auto_confirm for scripting, but always use dry_run: true in CI pipelines to prevent accidental production changes.Next Steps
- Deploy your first instance:
cnx compute create --plan pro --region eu-west - Read the Kubernetes integration guide for cluster management
- Explore CLI reference for all available commands