______ _ __
/ ____/___ __________(_)___ _ _____ _____/ /_
/ / / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / / (__ ) / / / / |/ / __(__ ) /_
\____/\____/_/ /____/_/_/ /_/|___/\___/____/\__/
Command Line Interface for Proxmox VE (Made in Italy)
# Check available releases at: https://github.com/Corsinvest/cv4pve-cli/releases
# Download specific version (replace VERSION with actual version number)
wget https://github.com/Corsinvest/cv4pve-cli/releases/download/VERSION/cv4pve-cli-linux-x64.zip
unzip cv4pve-cli-linux-x64.zip
# Make executable
chmod +x cv4pve-cli
# Run interactive shell
./cv4pve-cli --host=YOUR_HOST --username=root@pam --password=YOUR_PASSWORD sh
# Execute API command
./cv4pve-cli --host=YOUR_HOST --username=root@pam --password=YOUR_PASSWORD get /nodes- Native C# implementation
- Cross-platform (Windows, Linux, macOS)
- API-based operation (no root access required)
- Cluster support with automatic failover
- High availability with multiple host support
- Full REST API coverage (GET/POST/PUT/DELETE)
- API documentation generated at runtime
- Usage command with complete documentation
- Multiple output formats (text, json, table)
- ls command like filesystem navigation
- Interactive shell mode for exploration
- Script file execution support
- API token support (Proxmox VE 6.2+)
- SSL validation options
- Parameter files for complex setups
- Alias commands for frequent operations
- API metadata cache for faster startup
- Command history persistence
- Multiple host support for HA
- Timeout management for operations
- Error resilience and detailed logging
- Comprehensive command documentation
- Automated scripting capabilities
# Check available releases and get the specific version number
# Visit: https://github.com/Corsinvest/cv4pve-cli/releases
# Download specific version (replace VERSION with actual version like v1.9.0)
wget https://github.com/Corsinvest/cv4pve-cli/releases/download/VERSION/cv4pve-cli-linux-x64.zip
# Alternative: Get latest release URL programmatically
LATEST_URL=$(curl -s https://api.github.com/repos/Corsinvest/cv4pve-cli/releases/latest | grep browser_download_url | grep linux-x64 | cut -d '"' -f 4)
wget "$LATEST_URL"
# Extract and make executable
unzip cv4pve-cli-linux-x64.zip
chmod +x cv4pve-cli
# Optional: Move to system path
sudo mv cv4pve-cli /usr/local/bin/# Install using Windows Package Manager
winget install Corsinvest.cv4pve.cli# Check available releases at: https://github.com/Corsinvest/cv4pve-cli/releases
# Download specific version (replace VERSION with actual version)
Invoke-WebRequest -Uri "https://github.com/Corsinvest/cv4pve-cli/releases/download/VERSION/cv4pve-cli.exe-win-x64.zip" -OutFile "cv4pve-cli.zip"
# Extract
Expand-Archive cv4pve-cli.zip -DestinationPath "C:\Tools\cv4pve-cli"
# Add to PATH (optional)
$env:PATH += ";C:\Tools\cv4pve-cli"# Check available releases at: https://github.com/Corsinvest/cv4pve-cli/releases
# Download specific version (replace VERSION with actual version)
wget https://github.com/Corsinvest/cv4pve-cli/releases/download/VERSION/cv4pve-cli-osx-x64.zip
unzip cv4pve-cli-osx-x64.zip
chmod +x cv4pve-cli
# Move to applications
sudo mv cv4pve-cli /usr/local/bin/cv4pve-cli --host=192.168.1.100 --username=root@pam --password=your_password [commands]cv4pve-cli --host=192.168.1.100 --api-token=root@pam!token1=uuid-here [commands]# Store password in file
echo "your_password" > /etc/cv4pve/password
chmod 600 /etc/cv4pve/password
# Use password file
cv4pve-cli --host=192.168.1.100 --username=root@pam --password=file:/etc/cv4pve/password [commands]| Parameter | Description | Example |
|---|---|---|
--host |
Proxmox host(s) (multiple for HA) | --host=pve1:8006,pve2:8006 |
--username |
Username@realm | --username=root@pam |
--password |
Password or file | --password=secret or --password=file:/path |
--api-token |
API token | --api-token=user@realm!token=uuid |
--validate-certificate |
Validate SSL certificate | --validate-certificate |
Interactive Mode
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret shOutput:
Corsinvest CLI for Proxmox VE (Tuesday, December 11, 2025)
Type '<TAB>' for completion word
Type 'help', 'quit' to close the application.
Initialization metadata... 111ms
>>>
>>> help
Commands:
alias Alias commands
clear Clear screen
clear-cache Clear API metadata cache
clear-history Clear command history
create Create (POST) from resource
delete Delete (DELETE) from resource
get Get (GET) from resource
help Show help information
history Show history command
ls List child objects on <api_path>.
quit Close application
set Set (PUT) from resource
usage Usage resource# Inside shell, explore the API
>>> get /nodes
>>> get /nodes/pve1/qemu
>>> get /cluster/resources type:vm
>>> ls /nodes/pve1
>>> usage /cluster/resources
>>> quit# Create script file
cat > commands.txt <<EOF
get /nodes
get /cluster/resources
ls /nodes/pve1
EOF
# Execute script
cv4pve-cli --host=pve.local --username=root@pam --password=secret sh --script=commands.txtThe shell supports custom aliases for frequently used commands:
>>> alias
System aliases available:
cluster-backup, cbck - Cluster list vzdump backup schedule
cluster-status, csts - Cluster status
cluster-top, ct, top - Cluster top
qemu-list, qlst - Qemu list vm
qemu-status, qsts - Qemu current status vm
qemu-start, qstr - Qemu start vm
qemu-stop, qsto - Qemu stop vm
... and many more
GET - Read Data
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret get /versionOutput:
┌─────────┬──────────┐
│ key │ value │
├─────────┼──────────┤
│ release │ 13 │
├─────────┼──────────┤
│ repoid │ aee6f0ec │
├─────────┼──────────┤
│ version │ 5.4 │
└─────────┴──────────┘
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret get /nodesOutput:
┌──────┬────────┬───────┬───────┬────────┬───────────┬───────────┬──────────────────────────┬─────────────────┐
│ node │ status │ cpu │ level │ maxcpu │ maxmem │ mem │ ssl_fingerprint │ uptime │
├──────┼────────┼───────┼───────┼────────┼───────────┼───────────┼──────────────────────────┼─────────────────┤
│ pve1 │ online │ 4,58% │ c │ 8 │ 31,39 GiB │ 17,03 GiB │ 81:94:9C:7A:20:38:44... │ 12d 19h 12m 55s │
│ pve2 │ online │ 4,92% │ c │ 8 │ 31,39 GiB │ 16,77 GiB │ 70:41:5B:47:21:F4:5C... │ 13d 23h 34m 25s │
└──────┴────────┴───────┴───────┴────────┴───────────┴───────────┴──────────────────────────┴─────────────────┘
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret get /cluster/resources type:nodeOutput:
┌───────────┬──────┬───────┬───────────┬────────┬────────────┬───────────┬───────────┬──────┬────────┐
│ id │ type │ cpu │ disk │ maxcpu │ maxdisk │ maxmem │ mem │ node │ status │
├───────────┼──────┼───────┼───────────┼────────┼────────────┼───────────┼───────────┼──────┼────────┤
│ node/pve1 │ node │ 6,47% │ 14,65 GiB │ 8 │ 27,19 GiB │ 31,39 GiB │ 17,38 GiB │ pve1 │ online │
│ node/pve2 │ node │ 4,38% │ 12,45 GiB │ 8 │ 27,19 GiB │ 31,39 GiB │ 16,75 GiB │ pve2 │ online │
└───────────┴──────┴───────┴───────────┴────────┴────────────┴───────────┴───────────┴──────┴────────┘
# Standard JSON
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret get /version --output=jsonOutput:
{"repoid":"aee6f0ec","release":"13","version":"5.4","keyboard":"it"}cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret get /version --output=jsonprettyOutput:
{
"repoid": "aee6f0ec",
"release": "13",
"version": "5.4",
"keyboard": "it"
}SET - Update Configuration
# Update VM memory
cv4pve-cli --host=pve.local --username=root@pam --password=secret set /nodes/pve1/qemu/100/config memory:4096
# Update VM description
cv4pve-cli --host=pve.local --username=root@pam --password=secret set /nodes/pve1/qemu/100/config description:"Updated by cv4pve-cli"
# Update multiple parameters
cv4pve-cli --host=pve.local --username=root@pam --password=secret set /nodes/pve1/qemu/100/config memory:4096 cores:2CREATE - Create Resources
# Create snapshot
cv4pve-cli --host=pve.local --username=root@pam --password=secret create /nodes/pve1/qemu/100/snapshot snapname:backup-$(date +%Y%m%d)
# Create user
cv4pve-cli --host=pve.local --username=root@pam --password=secret create /access/users userid:testuser@pve password:secret
# Start VM
cv4pve-cli --host=pve.local --username=root@pam --password=secret create /nodes/pve1/qemu/100/status/startDELETE - Remove Resources
# Delete snapshot
cv4pve-cli --host=pve.local --username=root@pam --password=secret delete /nodes/pve1/qemu/100/snapshot/backup-20250211
# Stop VM
cv4pve-cli --host=pve.local --username=root@pam --password=secret create /nodes/pve1/qemu/100/status/stopLS - Browse API Like Filesystem
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret ls /Output:
Dr--- access
Dr--- cluster
Dr--- nodes
Dr--c pools
Dr--c storage
-r--- version
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret ls /nodesOutput:
Dr--- pve1
Dr--- pve2
Dr--- pve3cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret ls /nodes/pve1/qemuOutput:
Dr--- 100
Dr--- 101
Dr--- 102
Dr--- 118USAGE - API Documentation
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret usage /cluster/resourcesOutput:
USAGE: get /cluster/resources [OPTIONS]
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret usage /cluster/resources --verboseOutput:
USAGE: get /cluster/resources [OPTIONS]
Resources index (cluster wide).
┌───────┬─────────────────┬─────────────┐
│ param │ type │ description │
├───────┼─────────────────┼─────────────┤
│ type │ vm,storage,node │ │
└───────┴─────────────────┴─────────────┘
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret usage /cluster/resources --verbose --returnsOutput:
USAGE: get /cluster/resources [OPTIONS]
Resources index (cluster wide).
┌───────┬─────────────────┬─────────────┐
│ param │ type │ description │
├───────┼─────────────────┼─────────────┤
│ type │ vm,storage,node │ │
└───────┴─────────────────┴─────────────┘
RETURNS:
┌─────────┬────────────────────────┬──────────────────────────────────────────┐
│ param │ type │ description │
├─────────┼────────────────────────┼──────────────────────────────────────────┤
│ cpu │ number │ CPU utilization │
│ disk │ string │ Used disk space in bytes │
│ maxcpu │ number │ Number of available CPUs │
│ maxmem │ integer │ Number of available memory in bytes │
│ mem │ string │ Used memory in bytes │
│ node │ string │ The cluster node name │
│ status │ string │ Resource type dependent status │
│ type │ node,storage,pool,qemu │ Resource type │
└─────────┴────────────────────────┴──────────────────────────────────────────┘
# Show all available commands for a resource
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret usage /nodes/pve1/statusOutput:
USAGE: get /nodes/pve1/status
USAGE: create /nodes/pve1/status command:<string>
# Show specific command documentation
cv4pve-cli --host=192.168.0.100 --username=root@pam --password=secret usage /nodes/pve1/status --command=createOutput:
USAGE: create /nodes/pve1/status command:<string>
Parameter Files
# /etc/cv4pve/production.conf
--host=pve-cluster.company.com
--api-token=automation@pve!production=uuid-here
--validate-certificatecv4pve-cli @/etc/cv4pve/production.conf get /cluster/resourcesOutput Formats
# Text output (default)
cv4pve-cli --host=pve.local --username=root@pam --password=secret get /nodes
# JSON output
cv4pve-cli --host=pve.local --username=root@pam --password=secret get /nodes --output=json
# Pretty JSON
cv4pve-cli --host=pve.local --username=root@pam --password=secret get /nodes --output=jsonpretty
# Table output (for supported commands)
cv4pve-cli --host=pve.local --username=root@pam --password=secret get /cluster/resources --output=tablecv4pve-cli [global-options] [command] [parameters]| Parameter | Description | Example |
|---|---|---|
--host |
Host name (host[:port]) | --host=pve.local:8006 |
--username |
Username@realm | --username=root@pam |
--password |
Password or file | --password=secret |
--api-token |
API token | --api-token=user@realm!token=uuid |
--validate-certificate |
Validate SSL certificate | --validate-certificate |
--version |
Show version | --version |
-?, -h, --help |
Show help | --help |
| Command | Description | Syntax |
|---|---|---|
get |
GET from resource | get <resource> [parameters] |
set |
PUT to resource | set <resource> [parameters] |
create |
POST to resource | create <resource> [parameters] |
delete |
DELETE resource | delete <resource> [parameters] |
| Command | Description | Syntax |
|---|---|---|
usage |
Show API usage | usage <resource> [options] |
ls |
List child objects | ls <resource> |
sh |
Interactive shell | sh [--script=file] [--only-result] |
| Command | Description |
|---|---|
clear |
Clear screen |
clear-cache |
Clear API metadata cache files |
clear-history |
Clear command history |
history |
Show command history |
alias |
Manage command aliases |
quit |
Exit interactive shell |
--output <format> Output format: text, json, jsonpretty, table
--wait Wait for task to finish
--verbose Enable verbose output--command, -c <type> API command type: get, set, create, delete
--returns, -r Include schema for returned data
--output <format> Output format
--verbose Enable verbose output--script, -s <file> Script file to execute
--only-result, -r Only show result (no prompts)The interactive shell stores data in the application data directory:
| Platform | Location |
|---|---|
| Windows | %APPDATA%\cv4pve-cli\ |
| Linux | ~/.config/cv4pve-cli/ |
| macOS | ~/.config/cv4pve-cli/ |
Stored files:
api-cache_{host}_{version}.json- API metadata cache (per host/version)history.txt- Command history (last 100 commands)alias.txt- Custom command aliases
Use clear-cache and clear-history commands inside the shell to manage these files.
Professional support and consulting available through Corsinvest.
Part of cv4pve suite | Made with ❤️ in Italy by Corsinvest
Copyright © Corsinvest Srl