pmox
(AI tools helped build this project)

📖 Documentation · Quick start · Commands · Safety model · Provisioning
Status: alpha. Commands and flags can change before 1.0.
A command-line tool that explores and manages a Proxmox VE
cluster, built so an AI agent can drive it safely.
pmox wraps the Proxmox API with concise commands, pretty tables for humans, and
JSON for machines. It is read-only by default: it changes nothing without
--dangerous, and it destroys nothing without --dangerous and --yes.
Agents can self-onboard with pmox guide — the whole safety model and
recipes in one call.

pmox health
pmox vm describe 100
# Cloud-init VM, ready to SSH, in one command:
pmox --dangerous vm up web --image ubuntu-24.04 --wait
pmox --dangerous vm start 100
pmox --dangerous vm delete 100 --yes
Why pmox
qm, pct, and pvesh need a root shell on a Proxmox node. pmox needs one
scoped API token and runs from any machine on your network.
- MCP servers add a process to run and configure. pmox is a plain CLI: anything
with shell access can drive it, and the JSON envelopes make it easy to wrap
in an MCP server if you prefer.
- An AI agent gets guardrails by default: read-only mode until
--dangerous,
confirmation for destructive commands, stable error codes, and a built-in
guide (pmox guide).
pmox is not for everything:
- Use Terraform or Ansible when you want declarative state.
- Use
pvesh when you need an API endpoint pmox does not cover.
Quick start
pmox requires Python 3.11+, Proxmox VE 8.x, and an API token.
pip install pmox
Create the token in Proxmox under Datacenter → Permissions → API Tokens (for a
homelab, uncheck "Privilege Separation" so it inherits the user's permissions).
Put the connection details in a .env file where you run pmox, or use a TOML
file, environment variables, or flags (Configuration):
PROXMOX_HOST=192.168.1.10
PROXMOX_TOKEN_ID=root@pam!pmox
PROXMOX_TOKEN_SECRET=00000000-0000-0000-0000-000000000000
PROXMOX_VERIFY_SSL=false # self-signed homelab cert
Confirm it connects, then create your first VM:
pmox health # quorum, node load, storage, guest counts
pmox --dangerous vm up web --image ubuntu-24.04 --wait # prints the new VMID
pmox vm ip <vmid> --wait # agent-reported DHCP address, in seconds
ssh ubuntu@<ip>
The first vm up per image takes a few minutes: it builds a golden template
that includes qemu-guest-agent, then clones it. Every later vm up clones
in seconds, and vm ip gets its answer from the guest agent: no scans, no
guessing. On a multi-node cluster add --node <name>; cloud-image
provisioning needs PVE 8.2+ and a storage with the import content type.
Delete the VM again with pmox --dangerous vm delete <vmid> --yes.
Safety model
Two independent gates protect the cluster:
| Gate | Flag | Applies to | Default |
|---|
| Dangerous mode | --dangerous (or PMOX_DANGEROUS=1) | any state change: power, create, edit, clone, migrate, snapshot | off (read-only) |
| Confirmation | --yes | destructive ops: delete, stop, reset, migrate, rollback, snapshot delete, set with a delete= key | required when non-interactive |
--dangerous is global; --yes belongs to the subcommand and goes after it:
pmox --dangerous vm delete 100 --yes.
When pmox runs non-interactively (e.g. under an agent), it refuses a destructive
command without --yes instead of waiting at a prompt. Failures come back as
JSON envelopes with stable error codes, and successes carry machine-readable
fields (vmid, upid, ...). The exit code distinguishes "needs --dangerous"
(4) from "needs --yes" (3); see the safety model or run
pmox guide.
Using with an AI agent
Point the agent at the CLI and let it run commands through the shell: