For the complete documentation index, see llms.txt. This page is also available as Markdown.

VergeOS CLI (vrg)

vrg is the official command-line interface for VergeOS, providing 200+ commands for managing virtual machines, networks, tenants, NAS, and more from a terminal or automation pipeline.

Overview

vrg is the official command-line interface for VergeOS. It provides 200+ commands across compute, networking, tenants, NAS, identity, automation, and monitoring, plus declarative .vrg.yaml VM templates for reproducible, version-controlled provisioning. Use it for terminal-first administration, shell scripting, and CI/CD pipelines.

Requirements

  • Python 3.10 or later (when installing via pip, pipx, or uv)

  • A user account or API key with appropriate permissions on the VergeOS instance

Installation

vrg can be installed several ways. pipx is recommended because it isolates the CLI in its own virtual environment.

pipx install vrg

pip

pip install vrg

uv

uv tool install vrg

Homebrew

Standalone Binary

Download a pre-built binary from the latest release , then place it on your PATH. Binaries are available for Linux (x86_64), macOS (ARM64), and Windows (x86_64).

After installation, verify with:

Upgrading

Install Method
Upgrade Command

pipx

pipx upgrade vrg

pip

pip install --upgrade vrg

uv

uv tool upgrade vrg

Homebrew

brew upgrade vrg

Standalone

Re-download from the releases page

Quick Start

vrg configure setup is an interactive wizard that prompts for the host URL, authentication method, and default output format. It saves the result to ~/.vrg/config.toml. See Authentication for the details on each method and how to script credentials.

Authentication

vrg accepts four authentication methods. All four can be supplied through the interactive wizard, environment variables, command-line flags, or a profile in ~/.vrg/config.toml.

Method
Best For
How to Provide

Bearer token

CI pipelines, scripts

--token flag or VERGE_TOKEN env var

API key

Long-lived service automation

--api-key flag

Username + password

Interactive sessions, one-offs

--username / --password or wizard prompts

Profile

Multiple instances

--profile <name> after running vrg configure setup

Generating an API Key

API keys are managed both in the VergeOS UI (System → API Keys) and through the CLI itself once you've authenticated by another method:

Treat the returned value as a secret — store it in your CI provider's secret manager, never in source control.

Environment Variables

Environment variables override values in the config file, which makes them ideal for CI/CD:

Profiles

Profiles let you switch between multiple VergeOS instances (production, staging, customer environments):

Command Pattern

All vrg commands follow a consistent structure:

Most resources implement standard CRUD actions: list, get, create, update, and delete. Destructive operations require --yes to skip the confirmation prompt.

Command Domains

Domain
Sub-domains

Compute

vm, vm drive, vm nic, vm device, vm snapshot, vm export, vm import

Networking

network, network rule, network dns, network host, network alias, network diag, network query

Tenants

tenant, tenant node, tenant storage, tenant net, tenant snapshot, tenant stats, tenant share, tenant logs

NAS

nas service, nas volume, nas cifs, nas nfs, nas user, nas sync, nas files

Infrastructure

cluster, node, storage

Snapshots

snapshot, snapshot profile

Sites & Replication

site, site sync outgoing, site sync incoming

Identity & Access

user, group, permission, api-key, auth-source

Certificates & SSO

certificate, oidc

Automation

task, task schedule, task trigger, task event, task script

Recipes

recipe, recipe section, recipe question, recipe instance, recipe log

Catalog

catalog, catalog repo

Updates

update, update source, update branch, update package, update available

Monitoring

alarm, alarm history, log

Tagging

tag, tag category, resource-group

System

system, system settings, system license, system diag, doctor, configure, file, completion

The complete reference is maintained in the Command Reference .

Usage Examples

Listing and Inspecting VMs

Building a VM from Shell Flags

The shell-flag approach is good for quick experiments. For repeatable provisioning, see VM Templates.

Empty VMs Don't Boot

A VM created from shell flags has no operating system attached. To install one, either boot from an ISO drive (vrg vm drive create … --media cdrom), clone an existing VM (vrg vm clone), or define an OS image and cloud-init in a .vrg.yaml template.

Working with Networks

Network and Node Diagnostics

vrg exposes diagnostic queries that run on a network's virtual router or directly on a physical node:

System Health Check

VM Templates

Define VMs as .vrg.yaml files for repeatable, version-controlled provisioning. Templates support variables, dry-run previews, runtime overrides via --set, cloud-init, and batch creation with VirtualMachineSet.

Example Template

Save the following as web-server.vrg.yaml:

Validating and Creating

For the complete template field reference, see the Template Guide .

Output Formats

All commands support --output (or -o) for changing the output format and --query for extracting a field with dot notation.

Format
Use Case

table

Default human-readable output

wide

All available columns, including those hidden from the default view

json

Machine-readable output for piping to jq or other tools

csv

Spreadsheet-friendly export

Shell Completion

Tab completion is available for bash, zsh, fish, and PowerShell. The fastest way to enable it is:

Global Options

Option
Short
Description

--profile

-p

Configuration profile to use

--host

-H

VergeOS host URL (override)

--token

Bearer token for authentication

--api-key

API key for authentication

--username

-u

Username for basic auth

--password

Password for basic auth

--output

-o

Output format (table, wide, json, csv)

--query

Extract field using dot notation

--all-profiles

Run list commands across every configured profile

--verbose

-v

Increase verbosity (-v, -vv, -vvv)

--quiet

-q

Suppress non-essential output

--no-color

Disable colored output

--yes

Skip confirmation prompts on destructive actions

--version

-V

Show version

--help

Show help

Exit Codes

vrg uses meaningful exit codes for scripting and CI integration:

Code
Meaning

0

Success

1

General error

2

Invalid arguments

3

Configuration error

4

Authentication error

5

Permission denied

6

Resource not found

7

Conflict (e.g., duplicate name)

8

Validation error

9

Timeout

10

Connection error

Troubleshooting

Symptom
Likely Cause
Fix

Exit code 4

Authentication failure

Run vrg configure setup and verify the token, API key, or credentials

Exit code 3

Configuration error

Inspect ~/.vrg/config.toml or run vrg configure show

Exit code 10

Connection error

Verify VERGE_HOST is reachable and the URL is correct

compinit: insecure directories (macOS)

Homebrew permissions

chmod 755 /opt/homebrew/share/zsh /opt/homebrew/share/zsh/site-functions

vrg blocked on macOS

Gatekeeper quarantine

xattr -d com.apple.quarantine ./vrg

Choosing the Right Tool

vrg is one of several VergeOS automation interfaces. Pick based on how you work:

Tool
Use When

vrg CLI

You live in a terminal, want declarative VM templates, or need a one-shot script

Python SDK

You're writing Python applications, complex automation, or integrating with other Python tooling

PowerShell Module

You're a Windows-first shop or already automate with PowerShell

Terraform Provider

You manage VergeOS alongside other Terraform-managed infrastructure

Go SDK

You're embedding VergeOS management into a Go application

Resources & Support

Last updated

Was this helpful?