Skip to main content

Arianet CLI Documentation

The Arianet CLI is the official command-line interface for the Arianet cloud platform. Manage and automate your cloud servers, SSH keys, firewalls, and account billings directly from the terminal.

Overview

  • Project: Arianet CLI
  • Language: Go 1.20+
  • Package Manager: Go modules
  • CLI Framework: Cobra
  • Installation: Binary or from source

Installation

brew install ariaservice/tap/arianet

Option 2: Download Pre-built Binary

Download the latest release from the GitHub releases page:

chmod +x arianet
sudo mv arianet /usr/local/bin/

# Verify installation
arianet version

Option 3: Build from Source

git clone https://github.com/ariaservice/arianet-cli.git
cd arianet-cli
go build -o arianet ./cmd/main.go
sudo mv arianet /usr/local/bin/

Quick Start

1. Configure Your API Token

arianet configure --token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Generate a token at the Arianet Dashboard.

2. Verify Authentication

arianet auth whoami

Output:

ID: 12345
Email: user@example.com
Status: active

3. List Your Servers

arianet server list

Configuration

Config File

Configuration is stored at ~/.arianet/config.yaml:

# Show current configuration
arianet configure show

# Update token
arianet configure --token <new-token>

# Update API URL (for self-hosted)
arianet configure --api-url https://api.example.com

Environment Variables

Override configuration with environment variables:

export ARIANET_TOKEN="your-api-token"
export ARIANET_API_URL="https://api.arianet.io" # Optional, defaults to production

Global Flags

Every command supports these flags:

FlagShortDescription
--output-oOutput format: table (default) or json
--tokenOverride API token for this command
--api-urlOverride API base URL for this command

Commands

Authentication

Manage authentication and API tokens.

Whoami

arianet auth whoami

Display the currently authenticated user's information.

Output (table):

ID       EMAIL               STATUS    VERIFIED
12345 user@example.com active true

Output (JSON):

arianet auth whoami -o json

Logout

arianet auth logout

Revoke the current API token and log out. After running this command, you'll need to generate a new token.

List Tokens

arianet auth tokens list

Display all API tokens associated with your account.

Example Output:

ID    NAME                    PREFIX          LAST USED               CREATED
1 CLI Token arr_abc123... 2024-01-20T15:30:00Z 2024-01-15T10:00:00Z
2 Dashboard App arr_xyz789... - 2024-01-10T08:30:00Z
3 Automation arr_uvw012... 2024-01-21T08:15:00Z 2024-01-18T12:45:00Z

Revoke Token

arianet auth tokens revoke {id}

Revoke and disable a specific API token by ID.

arianet auth tokens revoke 2

Servers

Manage cloud server instances.

List Servers

arianet server list [flags]

Flags:

  • --page (int): Page number for pagination (default: 1)
  • --limit (int): Results per page (default: 15, max: 100)
  • --status (string): Filter by status (active, suspended, creating, failed, terminated, pending)
  • -o, --output (string): Output format (table, json)

Examples:

# List all servers
arianet server list

# List servers in JSON format
arianet server list -o json

# Filter by status
arianet server list --status active

# Pagination
arianet server list --page 2 --limit 50

Output (table):

ID      HOSTNAME        STATUS      INSTANCE STATUS    DATACENTER    PLAN            CREATED
98765 web-server-1 active running us-east-1 Standard 2GB 2024-01-15
98766 db-server-1 active running us-east-1 Performance 4GB 2024-01-15
98767 cache-1 suspended stopped eu-west-1 Standard 2GB 2024-01-10

Get Server Details

arianet server get {id}

Display detailed information about a specific server.

arianet server get 98765 -o json

Output (table):

ID              98765
NAME web-server-1
STATUS active
INSTANCE STATUS running
DATACENTER us-east-1
PLAN Standard 2GB
OS Ubuntu 22.04 LTS
IP ADDRESSES 192.168.1.10 (primary)
192.168.1.11 (secondary)
PROTECTED false
CREATED AT 2024-01-15T10:30:00Z

Check Server Status

arianet server status {id}

Quick status check without fetching full details.

