Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad7e9b0b46 | |||
| 8cf016f0d8 | |||
| 626cfe30ba | |||
| 45ac9af405 | |||
| d832343b38 | |||
| b38c99aaa0 | |||
| e379d60c65 | |||
| 99b68c9bb0 | |||
| 32d38975ec | |||
| 4ac2d99c32 | |||
| 9265670e63 | |||
| 9341b9cd16 | |||
| 8e6418a574 | |||
| 33609bff9a | |||
| ef7bab3e32 | |||
| 723dca735f |
54
changelog.md
54
changelog.md
@@ -1,5 +1,59 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.4.1 - fix(cli)
|
||||||
|
Fallback to 'unknown' when script.slug is missing in scripts list
|
||||||
|
|
||||||
|
- Fixes a potential runtime error when listing scripts if a script entry lacks a slug
|
||||||
|
- Uses a safe fallback ('unknown') before calling padEnd to ensure stable output
|
||||||
|
- Modified file: ts/moxytool.cli.ts
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.4.0 - feat(cli)
|
||||||
|
Improve CLI output and logging with colored header, grouped script listings, and ANSI-styled logger
|
||||||
|
|
||||||
|
- Set smartcli instance version from deno.json to surface the package version in the CLI
|
||||||
|
- Revamp standard command output with a colored ASCII header, clearer commands list, and improved usage line
|
||||||
|
- Group script index output by type including Proxmox VE host (pve), Containers (ct), Virtual Machines (vm), and Other
|
||||||
|
- Enhance scripts listing formatting (slug padding and bullet points) for readability
|
||||||
|
- Replace timestamped logger messages with ANSI-colored output and icons for error/warn/success/info
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.3.6 - fix(deps)
|
||||||
|
Bump smartcli dependency and add local settings file
|
||||||
|
|
||||||
|
- Bumped @push.rocks/smartcli from ^4.0.18 to ^4.0.19 in deno.json
|
||||||
|
- Added .claude/settings.local.json (development/local settings file)
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.3.5 - fix(smartcli)
|
||||||
|
Bump @push.rocks/smartcli to ^4.0.18 and add local settings file for tooling permissions
|
||||||
|
|
||||||
|
- Updated dependency @push.rocks/smartcli from ^4.0.16 to ^4.0.18 in deno.json
|
||||||
|
- Added a local settings file (.claude/settings.local.json) to configure runtime/tooling permissions (web fetch domains, bash/deno/npm command allowances, and local read access)
|
||||||
|
- No code API changes; this is a dependency/infra update — incrementing patch version
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.3.4 - fix(smartcli)
|
||||||
|
Update @push.rocks/smartcli to ^4.0.16 and add local Claude settings
|
||||||
|
|
||||||
|
- Bump dependency in deno.json: @push.rocks/smartcli from ^4.0.15 to ^4.0.16
|
||||||
|
- Add .claude/settings.local.json containing local permissions/configuration (development/local-only file)
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.3.3 - fix(deno.json)
|
||||||
|
Bump @push.rocks/smartcli to ^4.0.15 and add local Claude settings
|
||||||
|
|
||||||
|
- Updated deno.json: @push.rocks/smartcli ^4.0.14 → ^4.0.15
|
||||||
|
- Added .claude/settings.local.json with local permissions for development/CI
|
||||||
|
- No runtime source changes; dependency update only — recommend a patch release
|
||||||
|
|
||||||
|
## 2025-10-28 - 1.3.2 - fix(cli)
|
||||||
|
Correct scripts subcommand argument parsing and bump smartcli dependency
|
||||||
|
|
||||||
|
- Fix scripts command argument indices so the subcommand is read from argvArg._[1] and subsequent arguments from argvArg._[2]. This resolves incorrect handling of 'scripts search', 'scripts info' and 'scripts run' inputs.
|
||||||
|
- Upgrade @push.rocks/smartcli dependency from ^4.0.11 to ^4.0.14 in deno.json for compatibility/stability improvements.
|
||||||
|
|
||||||
|
## 2025-10-27 - 1.3.1 - fix(publish)
|
||||||
|
Switch publish registry to internal Verdaccio instance and add local CI settings
|
||||||
|
|
||||||
|
- Update package.json publishConfig.registry from https://registry.npmjs.org/ to https://verdaccio.lossless.digital/ to publish packages to the internal Verdaccio registry.
|
||||||
|
- Add .claude/settings.local.json to include local CI/dev settings (local configuration only).
|
||||||
|
|
||||||
## 2025-10-27 - 1.3.0 - feat(cli)
|
## 2025-10-27 - 1.3.0 - feat(cli)
|
||||||
Add automatic update command and documentation updates
|
Add automatic update command and documentation updates
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/moxytool",
|
"name": "@serve.zone/moxytool",
|
||||||
"version": "1.3.0",
|
"version": "1.4.1",
|
||||||
"exports": "./mod.ts",
|
"exports": "./mod.ts",
|
||||||
"nodeModulesDir": "auto",
|
"nodeModulesDir": "auto",
|
||||||
"tasks": {
|
"tasks": {
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"@push.rocks/npmextra": "npm:@push.rocks/npmextra@^5.1.2",
|
"@push.rocks/npmextra": "npm:@push.rocks/npmextra@^5.1.2",
|
||||||
"@push.rocks/projectinfo": "npm:@push.rocks/projectinfo@^5.0.1",
|
"@push.rocks/projectinfo": "npm:@push.rocks/projectinfo@^5.0.1",
|
||||||
"@push.rocks/qenv": "npm:@push.rocks/qenv@^6.1.0",
|
"@push.rocks/qenv": "npm:@push.rocks/qenv@^6.1.0",
|
||||||
"@push.rocks/smartcli": "npm:@push.rocks/smartcli@^4.0.11",
|
"@push.rocks/smartcli": "npm:@push.rocks/smartcli@^4.0.19",
|
||||||
"@push.rocks/smartdelay": "npm:@push.rocks/smartdelay@^3.0.5",
|
"@push.rocks/smartdelay": "npm:@push.rocks/smartdelay@^3.0.5",
|
||||||
"@push.rocks/smartfile": "npm:@push.rocks/smartfile@^11.0.23",
|
"@push.rocks/smartfile": "npm:@push.rocks/smartfile@^11.0.23",
|
||||||
"@push.rocks/smartjson": "npm:@push.rocks/smartjson@^5.0.20",
|
"@push.rocks/smartjson": "npm:@push.rocks/smartjson@^5.0.20",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/moxytool",
|
"name": "@serve.zone/moxytool",
|
||||||
"version": "1.3.0",
|
"version": "1.4.1",
|
||||||
"description": "Proxmox administration tool for vGPU setup, VM management, and cluster configuration",
|
"description": "Proxmox administration tool for vGPU setup, VM management, and cluster configuration",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"proxmox",
|
"proxmox",
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://verdaccio.lossless.digital/"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34"
|
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/moxytool',
|
name: '@serve.zone/moxytool',
|
||||||
version: '1.3.0',
|
version: '1.4.1',
|
||||||
description: 'Proxmox administration tool for vGPU setup, VM management, and cluster configuration'
|
description: 'Proxmox administration tool for vGPU setup, VM management, and cluster configuration'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import * as paths from './moxytool.paths.ts';
|
|||||||
import { logger } from './moxytool.logging.ts';
|
import { logger } from './moxytool.logging.ts';
|
||||||
import { ScriptIndex } from './moxytool.classes.scriptindex.ts';
|
import { ScriptIndex } from './moxytool.classes.scriptindex.ts';
|
||||||
import { ScriptRunner } from './moxytool.classes.scriptrunner.ts';
|
import { ScriptRunner } from './moxytool.classes.scriptrunner.ts';
|
||||||
|
import denoConfig from '../deno.json' with { type: 'json' };
|
||||||
|
|
||||||
export const runCli = async () => {
|
export const runCli = async () => {
|
||||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
@@ -10,6 +11,7 @@ export const runCli = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const smartcliInstance = new plugins.smartcli.Smartcli();
|
const smartcliInstance = new plugins.smartcli.Smartcli();
|
||||||
|
smartcliInstance.version = denoConfig.version;
|
||||||
|
|
||||||
// Initialize script index and check if refresh is needed
|
// Initialize script index and check if refresh is needed
|
||||||
const scriptIndex = new ScriptIndex();
|
const scriptIndex = new ScriptIndex();
|
||||||
@@ -31,14 +33,16 @@ export const runCli = async () => {
|
|||||||
|
|
||||||
// Standard command (no arguments)
|
// Standard command (no arguments)
|
||||||
smartcliInstance.standardCommand().subscribe(async () => {
|
smartcliInstance.standardCommand().subscribe(async () => {
|
||||||
logger.log('info', 'MOXYTOOL - Proxmox Administration Tool');
|
console.log('\x1b[1m\x1b[36m╔════════════════════════════════════════════╗\x1b[0m');
|
||||||
logger.log('info', '');
|
console.log('\x1b[1m\x1b[36m║\x1b[0m \x1b[1mMOXYTOOL\x1b[0m - Proxmox Administration \x1b[1m\x1b[36m║\x1b[0m');
|
||||||
logger.log('info', 'Available commands:');
|
console.log('\x1b[1m\x1b[36m╚════════════════════════════════════════════╝\x1b[0m');
|
||||||
logger.log('info', '* vgpu-setup - Install and configure Proxmox vGPU support');
|
console.log('');
|
||||||
logger.log('info', '* scripts - Manage Proxmox community scripts');
|
console.log('\x1b[1mCommands:\x1b[0m');
|
||||||
logger.log('info', '* update - Update MOXYTOOL to the latest version');
|
console.log(' \x1b[36m►\x1b[0m vgpu-setup Install and configure Proxmox vGPU support');
|
||||||
logger.log('info', '');
|
console.log(' \x1b[36m►\x1b[0m scripts Manage Proxmox community scripts (400+)');
|
||||||
logger.log('info', 'Usage: moxytool <command> [options]');
|
console.log(' \x1b[36m►\x1b[0m update Update MOXYTOOL to the latest version');
|
||||||
|
console.log('');
|
||||||
|
console.log('\x1b[2mUsage: moxytool <command> [options]\x1b[0m');
|
||||||
});
|
});
|
||||||
|
|
||||||
// vGPU setup command
|
// vGPU setup command
|
||||||
@@ -204,7 +208,7 @@ export const runCli = async () => {
|
|||||||
|
|
||||||
// Scripts management commands
|
// Scripts management commands
|
||||||
smartcliInstance.addCommand('scripts').subscribe(async (argvArg) => {
|
smartcliInstance.addCommand('scripts').subscribe(async (argvArg) => {
|
||||||
const subcommand = argvArg._[0];
|
const subcommand = argvArg._[1]; // _[0] is 'scripts', _[1] is the subcommand
|
||||||
|
|
||||||
if (!subcommand) {
|
if (!subcommand) {
|
||||||
logger.log('info', 'MOXYTOOL Scripts - Proxmox Community Scripts Management');
|
logger.log('info', 'MOXYTOOL Scripts - Proxmox Community Scripts Management');
|
||||||
@@ -237,8 +241,18 @@ export const runCli = async () => {
|
|||||||
logger.log('info', '');
|
logger.log('info', '');
|
||||||
|
|
||||||
// Group by type
|
// Group by type
|
||||||
|
const pveScripts = scripts.filter(s => s.type === 'pve');
|
||||||
const containers = scripts.filter(s => s.type === 'ct');
|
const containers = scripts.filter(s => s.type === 'ct');
|
||||||
const vms = scripts.filter(s => s.type === 'vm');
|
const vms = scripts.filter(s => s.type === 'vm');
|
||||||
|
const otherScripts = scripts.filter(s => s.type !== 'pve' && s.type !== 'ct' && s.type !== 'vm');
|
||||||
|
|
||||||
|
if (pveScripts.length > 0) {
|
||||||
|
logger.log('info', 'Proxmox VE Host Scripts:');
|
||||||
|
pveScripts.forEach(script => {
|
||||||
|
logger.log('info', ` • ${script.slug.padEnd(25)} - ${script.name}`);
|
||||||
|
});
|
||||||
|
logger.log('info', '');
|
||||||
|
}
|
||||||
|
|
||||||
if (containers.length > 0) {
|
if (containers.length > 0) {
|
||||||
logger.log('info', 'Containers (LXC):');
|
logger.log('info', 'Containers (LXC):');
|
||||||
@@ -253,6 +267,15 @@ export const runCli = async () => {
|
|||||||
vms.forEach(script => {
|
vms.forEach(script => {
|
||||||
logger.log('info', ` • ${script.slug.padEnd(25)} - ${script.name}`);
|
logger.log('info', ` • ${script.slug.padEnd(25)} - ${script.name}`);
|
||||||
});
|
});
|
||||||
|
logger.log('info', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (otherScripts.length > 0) {
|
||||||
|
logger.log('info', 'Other:');
|
||||||
|
otherScripts.forEach(script => {
|
||||||
|
const slug = script.slug || 'unknown';
|
||||||
|
logger.log('info', ` • ${slug.padEnd(25)} - ${script.name} (${script.type})`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.log('info', '');
|
logger.log('info', '');
|
||||||
@@ -262,7 +285,7 @@ export const runCli = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'search': {
|
case 'search': {
|
||||||
const query = argvArg._[1];
|
const query = argvArg._[2]; // _[0]=scripts, _[1]=search, _[2]=query
|
||||||
|
|
||||||
if (!query) {
|
if (!query) {
|
||||||
logger.log('error', 'Please provide a search query');
|
logger.log('error', 'Please provide a search query');
|
||||||
@@ -292,7 +315,7 @@ export const runCli = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'info': {
|
case 'info': {
|
||||||
const slug = argvArg._[1];
|
const slug = argvArg._[2]; // _[0]=scripts, _[1]=info, _[2]=slug
|
||||||
|
|
||||||
if (!slug) {
|
if (!slug) {
|
||||||
logger.log('error', 'Please provide a script slug');
|
logger.log('error', 'Please provide a script slug');
|
||||||
@@ -368,7 +391,7 @@ export const runCli = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'run': {
|
case 'run': {
|
||||||
const slug = argvArg._[1];
|
const slug = argvArg._[2]; // _[0]=scripts, _[1]=run, _[2]=slug
|
||||||
|
|
||||||
if (!slug) {
|
if (!slug) {
|
||||||
logger.log('error', 'Please provide a script slug');
|
logger.log('error', 'Please provide a script slug');
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
import * as plugins from './moxytool.plugins.ts';
|
import * as plugins from './moxytool.plugins.ts';
|
||||||
|
|
||||||
|
// ANSI color codes
|
||||||
|
const colors = {
|
||||||
|
reset: '\x1b[0m',
|
||||||
|
bright: '\x1b[1m',
|
||||||
|
dim: '\x1b[2m',
|
||||||
|
red: '\x1b[31m',
|
||||||
|
green: '\x1b[32m',
|
||||||
|
yellow: '\x1b[33m',
|
||||||
|
blue: '\x1b[34m',
|
||||||
|
magenta: '\x1b[35m',
|
||||||
|
cyan: '\x1b[36m',
|
||||||
|
white: '\x1b[37m',
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple logger class for MOXYTOOL
|
* A simple logger class for MOXYTOOL
|
||||||
*/
|
*/
|
||||||
@@ -14,22 +28,20 @@ class Logger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public log(level: string, message: string): void {
|
public log(level: string, message: string): void {
|
||||||
const timestamp = new Date().toISOString();
|
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 'error':
|
case 'error':
|
||||||
console.error(`[${timestamp}] [ERROR] ${message}`);
|
console.error(`${colors.red}✗ ${message}${colors.reset}`);
|
||||||
break;
|
break;
|
||||||
case 'warn':
|
case 'warn':
|
||||||
console.warn(`[${timestamp}] [WARN] ${message}`);
|
console.warn(`${colors.yellow}⚠ ${message}${colors.reset}`);
|
||||||
break;
|
break;
|
||||||
case 'ok':
|
case 'ok':
|
||||||
case 'success':
|
case 'success':
|
||||||
console.log(`[${timestamp}] [OK] ${message}`);
|
console.log(`${colors.green}✓ ${message}${colors.reset}`);
|
||||||
break;
|
break;
|
||||||
case 'info':
|
case 'info':
|
||||||
default:
|
default:
|
||||||
console.log(`[${timestamp}] [INFO] ${message}`);
|
console.log(message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user