lokuma-cli 1.3.1 → 1.3.2
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/README.md +6 -0
- package/dist/index.js +13 -3
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -456,7 +456,7 @@ async function authLoginCommand() {
|
|
|
456
456
|
// src/commands/update.ts
|
|
457
457
|
import { execSync } from "node:child_process";
|
|
458
458
|
import chalk3 from "chalk";
|
|
459
|
-
async function updateCommand() {
|
|
459
|
+
async function updateCommand(options = {}) {
|
|
460
460
|
console.log();
|
|
461
461
|
console.log(chalk3.bold(" Lokuma \u2014 CLI Update"));
|
|
462
462
|
console.log(chalk3.dim(" Updating lokuma-cli to the latest npm release..."));
|
|
@@ -466,6 +466,11 @@ async function updateCommand() {
|
|
|
466
466
|
const version = execSync("lokuma --version", { encoding: "utf-8" }).trim();
|
|
467
467
|
console.log();
|
|
468
468
|
console.log(chalk3.green(` \u2713 Updated successfully to ${version}`));
|
|
469
|
+
if (options.ai && options.ai !== "all") {
|
|
470
|
+
console.log();
|
|
471
|
+
console.log(chalk3.dim(` Refreshing installed skill for ${options.ai}...`));
|
|
472
|
+
await initCommand({ ai: options.ai, force: true });
|
|
473
|
+
}
|
|
469
474
|
console.log();
|
|
470
475
|
} catch (error) {
|
|
471
476
|
console.log();
|
|
@@ -497,7 +502,12 @@ var auth = program.command("auth").description("Manage authentication");
|
|
|
497
502
|
auth.command("login").description("Set or update your Lokuma API key").action(async () => {
|
|
498
503
|
await authLoginCommand();
|
|
499
504
|
});
|
|
500
|
-
program.command("update").description("Update lokuma-cli to the latest version from npm").action(async () => {
|
|
501
|
-
|
|
505
|
+
program.command("update").description("Update lokuma-cli to the latest version from npm").option("-a, --ai <type>", `Reinstall skill for a specific AI assistant after updating (${AI_TYPES.join(", ")})`).action(async (options) => {
|
|
506
|
+
if (options.ai && !AI_TYPES.includes(options.ai)) {
|
|
507
|
+
console.error(`Invalid AI type: ${options.ai}`);
|
|
508
|
+
console.error(`Valid types: ${AI_TYPES.join(", ")}`);
|
|
509
|
+
process.exit(1);
|
|
510
|
+
}
|
|
511
|
+
await updateCommand({ ai: options.ai });
|
|
502
512
|
});
|
|
503
513
|
program.parse();
|