CC

corsinvest/cv4pve-cli

Developer tools
85 stars 품질 55 트렌드 55

cv4pve-cli is to Proxmox VE what kubectl is to Kubernetes — a remote-first CLI with context switching, direct API access, and aliases for common operations.

개요

cv4pve-cli is to Proxmox VE what kubectl is to Kubernetes — a remote-first CLI with context switching, direct API access, and aliases for common operations.

README

cv4pve-cli

   ______                _                      __
  / ____/___  __________(_)___ _   _____  _____/ /_
 / /   / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_
\____/\____/_/  /____/_/_/ /_/|___/\___/____/\__/

Command Line Interface for Proxmox VE (Made in Italy)

cv4pve-cli is to Proxmox VE what kubectl is to Kubernetes — a remote-first CLI with context switching, direct API access, and aliases for common operations. Think of it as pvesh, but running from your workstation, supporting multiple clusters, and with tab completion that queries the live API.


Quick Start

# 1. Add a context (connection profile)
cv4pve-cli config add homelab --host 192.168.1.100 --username root@pam --password secret

# 2. Use it
cv4pve-cli config use homelab

# 3. Run commands
cv4pve-cli api get /nodes
cv4pve-cli top

Installation

Platform Command
Windows winget install Corsinvest.cv4pve.cli
Arch Linux yay -S cv4pve-cli
Debian/Ubuntu sudo dpkg -i cv4pve-cli-VERSION-ARCH.deb
RHEL/Fedora sudo rpm -i cv4pve-cli-VERSION-ARCH.rpm
macOS brew tap Corsinvest/homebrew-tap && brew install cv4pve-cli
Linux / manual Download zip from Releases, chmod +x cv4pve-cli, sudo mv cv4pve-cli /usr/local/bin/

Features

  • Self-contained binary — no runtime to install, copy and run
  • Cross-platform — Windows, Linux, macOS
  • Multiple clusters — save and switch between connection profiles (contexts)
  • Direct API access — full Proxmox VE REST API via api get/set/create/delete
  • 300+ built-in aliases — shortcuts for common operations (start, stop, snapshot, migrate, …)
  • Guest auto-resolution — use --guest instead of typing node, vmtype and vmid
  • Async task support — add --wait to any command, or use task log --follow to tail a running task
  • Tab completion — bash, zsh and PowerShell, queries the live API
  • API schema cached locally — refreshed automatically on PVE upgrade
  • Scriptable — semantic exit codes, errors on stderr
pvesh kubectl cv4pve-cli
Direct API access yes yes yes
Runs remotely (off-node) no yes yes
Multiple clusters / contexts no yes yes
Tab completion (live) yes (local only) yes yes
Aliases / shortcuts no yes yes

Configuration

All configuration is managed through the config subcommand. Contexts are connection profiles — each stores a host, credentials, and port.

File locations

Platform Base path
Linux / macOS ~/.cv4pve/cli/
Windows %USERPROFILE%\.cv4pve\cli\

Files are in YAML format and can be edited directly.

File Content
config Contexts (connection profiles)
alias User-defined aliases
cache/.json API schema cache (auto-generated)

API Commands

cv4pve-cli api get     [--key value ...]
cv4pve-cli api set     [--key value ...]
cv4pve-cli api create  [--key value ...]
cv4pve-cli api delete 
cv4pve-cli api ls     
cv4pve-cli api usage   [method] [--returns] [--output ]
cv4pve-cli api get /cluster/resources --type vm
cv4pve-cli api set /nodes/pve1/qemu/100/config --memory 4096 --cores 2
cv4pve-cli api create /nodes/pve1/qemu/100/snapshot --snapname before-update
cv4pve-cli api delete /nodes/pve1/qemu/100/snapshot/before-update

Output formats

--output / -o: text (default), json, jsonpretty, html, markdown

cv4pve-cli api get /nodes --output json
cv4pve-cli api usage /nodes/{node}/qemu/{vmid}/config get --returns --output json

