feat(cli): add update command to check and update globally installed @git.zone packages

This commit is contained in:
2026-02-03 22:47:08 +00:00
parent abaeb7be6c
commit 019f7e2d88
14 changed files with 397 additions and 19 deletions

View File

@@ -1,13 +1,23 @@
import * as plugins from './tools.plugins.js';
import * as modUpdate from './mod_update/index.js';
export const run = async () => {
const toolsCli = new plugins.smartcli.Smartcli();
toolsCli.standardCommand().subscribe(async (argvArg) => {
console.log('@git.zone/tools - CLI placeholder');
console.log('No commands implemented yet.');
console.log('@git.zone/tools - CLI utility for managing @git.zone packages\n');
console.log('Commands:');
console.log(' update Check and update globally installed @git.zone packages');
console.log(' update -y Update without confirmation prompt');
console.log('');
console.log('Use "gtools <command> --help" for more information about a command.');
});
toolsCli.addVersion('2.0.22');
toolsCli.addCommand('update').subscribe(async (argvArg) => {
const yesFlag = argvArg.y === true || argvArg.yes === true;
await modUpdate.run({ yes: yesFlag });
});
toolsCli.addVersion('3.0.0');
toolsCli.startParse();
};