Skip to content

Up and running in 4 steps

  1. Install cv4pve-cli
  2. Create an API token
  3. Save the cluster as a context
  4. Run a command
Step by step in Getting Started →

The whole Proxmox VE API, from your terminal

Runs outside the nodes, API only: what kubectl is to Kubernetes. Saved contexts for every cluster you manage, short aliases for everyday operations and tab completion that reads node names and VM IDs from the live cluster.

By sysadmins, for sysadmins.

Built by Corsinvest, official Proxmox partner.

arch=$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/;s/armv7l/arm/')
wget https://github.com/Corsinvest/cv4pve-cli/releases/latest/download/cv4pve-cli-linux-$arch.zip
unzip cv4pve-cli-linux-$arch.zip
chmod +x cv4pve-cli

All files are on the latest release page.

cv4pve-cli config add pve01 --host=pve01.example.com --api-token='cli@pve!cli=…'
cv4pve-cli get nodes

The first line saves the cluster once; from then on every command runs against it:

cv4pve-cli get nodes
nodestatuscpulevelmaxcpumaxmemmemssl_fingerprintuptime
pve01online0.0551737049022492c402700576194562012514058245A:8A:DE:…:1C:05:7A7805388
pve02online0.0232613845048306c4013476621926484975058944F3:12:C6:…:2A:71:107805413
Values as the API returns them: memory in bytes, uptime in seconds. Add -o json for a script.

The Proxmox VE web interface is made for clicking, one object at a time. The API behind it can do everything the interface does, but calling it by hand means a login, a ticket, a CSRF token and a curl line for each call. pvesh is simpler, but it runs only on a node, as root, and knows only the cluster that node belongs to.

cv4pve-cli puts the whole API in a command you run from your own workstation. You save each cluster once, switch between them by name, and type do start vm --guest web01 instead of looking up which node the guest runs on. Every API call the web interface makes, you can make from a shell script, a scheduled job or an AI assistant, against as many clusters as you manage.

cv4pve-cli runs outside the cluster (on Windows, Linux or macOS) and talks only to the Proxmox VE REST API on port 8006. Nothing is installed on the nodes and no SSH is needed. It can do exactly what its account is allowed to do, so give it a dedicated API token with the privileges you want it to have: see Permissions.

cv4pve-cli pvesh
Runs on Your workstation, a management VM, a CI runner A Proxmox VE node
Account Any user or API token, with its own privileges root on the node
Clusters Any number, as saved contexts The one the node belongs to
API calls api get/set/create/delete/ls/usage get/set/create/delete/ls/usage
Shortcuts 347 built-in aliases, plus your own -

The Coming from pvesh page maps each pvesh command to cv4pve-cli.

The cv4pve suite follows the Unix philosophy: each tool does one thing and does it well. cv4pve-cli is the general-purpose one: any API call, by hand or in a script. The others answer one question each and run on their own:

Tool Use it for
cv4pve-cli Any API call from a shell: read, change, automate
cv4pve-api-powershell The same API as PowerShell cmdlets, with objects instead of text, the choice if your scripts are PowerShell
cv4pve-report The full inventory of a cluster, in Excel, HTML or JSON
cv4pve-diag What is wrong in a cluster: a list of problems, each with a severity
cv4pve-admin A web platform for several clusters, when a command line is not what you want

get, set, create and delete on any path of the Proxmox VE REST API, with parameters as --key value. ls and usage show what a path contains and what it accepts.

Each cluster is a saved context: host, port, token or password. Switch with config use, as kubectl does with Kubernetes clusters.

do start vm, create guest snapshot, get cluster ha resources: short commands for common operations, plus your own.

--guest web01 finds the node, the type and the VM ID for you, so you never look up where a guest runs.

Output as text, JSON, HTML or Markdown; --wait for asynchronous tasks; task log --follow to watch one run.

Part of the cv4pve suite →

Run your first command

Install the binary, save your cluster as a context, type get nodes.

ProxmoxMade by Corsinvest,
official Proxmox partner