Skip to main content

Proxmox VM & container inventory CLI

Project description

pxinv

A fast CLI for inventorying and managing VMs and containers on your Proxmox homelab.

pxinv demo

Installation

pip install pxinv

Quick start

# Single host
export PXINV_HOST=192.168.1.10
export PXINV_TOKEN_NAME=pxinv
export PXINV_TOKEN_VALUE=<secret>
export PXINV_VERIFY_SSL=false

pxinv list
pxinv summary
pxinv watch

For persistent config, create ~/.config/pxinv/config.yaml:

# Single host
host: 192.168.1.10
user: root@pam
token_name: pxinv
token_value: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
verify_ssl: false
# Multiple clusters
clusters:
  home:
    host: 192.168.1.10
    token_name: pxinv
    token_value: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    verify_ssl: false
  vps:
    host: 95.216.x.x
    token_name: pxinv
    token_value: yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy

Commands

Command Description
pxinv list List all VMs and containers
pxinv watch Live-refresh list (press Ctrl+C to exit)
pxinv summary Cluster resource totals and node status
pxinv start <vmid> Start a VM or container
pxinv stop <vmid> Gracefully shut down a VM or container
pxinv restart <vmid> Reboot a VM or container
pxinv snapshots <vmid> List snapshots of a VM or container
pxinv snapshot create <vmid> <name> Create a snapshot
pxinv snapshot delete <vmid> <name> Delete a snapshot
pxinv ansible-inventory Export Ansible dynamic inventory JSON
pxinv clusters List configured clusters

Use pxinv <command> --help for full options on any command.

Key features

Filteringpxinv list and pxinv watch support --node, --type, --status, and --tags. Tag matching is case-insensitive and supports multiple tags per VM.

Output formatspxinv list, pxinv summary, and pxinv snapshots support --output table/json/yaml.

Multi-cluster — define multiple Proxmox hosts in your config and switch between them with --cluster <name>. When multiple clusters are active, a CLUSTER column appears automatically.

Ansible integrationpxinv ansible-inventory groups hosts by status, tag, and cluster. Add --with-ips to fetch IPs via QEMU guest agent.

Self-signed certs — use --no-verify-ssl or PXINV_VERIFY_SSL=false.

Authentication

pxinv uses Proxmox API tokens. To create one: Datacenter → Permissions → API Tokens → Add. Required permissions: VM.Audit and Sys.Audit on /.

Contributing

git clone https://github.com/thetechiejourney/pxinv
cd pxinv
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

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

pxinv-1.3.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

pxinv-1.3.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file pxinv-1.3.0.tar.gz.

File metadata

  • Download URL: pxinv-1.3.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pxinv-1.3.0.tar.gz
Algorithm Hash digest
SHA256 ead36f62fdcd41557fc6244b8406d0b2fe0742bc2b03b774ac2da779f39fd3c3
MD5 341c8456c701d81d155b42892cf5ddac
BLAKE2b-256 a4e39d5f8213d9400c0036b12639609b61a2de43fb746aa239ad0def5403b5e8

See more details on using hashes here.

File details

Details for the file pxinv-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: pxinv-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pxinv-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71e523abb574e9869b6c9da091ba85c5d782208fa112ffaac4b109749631a195
MD5 ea99232435e0a18c7e690ce7ce5e19a4
BLAKE2b-256 3a0d235112e9de034fe64a5cf5e72d6f2f17236bbe3a55be86e61c5ac0f8ec0c

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