Aliases

Aliases are shortcuts for API commands. Placeholders like {node}, {vmid} are filled positionally at runtime.

Built-in aliases

300+ read-only aliases are available out of the box — see the full alias reference or run cv4pve-cli alias list. A few examples:

Alias Arguments Description
top — Cluster resource overview
get vms — List all VMs (cluster-wide)
show vm Show VM config
do start vm Start a VM
create vm snapshot Create a VM snapshot
get cluster not-backed-up — List guests with no backup job

Aliases prefixed with guest work for both VMs and containers — {vmtype} is resolved automatically:

Alias Arguments Description
get guests — List all VMs and containers
show guest Show guest config
do start guest Start a guest
do stop guest Stop a guest
create guest snapshot Create a snapshot
do rollback guest Rollback to a snapshot
delete guest Destroy a guest (permanent!)

The same operation is available at three levels — guest (both VM and CT), vm (qemu only), ct (lxc only):

cv4pve-cli create guest snapshot --guest myvm  snap1 "before update"  # VM or CT — by name
cv4pve-cli create guest snapshot --guest 100   snap1 "before update"  # VM or CT — by id
cv4pve-cli create vm snapshot pve1 100 snap1 "before update"           # VM only
cv4pve-cli create ct snapshot pve1 200 snap1 "before update"           # CT only
cv4pve-cli alias list
cv4pve-cli alias list --verbose        # includes command and placeholder args
cv4pve-cli alias list --search snap    # filter by keyword

Guest auto-resolution (--guest)

Aliases whose path targets a specific guest accept --guest . The CLI resolves node, vmid and vmtype automatically from the cluster.

# Without --guest (explicit)
cv4pve-cli do start vm pve1 100

# With --guest (auto-resolve)
cv4pve-cli do start vm --guest 100
cv4pve-cli do start vm --guest myvm
cv4pve-cli get ct status --guest myct
cv4pve-cli create guest snapshot --guest myvm snap1 "before update"

Tab completion on --guest shows all VM and container names and IDs live from the cluster.

To check if an alias supports --guest, run it with --help — the description will contain:

Tip: use --guest  to resolve guest info automatically

User aliases

# Add
cv4pve-cli alias add vm-net \
    --command "get /nodes/{node}/qemu/{vmid}/config" \
    --description "Show VM network config"

# Use
cv4pve-cli vm-net pve1 100

# Remove
cv4pve-cli alias remove vm-net

Built-in aliases cannot be modified or removed.


Tab Completion

Tab completion is registered automatically on first run. Open a new terminal to activate it, or reload your profile:

Shell Command
PowerShell . $PROFILE
Bash source ~/.bashrc
Zsh source ~/.zshrc

To force re-registration: cv4pve-cli completion reset

What completes

Typing TAB suggests
cv4pve-cli api, config, alias, top, get, do, …
cv4pve-cli api get /nodes/ node names live from API
cv4pve-cli api get /nodes/pve1/qemu/ VM IDs live from API
cv4pve-cli api get /nodes/pve1/qemu/100/config parameter names
cv4pve-cli show vm pve1 VM IDs live from API
cv4pve-cli config use context names

Documentation

  • Command reference — core commands (config, api, alias, completion), global options, guest auto-resolution
  • Alias reference — the full list of 300+ built-in aliases
  • AI coding assistants — running cv4pve-cli inside Claude Code, Codex and similar sandboxed agents

Using with AI coding assistants

Tips for running cv4pve-cli inside Claude Code, Codex and similar sandboxed agents (self-signed certs, sandbox permissions, SKILL.md template): see docs/AI-AGENTS.md.


Support

Professional support available through Corsinvest.

Part of cv4pve suite | Made with ❤️ in Italy by Corsinvest

Copyright © Corsinvest Srl

View this README on GitHub

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add corsinvest/cv4pve-cli