arianet server status 98765

Output:

ID              98765
STATUS active
INSTANCE STATUS running

Create Server

arianet server create [flags]

Create a new cloud server. Can run interactively (prompts for input) or non-interactively (with flags).

Interactive Mode (recommended for first-time users):

arianet server create
# Prompts for datacenter, plan, OS, and hostname

Non-Interactive Mode:

arianet server create \
--datacenter 1 \
--plan 1 \
--os 5 \
--hostname my-web-server

Flags:

  • --datacenter (uint): Datacenter/Region ID (required)
  • --plan (uint): Server plan ID (required)
  • --os (uint): OS template ID (required)
  • --hostname (string): Server hostname (optional, auto-generated if omitted)
  • --project-id (uint): Project ID for organization (optional)

Output:

Creating server my-web-server in us-east-1...
Server created: ID 99999

Waiting for server to be ready...
● (30%) Creating
● (60%) Initializing
● (90%) Configuring
✓ Server is ready!

ID 99999
NAME my-web-server
STATUS active
DATACENTER us-east-1
PLAN Standard 2GB
IP ADDRESSES 192.168.1.100 (primary)

Restart Server

arianet server restart {id}

Perform a graceful restart of a running server.

arianet server restart 98765

Power On Server

arianet server power-on {id}

Power on a server that is currently powered off.

arianet server power-on 98765

Power Off Server

arianet server power-off {id}

Power off a running server.

arianet server power-off 98765

Rename Server

arianet server rename {id} --hostname {new-name}

Change the hostname of a server.

arianet server rename 98765 --hostname new-web-server

Reinstall OS

arianet server reinstall {id} --os {os-id}

Reinstall the operating system on a server. Warning: All data will be lost.

# First, list available OS templates
arianet os list

# Then reinstall with new OS
arianet server reinstall 98765 --os 6

Toggle Protection

arianet server toggle-protection {id}

Enable or disable deletion protection for a server. Protected servers cannot be deleted via CLI or API.

arianet server toggle-protection 98765

Output:

Server 98765 protection toggled
Protected: true

Delete Server

arianet server delete {id} [--force]

Delete a server. Warning: This action is permanent and all data will be lost.

# Interactive confirmation
arianet server delete 98765

# Force delete without confirmation
arianet server delete 98765 --force

SSH Keys

Manage SSH public keys for server access.

List SSH Keys

arianet ssh list [-o {format}]

Display all SSH keys in your account.

Example:

arianet ssh list

Output:

ID      NAME                FINGERPRINT             CREATED
1001 My Laptop SHA256:AbCd+EfG... 2024-01-10T14:22:00Z
1002 Production Key SHA256:XyZ9+AbC... 2024-01-15T09:30:00Z
1003 Backup Key SHA256:PqRs+TuV... 2024-01-18T11:45:00Z

Get SSH Key Details

arianet ssh get {id}

Display full details including the public key.

arianet ssh get 1001

Add SSH Key

arianet ssh add --name {name} --key {public-key-file|string}

Add a new SSH public key to your account.

From file:

arianet ssh add --name "Production Key" --key ~/.ssh/id_rsa.pub

From string:

arianet ssh add --name "Temp Key" --key "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC..."

Output:

SSH key added successfully
ID: 1004
Name: Production Key
Fingerprint: SHA256:AbCd+EfG...

Update SSH Key

arianet ssh update {id} --name {new-name}

Update an SSH key's name or metadata.

arianet ssh update 1001 --name "Updated Key Name"

Delete SSH Key

arianet ssh delete {id} [--force]

Remove an SSH key from your account.

arianet ssh delete 1001
# or force delete without confirmation
arianet ssh delete 1001 --force

Firewalls

Manage firewall rules and groups.

List Firewalls

arianet firewall list [-o {format}]

Display all firewall groups.

Example:

arianet firewall list

Output:

ID      NAME                    PROTECTED   RULES   CREATED
2001 Web Server Firewall false 3 2024-01-12T09:45:00Z
2002 Database Firewall true 2 2024-01-14T15:20:00Z
2003 Cache Firewall false 1 2024-01-18T10:00:00Z

