axinstall 1.0.0 → 1.1.0
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 +0 -1
- package/dist/detect-installer.d.ts +1 -1
- package/dist/detect-installer.js +1 -1
- package/dist/execute-install.d.ts +0 -1
- package/dist/execute-install.js +2 -5
- package/dist/handle-install.d.ts +0 -1
- package/dist/handle-install.js +0 -2
- package/dist/installer-data.js +6 -11
- package/dist/run-command.d.ts +0 -1
- package/dist/types.d.ts +1 -3
- package/dist/validate-cli-options.js +0 -6
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -54,7 +54,6 @@ program
|
|
|
54
54
|
.argument("[agent]", `Agent to install (${AGENT_CLIS.join(", ")})`)
|
|
55
55
|
.option("--with <installer>", `Package manager to use (${INSTALLER_IDS.join(", ")})`)
|
|
56
56
|
.option("--dry-run", "Show command without executing", false)
|
|
57
|
-
.option("--local", "Install locally instead of globally", false)
|
|
58
57
|
.action((agentCli, cliOptions) => {
|
|
59
58
|
runCommand(agentCli, cliOptions);
|
|
60
59
|
});
|
|
@@ -19,7 +19,7 @@ declare function getAvailableInstallers(): Installer[];
|
|
|
19
19
|
/**
|
|
20
20
|
* Auto-detect the best available installer based on priority.
|
|
21
21
|
*
|
|
22
|
-
* Priority order: pnpm > bun > yarn >
|
|
22
|
+
* Priority order: npm > pnpm > bun > yarn > brew
|
|
23
23
|
*/
|
|
24
24
|
declare function detectBestInstaller(): Installer | undefined;
|
|
25
25
|
/**
|
package/dist/detect-installer.js
CHANGED
|
@@ -48,7 +48,7 @@ function getAvailableInstallers() {
|
|
|
48
48
|
/**
|
|
49
49
|
* Auto-detect the best available installer based on priority.
|
|
50
50
|
*
|
|
51
|
-
* Priority order: pnpm > bun > yarn >
|
|
51
|
+
* Priority order: npm > pnpm > bun > yarn > brew
|
|
52
52
|
*/
|
|
53
53
|
function detectBestInstaller() {
|
|
54
54
|
const available = new Set(getAvailableInstallers().map((installer) => installer.id));
|
package/dist/execute-install.js
CHANGED
|
@@ -7,14 +7,11 @@ import { resolveInstallerCommand } from "./resolve-installer-command.js";
|
|
|
7
7
|
* Build the installation arguments for an agent.
|
|
8
8
|
*/
|
|
9
9
|
function buildInstallArguments(options) {
|
|
10
|
-
const { agent, installer
|
|
10
|
+
const { agent, installer } = options;
|
|
11
11
|
// For brew, use the CLI name as the package name (formula name)
|
|
12
12
|
// For npm-based installers, use the npm package name
|
|
13
13
|
const packageName = installer.id === "brew" ? agent.cli : agent.package;
|
|
14
|
-
|
|
15
|
-
? installer.globalInstallArgs
|
|
16
|
-
: installer.localInstallArgs;
|
|
17
|
-
return installArguments.map((argument) => argument.replace("{package}", packageName));
|
|
14
|
+
return installer.installArgs.map((argument) => argument.replace("{package}", packageName));
|
|
18
15
|
}
|
|
19
16
|
function formatCommand(command, arguments_) {
|
|
20
17
|
const parts = [command, ...arguments_];
|
package/dist/handle-install.d.ts
CHANGED
package/dist/handle-install.js
CHANGED
package/dist/installer-data.js
CHANGED
|
@@ -7,8 +7,7 @@ const npm = {
|
|
|
7
7
|
command: "npm",
|
|
8
8
|
envVar: "AXINSTALL_NPM_PATH",
|
|
9
9
|
checkArgs: ["--version"],
|
|
10
|
-
|
|
11
|
-
localInstallArgs: ["install", "{package}"],
|
|
10
|
+
installArgs: ["install", "-g", "{package}"],
|
|
12
11
|
};
|
|
13
12
|
const pnpm = {
|
|
14
13
|
id: "pnpm",
|
|
@@ -16,8 +15,7 @@ const pnpm = {
|
|
|
16
15
|
command: "pnpm",
|
|
17
16
|
envVar: "AXINSTALL_PNPM_PATH",
|
|
18
17
|
checkArgs: ["--version"],
|
|
19
|
-
|
|
20
|
-
localInstallArgs: ["add", "{package}"],
|
|
18
|
+
installArgs: ["add", "-g", "{package}"],
|
|
21
19
|
};
|
|
22
20
|
const bun = {
|
|
23
21
|
id: "bun",
|
|
@@ -25,8 +23,7 @@ const bun = {
|
|
|
25
23
|
command: "bun",
|
|
26
24
|
envVar: "AXINSTALL_BUN_PATH",
|
|
27
25
|
checkArgs: ["--version"],
|
|
28
|
-
|
|
29
|
-
localInstallArgs: ["add", "{package}"],
|
|
26
|
+
installArgs: ["add", "-g", "{package}"],
|
|
30
27
|
};
|
|
31
28
|
const yarn = {
|
|
32
29
|
id: "yarn",
|
|
@@ -34,8 +31,7 @@ const yarn = {
|
|
|
34
31
|
command: "yarn",
|
|
35
32
|
envVar: "AXINSTALL_YARN_PATH",
|
|
36
33
|
checkArgs: ["--version"],
|
|
37
|
-
|
|
38
|
-
localInstallArgs: ["add", "{package}"],
|
|
34
|
+
installArgs: ["global", "add", "{package}"],
|
|
39
35
|
};
|
|
40
36
|
const brew = {
|
|
41
37
|
id: "brew",
|
|
@@ -43,8 +39,7 @@ const brew = {
|
|
|
43
39
|
command: "brew",
|
|
44
40
|
envVar: "AXINSTALL_BREW_PATH",
|
|
45
41
|
checkArgs: ["--version"],
|
|
46
|
-
|
|
47
|
-
localInstallArgs: ["install", "{package}"],
|
|
42
|
+
installArgs: ["install", "{package}"],
|
|
48
43
|
};
|
|
49
44
|
/** All installers indexed by ID */
|
|
50
45
|
const INSTALLERS = {
|
|
@@ -56,10 +51,10 @@ const INSTALLERS = {
|
|
|
56
51
|
};
|
|
57
52
|
/** Default priority order for auto-detection */
|
|
58
53
|
const INSTALLER_PRIORITY = [
|
|
54
|
+
"npm",
|
|
59
55
|
"pnpm",
|
|
60
56
|
"bun",
|
|
61
57
|
"yarn",
|
|
62
|
-
"npm",
|
|
63
58
|
"brew",
|
|
64
59
|
];
|
|
65
60
|
function getInstaller(id) {
|
package/dist/run-command.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -15,9 +15,7 @@ interface Installer {
|
|
|
15
15
|
/** Args for a version check. */
|
|
16
16
|
checkArgs: readonly string[];
|
|
17
17
|
/** Args for global install. Use {package} as placeholder. */
|
|
18
|
-
|
|
19
|
-
/** Args for local install. Use {package} as placeholder. */
|
|
20
|
-
localInstallArgs: readonly string[];
|
|
18
|
+
installArgs: readonly string[];
|
|
21
19
|
}
|
|
22
20
|
/** Result of checking installer availability */
|
|
23
21
|
interface InstallerCheckResult {
|
|
@@ -20,12 +20,6 @@ export function validateOptions(agentCli, options) {
|
|
|
20
20
|
message: "--with is only valid when installing an agent.",
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
if ((options.listAgents || options.status) && options.local) {
|
|
24
|
-
return {
|
|
25
|
-
valid: false,
|
|
26
|
-
message: "--local is only valid when installing an agent.",
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
23
|
if ((options.listAgents || options.status) && options.dryRun) {
|
|
30
24
|
return {
|
|
31
25
|
valid: false,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "axinstall",
|
|
3
3
|
"author": "Łukasz Jerciński",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.1.0",
|
|
6
6
|
"description": "Universal installer for AI CLI agents with automatic package manager detection",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@commander-js/extra-typings": "^14.0.0",
|
|
72
|
-
"axshared": "^1.
|
|
72
|
+
"axshared": "^1.8.0",
|
|
73
73
|
"commander": "^14.0.2"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
@@ -78,18 +78,18 @@
|
|
|
78
78
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
79
79
|
"@types/node": "^25.0.3",
|
|
80
80
|
"@vitest/coverage-v8": "^4.0.16",
|
|
81
|
-
"@vitest/eslint-plugin": "^1.5
|
|
81
|
+
"@vitest/eslint-plugin": "^1.6.5",
|
|
82
82
|
"eslint": "^9.39.2",
|
|
83
83
|
"eslint-config-prettier": "^10.1.8",
|
|
84
84
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
85
85
|
"fta-check": "^1.5.1",
|
|
86
86
|
"fta-cli": "^3.0.0",
|
|
87
87
|
"globals": "^16.5.0",
|
|
88
|
-
"knip": "^5.
|
|
88
|
+
"knip": "^5.80.0",
|
|
89
89
|
"prettier": "3.7.4",
|
|
90
90
|
"semantic-release": "^25.0.2",
|
|
91
91
|
"typescript": "^5.9.3",
|
|
92
|
-
"typescript-eslint": "^8.
|
|
92
|
+
"typescript-eslint": "^8.52.0",
|
|
93
93
|
"vitest": "^4.0.16"
|
|
94
94
|
}
|
|
95
95
|
}
|