orquesta-cli 0.2.28 → 0.2.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +36 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -48,6 +48,29 @@ async function runHookEnable(opts) {
|
|
|
48
48
|
const preferredProjectId = opts.project || (opts.ignoreSaved || opts.token ? undefined : savedProjectId);
|
|
49
49
|
await initHooks(token, undefined, preferredProjectId);
|
|
50
50
|
}
|
|
51
|
+
async function runUpdate() {
|
|
52
|
+
const ora = (await import('ora')).default;
|
|
53
|
+
const { checkForCliUpdate, runCliUpdate, setSkippedVersion } = await import('./utils/update-checker.js');
|
|
54
|
+
const spinner = ora({ text: chalk.cyan('Checking npm for a newer version…'), color: 'cyan' }).start();
|
|
55
|
+
const info = await checkForCliUpdate(packageJson.version);
|
|
56
|
+
if (!info) {
|
|
57
|
+
spinner.succeed(chalk.green(`You're on the latest version (v${packageJson.version}).`));
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
spinner.text = chalk.cyan(`Updating v${info.current} → v${info.latest}…`);
|
|
61
|
+
const result = await runCliUpdate(info.latest, (line) => {
|
|
62
|
+
if (line)
|
|
63
|
+
spinner.text = chalk.dim(line.replace(/\s+/g, ' ').slice(0, 70));
|
|
64
|
+
});
|
|
65
|
+
if (result.success) {
|
|
66
|
+
setSkippedVersion(info.latest);
|
|
67
|
+
spinner.succeed(chalk.green(`Updated to v${info.latest}. Restart orquesta to use it.`));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
spinner.fail(chalk.red(result.error || 'Update failed'));
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
51
74
|
program
|
|
52
75
|
.name('orquesta')
|
|
53
76
|
.description('Orquesta CLI - AI-powered coding assistant with local LLM support')
|
|
@@ -72,6 +95,7 @@ program
|
|
|
72
95
|
.option('--add-provider <providerId>', 'Add a specific provider by ID (e.g., openai, anthropic, ollama)')
|
|
73
96
|
.option('--init', 'Enable the Claude Code hook in this directory (reuses your login; or pass --token)')
|
|
74
97
|
.option('--disable-hook', 'Disable the Claude Code hook in this directory')
|
|
98
|
+
.option('--update', 'Update orquesta-cli to the latest published version and exit')
|
|
75
99
|
.action(async (options) => {
|
|
76
100
|
if (options.appendSystemPrompt) {
|
|
77
101
|
setAppendedSystemPrompt(options.appendSystemPrompt);
|
|
@@ -80,6 +104,10 @@ program
|
|
|
80
104
|
await runEvalMode();
|
|
81
105
|
return;
|
|
82
106
|
}
|
|
107
|
+
if (options.update) {
|
|
108
|
+
await runUpdate();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
83
111
|
if (options.init) {
|
|
84
112
|
await runHookEnable({ token: options.token, project: options.project });
|
|
85
113
|
return;
|
|
@@ -348,6 +376,13 @@ hook
|
|
|
348
376
|
showConnectionStatus();
|
|
349
377
|
process.exit(0);
|
|
350
378
|
});
|
|
379
|
+
program
|
|
380
|
+
.command('update')
|
|
381
|
+
.description('Update orquesta-cli to the latest published version')
|
|
382
|
+
.action(async () => {
|
|
383
|
+
await runUpdate();
|
|
384
|
+
process.exit(0);
|
|
385
|
+
});
|
|
351
386
|
program.showHelpAfterError(false);
|
|
352
387
|
program.configureOutput({
|
|
353
388
|
outputError: (str, write) => {
|
|
@@ -371,6 +406,7 @@ program.on('command:*', () => {
|
|
|
371
406
|
console.log(chalk.white(' hook switch Move this directory to another project\n'));
|
|
372
407
|
console.log(chalk.white(' hook disable Disable the Claude Code hook here\n'));
|
|
373
408
|
console.log(chalk.white(' hook status Show the hook + target project here\n'));
|
|
409
|
+
console.log(chalk.white(' update Update orquesta-cli to the latest version\n'));
|
|
374
410
|
console.log(chalk.white(' --sync Sync configurations with Orquesta\n'));
|
|
375
411
|
console.log(chalk.white(' --disconnect Disconnect from Orquesta\n'));
|
|
376
412
|
console.log(chalk.white(' --scan Scan for available LLM providers\n'));
|