Get Firewall Details

arianet firewall get {id}

Display firewall details including all rules.

arianet firewall get 2001

Output:

ID          2001
NAME Web Server Firewall
PROTECTED false
RULES
PROTOCOL PORT DIRECTION CIDR
tcp 80 in 0.0.0.0/0
tcp 443 in 0.0.0.0/0
tcp 22 in 203.0.113.0/24

Create Firewall

arianet firewall create --name {name}

Create a new firewall group.

arianet firewall create --name "My Firewall"

Output:

Firewall created successfully
ID: 2004
Name: My Firewall
Rules: 0

Add Firewall Rule

arianet firewall rule add {firewall-id} \
--port {port} \
--protocol {tcp|udp} \
--source {cidr}

Add a new rule to a firewall.

Examples:

# Allow HTTP traffic from anywhere
arianet firewall rule add 2001 --port 80 --protocol tcp --source 0.0.0.0/0

# Allow SSH from specific subnet
arianet firewall rule add 2001 --port 22 --protocol tcp --source 203.0.113.0/24

# Allow DNS from anywhere
arianet firewall rule add 2001 --port 53 --protocol udp --source 0.0.0.0/0

Remove Firewall Rule

arianet firewall rule remove {firewall-id} {rule-index}

Remove a specific rule by index.

# First, get the firewall to see rule indices
arianet firewall get 2001

# Then remove rule at index 0
arianet firewall rule remove 2001 0

Delete Firewall

arianet firewall delete {id} [--force]

Delete an entire firewall group including all rules.

arianet firewall delete 2001

Balance & Billing

Check account balance and view transactions.

Show Balance

arianet balance

Display your current account balance.

Output:

CURRENCY  BALANCE   STATUS
USD 150.50 active

View Transactions

arianet balance transactions [flags]

View billing transaction history.

Flags:

  • --page (int): Page number (default: 1)
  • --limit (int): Results per page (default: 50)

Examples:

# Recent transactions
arianet balance transactions

# View page 2
arianet balance transactions --page 2

# Show more results per page
arianet balance transactions --limit 100

# JSON output
arianet balance transactions -o json

Output:

ID      TYPE     AMOUNT  DESCRIPTION                           DATE
5001 debit 29.99 Monthly server charge - web-server-1 2024-01-20
5002 debit 59.99 Monthly server charge - db-server-1 2024-01-20
5003 credit 50.00 Account credit applied 2024-01-18

Catalog

Browse available resources without authentication requirement for most commands.

List Regions

arianet region list [-o {format}]

Display all available datacenters/regions.

Example:

arianet region list

Output:

ID    NAME            DISPLAY NAME              COUNTRY
1 us-east-1 US East (N. Virginia) US
2 eu-west-1 EU West (Ireland) IE
3 ap-southeast-1 Asia Pacific (Singapore) SG

List Operating Systems

arianet os list [-o {format}]

Display all available OS templates.

Example:

arianet os list

Output:

ID    NAME                    REGION
5 Ubuntu 22.04 LTS us-east-1
6 Debian 12 us-east-1
7 CentOS 9 us-east-1
8 Ubuntu 22.04 LTS eu-west-1

List OS by Region

arianet os list --region {region-id}

Filter operating systems by region.

arianet os list --region 1

List Plans

arianet plan list [-o {format}]

Display all available server plans with pricing.

Example:

arianet plan list

Output:

ID    NAME                  RECOMMENDED  CPU   MEMORY  STORAGE  PRICE/MONTH
1 Standard 2GB false 1 2GB 20GB $29.99
2 Performance 4GB true 2 4GB 40GB $59.99
3 Enterprise 8GB false 4 8GB 80GB $119.99

Get Plan Details

arianet plan get {id} [-o {format}]

Display detailed plan information including pricing in all currencies.

arianet plan get 1

Output:

ID              1
NAME Standard 2GB
RECOMMENDED false
SPECS
CPU 1 vCPU
MEMORY 2 GB
STORAGE 20 GB SSD
PRICING
CURRENCY HOURLY MONTHLY YEARLY
USD $0.05 $29.99 $299.90
EUR €0.045 €27.99 €279.90

