@crewkit/cli 0.4.1 → 0.5.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/README.md +12 -5
- package/lib/getBinary.js +32 -1
- package/package.json +5 -6
- package/scripts/postinstall.js +21 -0
package/README.md
CHANGED
|
@@ -66,12 +66,18 @@ npm install -g @crewkit/cli
|
|
|
66
66
|
brew install karibew/tap/crewkit
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
###
|
|
69
|
+
### Windows — use WSL
|
|
70
70
|
|
|
71
|
-
```
|
|
72
|
-
|
|
71
|
+
```bash
|
|
72
|
+
wsl npm install -g @crewkit/cli
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
This package ships no native Windows binary: those builds are paused. On native
|
|
76
|
+
Windows `npm install -g @crewkit/cli` still installs — and says so — but the CLI
|
|
77
|
+
refuses to run and points you here. The Chocolatey package (`choco install
|
|
78
|
+
crewkit`) is frozen at 0.4.1 and no longer follows releases. WSL is the better
|
|
79
|
+
target anyway — background observation is Unix-only.
|
|
80
|
+
|
|
75
81
|
### Direct Download
|
|
76
82
|
|
|
77
83
|
See [GitHub Releases](https://github.com/karibew/crewkit-cli/releases) for platform-specific binaries.
|
|
@@ -97,9 +103,10 @@ mkdir -p ~/.config/fish/completions && crewkit completions fish > ~/.config/fish
|
|
|
97
103
|
## Supported Platforms
|
|
98
104
|
|
|
99
105
|
- macOS Apple Silicon (M1/M2/M3/M4)
|
|
100
|
-
- macOS Intel
|
|
101
106
|
- Linux x64
|
|
102
|
-
- Windows x64
|
|
107
|
+
- Windows x64 — via WSL (install the Linux build there)
|
|
108
|
+
|
|
109
|
+
Not published: macOS Intel, and native Windows (paused).
|
|
103
110
|
|
|
104
111
|
## Requirements
|
|
105
112
|
|
package/lib/getBinary.js
CHANGED
|
@@ -11,6 +11,27 @@ const PLATFORMS = {
|
|
|
11
11
|
'win32-x64': '@crewkit/cli-win32-x64',
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
// Platforms whose package is NOT published. The generic "reinstall" advice
|
|
15
|
+
// below can never succeed for these — it would loop the user forever — so they
|
|
16
|
+
// get a truthful refusal naming what actually works. Shared with
|
|
17
|
+
// scripts/postinstall.js so the install banner and the run-time refusal cannot
|
|
18
|
+
// disagree. Restoring a build means deleting one entry.
|
|
19
|
+
const UNAVAILABLE = {
|
|
20
|
+
'win32-x64': {
|
|
21
|
+
what: 'a native Windows binary',
|
|
22
|
+
// Windows is a pause, and WSL is a real remedy today.
|
|
23
|
+
remedy:
|
|
24
|
+
`Run crewkit under WSL and install the Linux build there:\n` +
|
|
25
|
+
` wsl npm install -g @crewkit/cli\n\n` +
|
|
26
|
+
`WSL is the better target anyway: background observation is Unix-only.`,
|
|
27
|
+
},
|
|
28
|
+
'darwin-x64': {
|
|
29
|
+
what: 'a macOS Intel (x86_64) binary',
|
|
30
|
+
// No cross-arch remedy exists: Rosetta translates x86 to arm, not back.
|
|
31
|
+
remedy: `Supported today: macOS Apple Silicon, Linux x64, and Windows via WSL.`,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
14
35
|
function getPlatformKey() {
|
|
15
36
|
return `${process.platform}-${process.arch}`;
|
|
16
37
|
}
|
|
@@ -71,6 +92,16 @@ function getBinaryPath() {
|
|
|
71
92
|
}
|
|
72
93
|
}
|
|
73
94
|
|
|
95
|
+
const unavailable = UNAVAILABLE[platformKey];
|
|
96
|
+
if (unavailable) {
|
|
97
|
+
throw new Error(
|
|
98
|
+
`crewkit does not currently ship ${unavailable.what}.\n\n` +
|
|
99
|
+
`${unavailable.remedy}\n\n` +
|
|
100
|
+
`Or set CREWKIT_BINARY_PATH to point to a crewkit binary you built.\n\n` +
|
|
101
|
+
`For more help, visit: https://github.com/karibew/crewkit-cli/issues`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
74
105
|
// Binary not found
|
|
75
106
|
throw new Error(
|
|
76
107
|
`Could not find crewkit binary for ${platformKey}.\n\n` +
|
|
@@ -85,4 +116,4 @@ function getBinaryPath() {
|
|
|
85
116
|
);
|
|
86
117
|
}
|
|
87
118
|
|
|
88
|
-
module.exports = { getBinaryPath, getPlatformKey, PLATFORMS };
|
|
119
|
+
module.exports = { getBinaryPath, getPlatformKey, PLATFORMS, UNAVAILABLE };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewkit/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Manage Claude Code agents for teams - role-based configs, A/B testing, accuracy tracking",
|
|
5
5
|
"author": "crewkit <hello@crewkit.io>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -38,15 +38,14 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"scripts": {
|
|
41
|
-
"postinstall": "node scripts/postinstall.js"
|
|
41
|
+
"postinstall": "node scripts/postinstall.js",
|
|
42
|
+
"test": "node test/getBinary.test.js"
|
|
42
43
|
},
|
|
43
44
|
"engines": {
|
|
44
45
|
"node": ">=18"
|
|
45
46
|
},
|
|
46
47
|
"optionalDependencies": {
|
|
47
|
-
"@crewkit/cli-darwin-arm64": "0.
|
|
48
|
-
"@crewkit/cli-
|
|
49
|
-
"@crewkit/cli-linux-x64": "0.4.1",
|
|
50
|
-
"@crewkit/cli-win32-x64": "0.4.1"
|
|
48
|
+
"@crewkit/cli-darwin-arm64": "0.5.1",
|
|
49
|
+
"@crewkit/cli-linux-x64": "0.5.1"
|
|
51
50
|
}
|
|
52
51
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -23,6 +23,27 @@ const BOLD = '\x1b[1m';
|
|
|
23
23
|
const DIM = '\x1b[2m';
|
|
24
24
|
const CYAN = '\x1b[36m';
|
|
25
25
|
const GREEN = '\x1b[32m';
|
|
26
|
+
const YELLOW = '\x1b[33m';
|
|
27
|
+
|
|
28
|
+
// On a platform we publish no binary for, the install itself SUCCEEDS (the
|
|
29
|
+
// optional dependency is simply absent) and only `crewkit` fails, at first
|
|
30
|
+
// run. Congratulating the user here and refusing a second later is the worst
|
|
31
|
+
// of both, so say it now, from the same table the refusal uses.
|
|
32
|
+
const { getPlatformKey, UNAVAILABLE } = require('../lib/getBinary.js');
|
|
33
|
+
const unavailable = UNAVAILABLE[getPlatformKey()];
|
|
34
|
+
|
|
35
|
+
if (unavailable) {
|
|
36
|
+
console.log();
|
|
37
|
+
console.log(`${BOLD}${YELLOW}crewkit${RESET} installed, but it cannot run on this platform.`);
|
|
38
|
+
console.log();
|
|
39
|
+
console.log(`crewkit does not currently ship ${unavailable.what}.`);
|
|
40
|
+
console.log();
|
|
41
|
+
console.log(unavailable.remedy);
|
|
42
|
+
console.log();
|
|
43
|
+
console.log(`${DIM}Docs:${RESET} https://crewkit.io/docs/installation`);
|
|
44
|
+
console.log();
|
|
45
|
+
process.exit(0);
|
|
46
|
+
}
|
|
26
47
|
|
|
27
48
|
console.log();
|
|
28
49
|
console.log(`${BOLD}${GREEN}crewkit${RESET} installed successfully!`);
|