$ show PVE-Tools/PVE-Tools-9
PVE-Tools is a comprehensive, interactive Bash administration toolkit for Proxmox VE 9.x (Debian 13 Trixie). It provides a menu-driven CLI that wraps native PVE commands (qm, pct, pvesm, etc.) to automate common hypervisor management tasks: system optimization, APT mirror switching, kernel/GRUB management, GPU passthrough (NVIDIA, AMD, Intel SR-IOV/GVT-g), VM/container backup/restore/clone/migration, host networking (bridge, bond, VLAN, IPv6, firewall), storage (Ceph, LVM, mount), security auditing and CVE mitigation, and third-party tool integration (FastPVE, CoolerControl, IT87 drivers). The tool is distributed as a single assembled script built from modular source files (lib/ + src/modules/) via build.sh, and can be installed as a system command or run directly. It features a two-tier confirmation system for high-risk actions, marker-based config block management for idempotent edits, and automatic backups under /var/backups/pve-tools/. The UI is primarily Chinese with a branded ASCII banner and community channels built in.
The LLM identified 5 files worth highlighting for reuse:
Provides reusable functions for marker-based config block management (apply_block/remove_block), file backup with timestamped copies, GRUB parameter add/remove/check via key-based array manipulation, and logging/feedback utilities. These patterns are self-contained and can be extracted for any Bash project needing safe, idempotent system configuration edits.
Implements a generic interactive menu framework (run_menu) with render/dispatch separation, prompt helpers (prompt_value, prompt_yes_no, prompt_pick_from_list), and EOF/Ctrl+C guards. This pattern is reusable across any Bash CLI tool requiring structured, user-friendly menus.
Contains functions for automatic network region detection (via Cloudflare trace), mirror selection from a parallel-array registry of ~24 Chinese mirrors, and UPS service management. The region-aware mirror selection pattern is reusable for any tool that needs to optimize download sources based on geographic location.
Implements a candidate-file staging pattern for editing /etc/network/interfaces: edits are written to a temporary candidate file, then committed via pvenetcommit/ifreload with a risk confirmation step and automatic rollback on failure. This pattern is reusable for any system that needs safe, auditable network configuration changes.
Provides a storage abstraction layer over PVE storage commands: functions to list storage content by type (backup, ISO, container template, VM disk), select storage by content type, and discover backup files. This pattern is reusable for any tool that needs to interact with Proxmox storage pools in a type-safe manner.