List Plans by Region

arianet plan list --region {region-id}

Filter plans by region.

arianet plan list --region 1

Output Formats

The CLI supports two output formats controlled by the -o or --output flag:

Table Format (Default)

Human-readable table with columns and aligned output.

arianet server list
arianet server list -o table # Explicit

JSON Format

Structured JSON output for scripting and automation.

arianet server list -o json

Example JSON Output:

arianet server get 98765 -o json
{
"id": 98765,
"status": "active",
"instance_status": "running",
"hostname": "web-server-1",
"ip_addresses": [
{
"ip": "192.168.1.10",
"type": "primary"
}
],
"protected": false,
"cycle": "monthly",
"plan": {
"id": 1,
"name": "Standard 2GB"
},
"datacenter": {
"id": 1,
"name": "us-east-1"
},
"os": {
"id": 5,
"name": "Ubuntu 22.04 LTS"
},
"created_at": "2024-01-15T10:30:00Z"
}

Advanced Usage

Scripting and Automation

Use JSON output with tools like jq for advanced scripting:

# Get all active servers and extract IDs
arianet server list --status active -o json | jq '.data[].id'

# Get total number of servers
arianet server list -o json | jq '.pagination.total'

# Find servers in a specific region
arianet server list -o json | jq '.data[] | select(.datacenter.name == "us-east-1")'

# Export server information to CSV
arianet server list -o json | jq -r '.data[] | [.id, .hostname, .status] | @csv'

Bulk Operations

# Restart all servers
for server in $(arianet server list --status active -o json | jq -r '.data[].id'); do
arianet server restart $server
done

# List all SSH keys across multiple accounts (requires separate tokens)
ARIANET_TOKEN=token1 arianet ssh list
ARIANET_TOKEN=token2 arianet ssh list

Configuration Management

# Backup your current configuration
cp ~/.arianet/config.yaml ~/.arianet/config.yaml.backup

# Switch between API environments
arianet configure --api-url https://staging-api.arianet.io
arianet configure --api-url https://api.arianet.io # Back to production

Troubleshooting

Common Issues

"No API token configured"

Error:

no API token configured

Run: arianet configure --token <your-token>
Or set the ARIANET_TOKEN environment variable.

Generate tokens at: https://cloud.ariaservice.net/users/api-tokens

Solution:

arianet configure --token <your-api-token>

"Connection refused"

Error:

failed to connect to api.arianet.io

Solution:

  • Check your internet connection
  • Verify the API is operational at https://status.arianet.io
  • If using a custom API URL, ensure it's correct: arianet configure show

"Unauthorized"

Error:

401 Unauthorized

Solution:

"Operation timed out"

Solution:

  • Network connectivity issue
  • Server under high load
  • Try again with: arianet <command> --api-url https://api-backup.arianet.io

Enable Debug Mode

Export the debug flag to see detailed HTTP interactions:

DEBUG=1 arianet server list

This shows all HTTP requests/responses and helps diagnose issues.

Examples

Complete Workflow: Deploy a Web Server

# 1. Configure authentication
arianet configure --token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

# 2. View available options
arianet region list
arianet plan list
arianet os list

# 3. Create server
arianet server create \
--datacenter 1 \
--plan 1 \
--os 5 \
--hostname web-prod-1

# 4. Add SSH key
arianet ssh add --name "production-key" --key ~/.ssh/id_rsa.pub

# 5. Create firewall
arianet firewall create --name "web-firewall"

# 6. Add firewall rules
arianet firewall rule add <firewall-id> --port 80 --protocol tcp --source 0.0.0.0/0
arianet firewall rule add <firewall-id> --port 443 --protocol tcp --source 0.0.0.0/0
arianet firewall rule add <firewall-id> --port 22 --protocol tcp --source 203.0.113.0/24

# 7. Verify everything
arianet server get <server-id>
arianet balance

Support & Resources

Version

To check your CLI version and ensure it's up to date:

arianet version

Last Updated: March 2026
CLI Version: 1.0+