@airweave/cli 0.1.7 → 0.1.8
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/bin/airweave.js +0 -0
- package/install.js +41 -7
- package/package.json +1 -1
package/bin/airweave.js
CHANGED
|
File without changes
|
package/install.js
CHANGED
|
@@ -4,13 +4,47 @@ const { version } = require("./package.json");
|
|
|
4
4
|
const pip = process.platform === "win32" ? "pip" : "pip3";
|
|
5
5
|
const pkg = `airweave-cli==${version}`;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
function tryExec(cmd) {
|
|
8
|
+
try {
|
|
9
|
+
execSync(cmd, { stdio: "inherit" });
|
|
10
|
+
return true;
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function hasBin(name) {
|
|
17
|
+
try {
|
|
18
|
+
execSync(`which ${name}`, { stdio: "ignore" });
|
|
19
|
+
return true;
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const strategies = [];
|
|
26
|
+
|
|
27
|
+
if (hasBin("pipx")) strategies.push(`pipx install ${pkg}`);
|
|
28
|
+
if (hasBin("uv")) strategies.push(`uv tool install ${pkg}`);
|
|
29
|
+
|
|
30
|
+
strategies.push(
|
|
31
|
+
`${pip} install --user ${pkg}`,
|
|
32
|
+
`${pip} install --break-system-packages ${pkg}`,
|
|
33
|
+
`${pip} install ${pkg}`
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const installed = strategies.some((cmd) => {
|
|
37
|
+
console.log(`airweave: trying ${cmd}`);
|
|
38
|
+
return tryExec(cmd);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (!installed) {
|
|
10
42
|
console.error(
|
|
11
|
-
`\
|
|
12
|
-
"
|
|
13
|
-
|
|
43
|
+
`\n@airweave/cli: failed to install ${pkg}.\n` +
|
|
44
|
+
"Install pipx (recommended) or uv first, then retry:\n" +
|
|
45
|
+
" brew install pipx && pipx ensurepath\n" +
|
|
46
|
+
` npm rebuild @airweave/cli\n` +
|
|
47
|
+
"\nOr install manually:\n" +
|
|
48
|
+
` pipx install ${pkg}\n`
|
|
14
49
|
);
|
|
15
|
-
// Don't fail the npm install — the user can install the Python package manually
|
|
16
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airweave/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Airweave CLI for developers and AI agents. Search across your connected sources from any terminal.",
|
|
5
5
|
"keywords": ["airweave", "cli", "search", "ai", "agents"],
|
|
6
6
|
"homepage": "https://github.com/airweave-ai/cli",
|