feat(cli): Add initial MOXYTOOL implementation, packaging, install/uninstall scripts, CI and release workflows

This commit is contained in:
2025-10-27 11:27:44 +00:00
commit 71e283bcd5
23 changed files with 1932 additions and 0 deletions
+172
View File
@@ -0,0 +1,172 @@
# MOXYTOOL
> Proxmox Administration Tool for vGPU setup, VM management, and cluster configuration
[![npm version](https://badge.fury.io/js/@serve.zone%2Fmoxytool.svg)](https://www.npmjs.com/package/@serve.zone/moxytool)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
## Overview
MOXYTOOL is a comprehensive command-line tool for managing Proxmox servers, with a focus on simplified vGPU setup and advanced server configuration. Built with Deno and compiled to native binaries for maximum performance and portability.
## Features
- **vGPU Setup**: Automated installation and configuration of NVIDIA vGPU support on Proxmox
- **Cross-Platform**: Native binaries for Linux, macOS, and Windows
- **Multi-Architecture**: Support for x64 and ARM64 processors
- **Interactive CLI**: User-friendly command-line interface with detailed guidance
- **Proxmox Integration**: Deep integration with Proxmox VE for seamless management
## Installation
### Global Installation (Recommended)
```bash
npm install -g @serve.zone/moxytool
```
or with pnpm:
```bash
pnpm install -g @serve.zone/moxytool
```
### Local Installation
```bash
npm install @serve.zone/moxytool
```
## Usage
### vGPU Setup
Install and configure NVIDIA vGPU support on your Proxmox host:
```bash
sudo moxytool vgpu-setup
```
#### Arguments
- `--step <number>` - Force execution at a specific installation step
- `--url <url>` - Use a custom driver URL (.run or .zip format)
- `--file <path>` - Use a local driver file
- `--debug` - Enable debug output mode
#### Examples
```bash
# Basic setup with interactive prompts
sudo moxytool vgpu-setup
# Use a custom driver URL
sudo moxytool vgpu-setup --url https://example.com/driver.run
# Use a local driver file
sudo moxytool vgpu-setup --file /path/to/driver.run
# Resume at a specific step
sudo moxytool vgpu-setup --step 2
# Debug mode
sudo moxytool vgpu-setup --debug
```
### Installation Process
1. **Prerequisites**: Ensure virtualization is enabled in BIOS (Intel Vt-d or AMD IOMMU)
2. **Run Setup**: Execute `sudo moxytool vgpu-setup`
3. **Follow Prompts**: The installer will guide you through the process
4. **Reboot**: System will require a reboot after initial setup
5. **Complete Setup**: Run the command again after reboot to finish installation
6. **Verify**: Check installation with `mdevctl types`
### Post-Installation
After successful installation:
1. **Verify vGPU profiles**: `mdevctl types`
2. **Configure VMs**: Add vGPU devices in Proxmox web UI (VM → Hardware → Add → PCI Device)
3. **Install guest drivers**: Download and install NVIDIA vGPU guest drivers in your VMs
## Requirements
- Proxmox VE 7.4+ or 8.x
- NVIDIA GPU with vGPU support
- Root/sudo access
- Internet connection for downloading drivers
## Supported Platforms
- **Linux**: x64, ARM64
- **macOS**: x64, ARM64 (Apple Silicon)
- **Windows**: x64
## Development
### Prerequisites
- Deno 1.x or later
- Bash (for compilation scripts)
### Building from Source
```bash
# Clone the repository
git clone https://code.foss.global/serve.zone/moxytool.git
cd moxytool
# Run locally with Deno
deno task dev
# Compile binaries for all platforms
deno task compile:all
# Run tests
deno task test
```
### Project Structure
```
moxytool/
├── mod.ts # Main entry point
├── deno.json # Deno configuration
├── package.json # NPM package manifest
├── ts/ # TypeScript source files
│ ├── moxytool.cli.ts # CLI command definitions
│ ├── moxytool.plugins.ts # Plugin imports
│ ├── moxytool.logging.ts # Logging setup
│ ├── moxytool.paths.ts # Path definitions
│ └── index.ts # Node.js entry point
├── bin/ # Binary wrapper
│ └── moxytool-wrapper.js # NPM binary wrapper
├── scripts/ # Build scripts
│ ├── compile-all.sh # Compilation script
│ └── install-binary.js # Binary installation
└── dist/ # Compiled binaries
└── binaries/
```
## Credits
MOXYTOOL uses the excellent [proxmox-vgpu-installer](https://github.com/anomixer/proxmox-vgpu-installer) by anomixer for the core vGPU installation process, which supports Proxmox v9.
## License
MIT License - see [LICENSE](license) file for details
## Support
- **Issues**: [https://code.foss.global/serve.zone/moxytool/issues](https://code.foss.global/serve.zone/moxytool/issues)
- **Repository**: [https://code.foss.global/serve.zone/moxytool](https://code.foss.global/serve.zone/moxytool)
## Related Projects
- [NUPST](https://code.foss.global/serve.zone/nupst) - Network UPS Shutdown Tool
- [SPARK](https://code.foss.global/serve.zone/spark) - Server Configuration and Management Tool
---
Made with ❤️ by [Serve Zone](https://serve.zone)