aiupdate 0.1.4 → 0.1.6
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 +2 -0
- package/dist/cli.js +16 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ Each tool runs concurrently. After updating, aiupdate shows the version change (
|
|
|
33
33
|
| [GitHub Copilot CLI](https://githubnext.com/projects/copilot-cli) | `copilot update` |
|
|
34
34
|
| [pi](https://pi.dev/) | `pi update pi` |
|
|
35
35
|
| [Antigravity](https://github.com/google-antigravity/antigravity-cli) | `agy update` |
|
|
36
|
+
| [Grok Build](https://x.ai/build) | `grok update` |
|
|
37
|
+
| [Omnigent](https://omnigent.ai) | `omnigent upgrade` |
|
|
36
38
|
| [skills](https://github.com/anthropics/skills) | `npx skills update -g -p -y` |
|
|
37
39
|
|
|
38
40
|
Tools not installed on your machine are silently skipped.
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,9 @@ var AI_TOOLS = [
|
|
|
12
12
|
{ name: "cursor-agent", command: "cursor-agent", args: ["update"], versioned: true },
|
|
13
13
|
{ name: "copilot", command: "copilot", args: ["update"], versioned: true },
|
|
14
14
|
{ name: "pi", command: "pi", args: ["update", "pi"], versioned: true },
|
|
15
|
-
{ name: "agy", command: "agy", args: ["update"], versioned: true }
|
|
15
|
+
{ name: "agy", command: "agy", args: ["update"], versioned: true },
|
|
16
|
+
{ name: "grok", command: "grok", args: ["update"], versioned: true },
|
|
17
|
+
{ name: "omnigent", command: "omnigent", args: ["upgrade"], versioned: true }
|
|
16
18
|
];
|
|
17
19
|
var SKILLS_TASK = {
|
|
18
20
|
name: "skills",
|
|
@@ -50,14 +52,14 @@ function selectTools(targetArgs) {
|
|
|
50
52
|
}
|
|
51
53
|
async function run(targetArgs, executor = async (cmd, args) => {
|
|
52
54
|
await execa(cmd, args);
|
|
53
|
-
}, checker = defaultChecker, versioner = getVersion) {
|
|
55
|
+
}, checker = defaultChecker, versioner = getVersion, logger = (message) => console.error(message)) {
|
|
54
56
|
const { selectedAITools, includeSkills } = selectTools(targetArgs);
|
|
55
57
|
const toolsToCheck = includeSkills ? [...selectedAITools, SKILLS_TASK] : selectedAITools;
|
|
56
58
|
const checks = await Promise.all(
|
|
57
59
|
toolsToCheck.map(async (t) => ({ tool: t, installed: await checker(t.command) }))
|
|
58
60
|
);
|
|
59
61
|
const allTools = checks.filter((c) => c.installed).map((c) => c.tool);
|
|
60
|
-
|
|
62
|
+
const failures = [];
|
|
61
63
|
const runner = new Listr(
|
|
62
64
|
allTools.map((tool) => ({
|
|
63
65
|
title: tool.name,
|
|
@@ -66,9 +68,10 @@ async function run(targetArgs, executor = async (cmd, args) => {
|
|
|
66
68
|
try {
|
|
67
69
|
await executor(tool.command, tool.args);
|
|
68
70
|
} catch (err) {
|
|
69
|
-
hasFailures = true;
|
|
70
71
|
const e = err;
|
|
71
|
-
|
|
72
|
+
const message = e.stderr || e.shortMessage || String(e);
|
|
73
|
+
failures.push({ name: tool.name, message });
|
|
74
|
+
throw new Error(message);
|
|
72
75
|
}
|
|
73
76
|
if (before) {
|
|
74
77
|
const after = await versioner(tool.command);
|
|
@@ -80,7 +83,14 @@ async function run(targetArgs, executor = async (cmd, args) => {
|
|
|
80
83
|
);
|
|
81
84
|
await runner.run().catch(() => {
|
|
82
85
|
});
|
|
83
|
-
|
|
86
|
+
if (failures.length > 0) {
|
|
87
|
+
logger("");
|
|
88
|
+
logger(`Errors (${failures.length}):`);
|
|
89
|
+
for (const failure of failures) {
|
|
90
|
+
logger(` - ${failure.name}: ${failure.message}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return failures.length === 0;
|
|
84
94
|
}
|
|
85
95
|
if (process.argv[1] && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url))) {
|
|
86
96
|
const success = await run(process.argv.slice(2));
|