akili-specs 2.4.0 → 2.4.1
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/CHANGELOG.md +4 -0
- package/bin/akili.js +52 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,10 @@ The format is inspired by Keep a Changelog and the repository follows semantic v
|
|
|
10
10
|
|
|
11
11
|
- No unreleased changes yet.
|
|
12
12
|
|
|
13
|
+
## [2.4.1] - 2026-07-19
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **`akili update` now updates the npm package:** Previously `akili update` only reinstalled files from the already-installed version. Now it detects the installation type (global, local, or npx), runs `npm install -g akili-specs@latest` or `npm install akili-specs@latest` accordingly, and then reinstalls files with `--force`.
|
|
13
17
|
## [2.4.0] - 2026-07-19
|
|
14
18
|
|
|
15
19
|
### Added
|
package/bin/akili.js
CHANGED
|
@@ -5,6 +5,8 @@ const os = require("os");
|
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const { parseArgs } = require("util");
|
|
7
7
|
|
|
8
|
+
const { execSync } = require("child_process");
|
|
9
|
+
|
|
8
10
|
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
9
11
|
const SOURCE_CLAUDE = path.join(PACKAGE_ROOT, ".claude");
|
|
10
12
|
const SOURCE_COMMANDS = path.join(SOURCE_CLAUDE, "commands");
|
|
@@ -76,7 +78,7 @@ Usage:
|
|
|
76
78
|
|
|
77
79
|
Commands:
|
|
78
80
|
install Install commands, skills, and helper resources
|
|
79
|
-
update
|
|
81
|
+
update Update npm package to latest version and reinstall files
|
|
80
82
|
doctor Check whether expected files are installed
|
|
81
83
|
list List packaged commands, skills, and helper resources
|
|
82
84
|
help Show this help
|
|
@@ -382,6 +384,52 @@ function installTool(tool, args) {
|
|
|
382
384
|
return { installed, skipped };
|
|
383
385
|
}
|
|
384
386
|
|
|
387
|
+
function detectInstallType() {
|
|
388
|
+
try {
|
|
389
|
+
const globalList = execSync("npm list -g akili-specs --depth=0 2>/dev/null", { encoding: "utf8" });
|
|
390
|
+
if (globalList.includes("akili-specs")) return "global";
|
|
391
|
+
} catch (e) {}
|
|
392
|
+
|
|
393
|
+
try {
|
|
394
|
+
const localList = execSync("npm list akili-specs --depth=0 2>/dev/null", { encoding: "utf8" });
|
|
395
|
+
if (localList.includes("akili-specs")) return "local";
|
|
396
|
+
} catch (e) {}
|
|
397
|
+
|
|
398
|
+
return "npx";
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function runUpdate(args) {
|
|
402
|
+
const installType = detectInstallType();
|
|
403
|
+
|
|
404
|
+
console.log(`\n${colors.cyan}Detected installation type: ${installType}${colors.reset}`);
|
|
405
|
+
|
|
406
|
+
if (installType === "npx") {
|
|
407
|
+
console.log(`\n${colors.yellow}You are running via npx. No persistent installation to update.${colors.reset}`);
|
|
408
|
+
console.log(`To install globally: ${colors.cyan}npm install -g akili-specs${colors.reset}`);
|
|
409
|
+
console.log(`To install locally: ${colors.cyan}npm install akili-specs${colors.reset}`);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
console.log(`\n${colors.yellow}Updating npm package...${colors.reset}`);
|
|
414
|
+
|
|
415
|
+
try {
|
|
416
|
+
if (installType === "global") {
|
|
417
|
+
execSync("npm install -g akili-specs@latest", { stdio: "inherit" });
|
|
418
|
+
} else {
|
|
419
|
+
execSync("npm install akili-specs@latest", { stdio: "inherit" });
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
console.log(`\n${colors.green}npm package updated successfully.${colors.reset}`);
|
|
423
|
+
} catch (e) {
|
|
424
|
+
console.error(`\n${colors.red}Failed to update npm package.${colors.reset}`);
|
|
425
|
+
process.exit(1);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
console.log(`\n${colors.yellow}Reinstalling files with --force...${colors.reset}`);
|
|
429
|
+
args.force = true;
|
|
430
|
+
runInstall(args);
|
|
431
|
+
}
|
|
432
|
+
|
|
385
433
|
function runInstall(args) {
|
|
386
434
|
let installed = 0;
|
|
387
435
|
let skipped = 0;
|
|
@@ -656,9 +704,11 @@ async function main() {
|
|
|
656
704
|
|
|
657
705
|
switch (args.command) {
|
|
658
706
|
case "install":
|
|
659
|
-
case "update":
|
|
660
707
|
runInstall(args);
|
|
661
708
|
break;
|
|
709
|
+
case "update":
|
|
710
|
+
runUpdate(args);
|
|
711
|
+
break;
|
|
662
712
|
case "doctor":
|
|
663
713
|
runDoctor(args);
|
|
664
714
|
break;
|
package/package.json
CHANGED