Edge

CLI

Configuration

Customize CLI behavior with persistent settings and flags.

Configuration Commands

List All Settings

$ edge config list
api_url         https://api.edge.network
output          table
default_region  london
no_color        false

Get a Setting

$ edge config get output
table

$ edge config get default_region
london

Set a Value

# Set default output format
edge config set output json

# Set default region
edge config set default_region london

# Disable colored output
edge config set no_color true

Unset a Value

# Remove a setting (use default)
edge config unset default_region

Available Settings

Setting Description Default
api_url API endpoint URL https://api.edge.network
output Default output format (table, json, yaml) table
default_region Default region for new resources -
no_color Disable colored output false

Config File

Settings are stored in a JSON file:

  • ~/.edge/config.json macOS / Linux
  • %USERPROFILE%\.edge\config.json Windows
{
  "api_key": "ek_live_abc123...",
  "api_url": "https://api.edge.network",
  "output": "table",
  "default_region": "london",
  "no_color": false
}

Global Flags

Override settings for individual commands:

# Override output format for single command
edge compute list --output json

# Override output format shorthand
edge compute list -o json

# Quiet mode (IDs only)
edge compute list --quiet
edge compute list -q

# Verbose mode (debug info)
edge compute list --verbose
edge compute list -v

# Skip confirmation prompts
edge compute delete vm-abc123 --yes
edge compute delete vm-abc123 -y

# Specify API key directly
edge compute list --api-key ek_live_xyz...

Output Formats

Table (default)

Human-readable tabular format:

$ edge compute list
ID          NAME           STATUS    IP             SIZE           REGION
vm-abc123   web-1          running   192.0.2.10     s-2vcpu-4gb    london
vm-def456   api-server     running   192.0.2.11     s-4vcpu-8gb    london

JSON

Machine-readable JSON for scripting:

$ edge compute list -o json
[
  {
    "id": "vm-abc123",
    "name": "web-1",
    "status": "running",
    "ip": "192.0.2.10",
    "size": "s-2vcpu-4gb",
    "region": "london"
  },
  {
    "id": "vm-def456",
    "name": "api-server",
    "status": "running",
    "ip": "192.0.2.11",
    "size": "s-4vcpu-8gb",
    "region": "london"
  }
]

Quiet

IDs only, one per line:

$ edge compute list -q
vm-abc123
vm-def456

Scripting Examples

Combine CLI commands for automation:

#!/bin/bash

# Stop all VMs
for vm in $(edge compute list -q); do
  echo "Stopping $vm..."
  edge compute stop "$vm" --yes
done

# Purge CDN and sync new assets
edge cdn purge my-deployment --yes
edge storage sync ./dist my-bucket/website/

# Get VM IP as variable
VM_IP=$(edge compute get vm-abc123 -o json | jq -r '.ip')
echo "VM IP: $VM_IP"

Environment Variables

Variable Description
EDGE_API_KEY API key for authentication
EDGE_API_URL Override API endpoint
EDGE_OUTPUT Default output format
EDGE_REGION Default region
NO_COLOR Disable colors (standard env var)

Environment variables take precedence over config file settings but are overridden by command-line flags.

Exit Codes

Code Meaning
0 Success
1 General error
2 Authentication error
130 Interrupted (Ctrl+C)

See Also