proxctl
A command-line interface for Proxmox VE -- manage VMs, containers, nodes, storage, and more from your terminal. Includes declarative infrastructure management with apply and export.
Install
# From crates.io
# From PyPI (pre-built binaries, no Rust toolchain needed)
# From GitHub Releases (Linux, macOS, Windows)
|
Quick Start
# Interactive setup (creates API token automatically)
# Check connectivity
# List VMs
# Start a VM
# Show VM configuration
# List snapshots
# Raw API access
Declarative Infrastructure (IaC)
Manage Proxmox resources declaratively with YAML manifests, similar to kubectl apply.
Export existing resources
# Export a single VM
# Export all containers
# Export cluster firewall rules
Apply desired state
# infra/web.yaml
kind: vm
name: web-01
vmid: 100
config:
memory: 4096
cores: 2
onboot: true
---
kind: firewall-rule
scope: cluster
config:
action: ACCEPT
type: in
proto: tcp
dport: "443"
comment: "Allow HTTPS"
# Preview changes
# Apply changes
# Round-trip: export, then verify nothing drifted
Key behaviors
- Idempotent -- running apply twice produces "up to date" on the second run
- Patch semantics -- only specified config keys are changed, others left untouched
- Name or VMID -- resources can be identified by name (auto-resolves VMID) or pinned by ID
- Multi-document -- multiple resources in one file with
---separators, or a directory of files - Optional power state -- add
state: runningorstate: stoppedto manage power, or omit to leave it alone - Safe -- shows a diff before applying, destructive changes prompt for confirmation
Features
- 145+ commands covering VMs, containers, nodes, storage, backups, cluster, firewall, access control, pools, and Ceph
- Declarative IaC --
applyandexportfor infrastructure-as-code workflows - Auto-detection -- resolves which node a VM lives on automatically
- Agent-friendly --
--jsonoutput,schemacommand for introspection, structured exit codes - Async task handling -- waits for operations to complete with progress spinner
- Safe -- destructive operations require
--yesconfirmation - Raw API escape hatch --
proxctl api get/post/put/deletefor any endpoint - Hidden aliases --
qmforvm,ctforcontainer - Idempotent -- starting an already-running VM succeeds without error
Configuration
Config file
~/.config/proxctl/config.toml
[]
= "https://192.168.1.1:8006"
= "root@pam!proxctl=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
= true
[]
= "https://pve.example.com:8006"
= "admin@pam!proxctl=yyyyyyyy-..."
Environment variables
| Variable | Description |
|---|---|
PROXMOX_HOST |
Proxmox host (e.g. pve.example.com:8006) |
PROXMOX_TOKEN |
API token (user@realm!tokenid=secret) |
PROXMOX_PROFILE |
Config profile name (default: default) |
PROXMOX_NODE |
Default node name |
Precedence
CLI flags > environment variables > config file
Usage Examples
Human output (TTY)
$ proxctl vm list
VMID NAME STATUS NODE CPUS MEMORY
100 k8s-control-1 running pve1 4 8.00 GiB
101 k8s-worker-1 running pve1 8 16.00 GiB
200 dev-sandbox stopped pve2 2 4.00 GiB
JSON output (piped or --json)
|
JSON output is automatic when stdout is not a TTY, so piping to jq, grep, or scripts works without flags.
Agent Integration
The schema command outputs a JSON description of all 145+ commands with their arguments, types, defaults, and behavioral metadata:
|
This enables AI agents and automation tools to discover available operations, required parameters, and which commands are mutating or destructive -- without parsing help text.
Comparison
| Feature | proxctl | pvesh (built-in) | proxmoxer (Python) |
|---|---|---|---|
| Declarative IaC (apply/export) | Yes | No | No |
| Typed CLI with completions | Yes | No | N/A |
| Cross-platform binaries | Yes | No (PVE only) | pip install |
| VMID auto-resolution | Yes | No | Manual |
| JSON + human output | Auto-detect | JSON only | N/A |
| Agent schema introspection | Yes | No | No |
| Idempotent lifecycle ops | Yes | No | Manual |
License
MIT