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

48
mod.ts Normal file
View File

@@ -0,0 +1,48 @@
#!/usr/bin/env -S deno run --allow-all
/**
* MOXYTOOL - Proxmox Administration Tool
*
* A comprehensive CLI tool for managing Proxmox servers, including:
* - vGPU setup and configuration
* - VM management
* - Cluster configuration
* - Automated maintenance tasks
*
* Required Permissions:
* - --allow-net: Network access for downloading installers
* - --allow-read: Read configuration files
* - --allow-write: Write configuration files, logs
* - --allow-run: Execute system commands (git, bash, systemctl)
* - --allow-sys: Access system information
* - --allow-env: Read environment variables
*
* @module
*/
import * as cli from './ts/moxytool.cli.ts';
/**
* Main entry point for the MOXYTOOL application
* Sets up the CLI environment and executes the requested command
*/
async function main(): Promise<void> {
// Set environment variable to indicate CLI call
Deno.env.set('CLI_CALL', 'true');
// Execute the CLI
await cli.runCli();
}
// Execute main and handle errors
if (import.meta.main) {
try {
await main();
} catch (error) {
console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
Deno.exit(1);
}
}
// Export for library usage
export * from './ts/index.ts';