Skip to main content

CLI for Proxmox VE

Project description

proxctl

crates.io CI License: MIT codecov

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
cargo install proxctl

# From PyPI (pre-built binaries, no Rust toolchain needed)
pip install proxctl

# From GitHub Releases (Linux, macOS, Windows)
curl -fsSL https://github.com/rvben/proxctl/releases/latest/download/proxctl-$(uname -m)-unknown-linux-gnu.tar.gz | tar xz

Quick Start

# Interactive setup (creates API token automatically)
proxctl config init

# Check connectivity
proxctl health

# List VMs
proxctl vm list

# Start a VM
proxctl vm start 100

# Show VM configuration
proxctl vm config 100

# List snapshots
proxctl vm snapshot list 100

# Raw API access
proxctl api get /nodes

Declarative Infrastructure (IaC)

Manage Proxmox resources declaratively with YAML manifests, similar to kubectl apply.

Export existing resources

# Export a single VM
proxctl export vm 101 > haos.yaml

# Export all containers
proxctl export container --all > containers.yaml

# Export cluster firewall rules
proxctl export firewall cluster > firewall.yaml

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
proxctl apply -f infra/ --dry-run

# Apply changes
proxctl apply -f infra/

# Round-trip: export, then verify nothing drifted
proxctl export vm --all > current.yaml
proxctl apply -f current.yaml --dry-run  # should show "noop" for all

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: running or state: stopped to 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 -- apply and export for infrastructure-as-code workflows
  • Auto-detection -- resolves which node a VM lives on automatically
  • Agent-friendly -- --json output, schema command for introspection, structured exit codes
  • Async task handling -- waits for operations to complete with progress spinner
  • Safe -- destructive operations require --yes confirmation
  • Raw API escape hatch -- proxctl api get/post/put/delete for any endpoint
  • Hidden aliases -- qm for vm, ct for container
  • Idempotent -- starting an already-running VM succeeds without error

Configuration

Config file

~/.config/proxctl/config.toml

[default]
host = "https://192.168.1.1:8006"
token = "root@pam!proxctl=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
insecure = true

[production]
host = "https://pve.example.com:8006"
token = "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)

$ proxctl vm list --json | jq '.[].name'
"k8s-control-1"
"k8s-worker-1"
"dev-sandbox"

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:

proxctl schema | jq '.commands | length'
145

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxctl-0.2.2.tar.gz (98.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

proxctl-0.2.2-py3-none-win_amd64.whl (3.9 MB view details)

Uploaded Python 3Windows x86-64

proxctl-0.2.2-py3-none-manylinux_2_28_x86_64.whl (3.9 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

proxctl-0.2.2-py3-none-manylinux_2_28_aarch64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

proxctl-0.2.2-py3-none-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

proxctl-0.2.2-py3-none-macosx_10_12_x86_64.whl (3.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file proxctl-0.2.2.tar.gz.

File metadata

  • Download URL: proxctl-0.2.2.tar.gz
  • Upload date:
  • Size: 98.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for proxctl-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d738c86d0308e3defea458074d6334d2f988b7bd937422c521467de81706a301
MD5 99398af9f63ad2129d0156631da5de1e
BLAKE2b-256 333a143817e5cd327d9f157201a220881582b90ee4503ec89562cd5c0e8a58cb

See more details on using hashes here.

File details

Details for the file proxctl-0.2.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: proxctl-0.2.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for proxctl-0.2.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1b34a160114ca4f743084f4ebfbe29af585c1d79b45a875faeb43a8e092795d7
MD5 e417a7c9ca325ebdcffc12216448080c
BLAKE2b-256 57621dbc5c1581164d3dc409bea4b7d58bd79aa2dc5202c0f761e3bfeb8e2bac

See more details on using hashes here.

File details

Details for the file proxctl-0.2.2-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for proxctl-0.2.2-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 12c355196831872683e4343eac52580b374b6a54da6171b07cbaadd197bf1dbc
MD5 fbfae11c325fca175aed61748aac692b
BLAKE2b-256 a04b867d1d91c776bd747e0ced5e2aab379e086127e72414165aaadba7f77647

See more details on using hashes here.

File details

Details for the file proxctl-0.2.2-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for proxctl-0.2.2-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 823d3f5adf8e9e2eb72620a3fc2b949bfa561a6ba86df6b9fce33edd006d0980
MD5 e1472ce6e7c99dd16bcc4267c87a015f
BLAKE2b-256 90bf040e6847569e53b7cdff232556aa1e8dccdfd1756192251906d6a675dcd4

See more details on using hashes here.

File details

Details for the file proxctl-0.2.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for proxctl-0.2.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd81e5236d4f07fcaa817b8f2e7fce19dc86081a5458dda5ac8b5702cb2346f4
MD5 98ecb19e88861a82acc1dd4c6ae9d0eb
BLAKE2b-256 10adc9101f974b097ce5f196f0bf9d90af9dd1d05c2061e00c42fbe09cea151e

See more details on using hashes here.

File details

Details for the file proxctl-0.2.2-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for proxctl-0.2.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 074644ae666e5e40c9b02edf8d74596f4e00decbfef639ca779c3f00d54ee955
MD5 0e284bdf5702e98552a628c01aa374c6
BLAKE2b-256 384d0e5d5bddbd4b95a038336c1d2cae0170a0b7e54a7ee18224d7dd48a4fc06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page