Skip to content

jon-the-dev/proxbox

ProxBox

CI/CD PyPI version Python versions License: GPL v3 Code style: black

ProxBox - Your Proxmox toolbox for secure VM automation

ProxBox is a modern Python package and CLI tool for automating Proxmox VE operations with a focus on security, reliability, and operational excellence.

✨ Features

  • πŸš€ Template Creation - Automated Ubuntu cloud-init template creation from official images
  • πŸ–₯️ VM Management - Clone, start, stop, and manage VMs with ease
  • πŸ”’ Security First - Input validation, sanitization, and command injection prevention
  • πŸ“Š Rich UI - Progress bars, colored output, and helpful error messages
  • πŸ”„ Retry Logic - Automatic retry with exponential backoff for network operations
  • βœ… Type Safe - Full type hints and mypy compliance
  • πŸ§ͺ Well Tested - Comprehensive test suite with >80% coverage
  • πŸ“š Documented - Extensive documentation with examples

πŸ“¦ Installation

pip install proxbox

πŸš€ Quick Start

Create an Ubuntu Template

# Create Ubuntu 22.04 LTS template
proxbox create-template jammy 9001 --ssh-key ~/.ssh/id_rsa.pub

# Create template with custom settings
proxbox create-template noble 9002 \
    --name my-ubuntu-template \
    --memory 4096 \
    --disk-increase 50

Clone and Manage VMs

# Clone a VM from template and start it
proxbox create-vm 9001 190 my-ubuntu-vm --start

# Check VM status
proxbox status 190

# Stop a VM
proxbox stop 190

# Delete a VM (with confirmation)
proxbox delete 190

πŸ“– Documentation

Full documentation is available at: https://zerodaysec.github.io/proxmox-utilities

πŸ”§ Configuration

Configure via environment variables or .env file:

# SSH key for cloud-init
export PROXMOX_SSH_KEY_PATH="$HOME/.ssh/id_ed25519.pub"

# Storage configuration
export PROXMOX_DATA_STORE="local-lvm"
export PROXMOX_VM_BRIDGE="vmbr0"

# Template defaults
export PROXMOX_TEMPLATE_MEMORY_MB=2048
export PROXMOX_TEMPLATE_DISK_INCREASE_GB=30

See Configuration Guide for all options.

πŸ”’ Security

Security is a top priority. This project includes:

  • βœ… Input validation and sanitization
  • βœ… Command injection prevention
  • βœ… No hardcoded secrets
  • βœ… Automated security scanning (Bandit, pip-audit)
  • βœ… Type safety with mypy
  • βœ… Comprehensive test coverage

See Security Documentation for details.

πŸ†š Comparison with Shell Scripts

Feature Shell Scripts (v0.0.1) Python Package (v0.1.0+)
Security ⚠️ Basic βœ… Comprehensive
Error Handling ❌ Minimal βœ… Robust
Testing ❌ None βœ… >80% coverage
Type Safety ❌ No βœ… Full type hints
Progress Tracking ❌ No βœ… Rich UI
Retry Logic ❌ No βœ… Automatic
Documentation ⚠️ Comments only βœ… Full docs site
Package Management ❌ Manual download βœ… pip install

πŸ› οΈ Development

Setup Development Environment

git clone https://github.com/zerodaysec/proxmox-utilities.git
cd proxmox-utilities
pip install -e ".[dev,docs,security]"
pre-commit install

Run Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=src/proxbox --cov-report=html

# Run specific tests
pytest tests/test_template.py -v

Code Quality

# Format code
black src/ tests/

# Lint
ruff check src/ tests/

# Type check
mypy src/

# Security scan
bandit -r src/

Build Documentation

# Serve locally
mkdocs serve

# Build
mkdocs build

πŸ“ Changelog

See CHANGELOG.md for version history and migration guides.

🀝 Contributing

Contributions are welcome! Please see Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (pytest)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

πŸ“œ License

This project is licensed under the GNU General Public License v3.0 or later (GPLv3+).

See LICENSE for the full license text.

πŸ‘¨β€πŸ’» Author

ZeroDay Security

πŸ™ Acknowledgments

  • Proxmox VE team for excellent virtualization platform
  • Ubuntu for cloud images
  • Python community for amazing tools and libraries

πŸ“ž Support


Made with ❀️ by ZeroDay Security

About

No description or website provided.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors