Skip to content
Docs

Configuration

Customise CLI behaviour with persistent settings and flags.

Configuration commands

List all settings

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

Get a setting

Output
$ edge config get output
table

$ edge config get default_region
london

Set a value

Terminal
# 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

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

Available settings

SettingDescriptionDefault
api_urlAPI endpoint URLhttps://api.edge.network
outputDefault output format (table, json, yaml)table
default_regionDefault region for new resourcesNone
no_colorDisable coloured outputfalse

Config file

Settings are stored in a JSON file:

  • macOS / Linux: ~/.edge/config.json
  • Windows: %USERPROFILE%\.edge\config.json
JSON
{
  "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:

Terminal
# 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:

Output
$ 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:

Output
$ 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:

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

Scripting examples

Combine CLI commands for automation:

Terminal
#!/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

VariableDescription
EDGE_API_KEYAPI key for authentication
EDGE_API_URLOverride API endpoint
EDGE_OUTPUTDefault output format
EDGE_REGIONDefault region
NO_COLORDisable colours (standard env var)

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

Exit codes

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

Next steps

Something unclear or out of date? Tell us, or read this page as Markdown.