ancoder-skill-cli 0.13.29 → 0.13.31
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 +4 -4
- package/bin/targets/skill-cli-darwin-arm64 +0 -0
- package/bin/targets/skill-cli-darwin-x64 +0 -0
- package/bin/targets/skill-cli-linux-arm64 +0 -0
- package/bin/targets/skill-cli-linux-x64 +0 -0
- package/bin/targets/skill-cli-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/scripts/check-bin.js +96 -0
- package/scripts/install.sh +15 -3
- package/scripts/make-install-bundle.js +14 -1
package/README.md
CHANGED
|
@@ -51,11 +51,11 @@ The installer downloads the matching prebuilt binary, installs it as `skill-cli`
|
|
|
51
51
|
The `raw/main` URL is the moving latest channel. Each GitHub release updates Gitee `main` with the newest install bundle. If you need a reproducible install, pin a specific release tag instead:
|
|
52
52
|
|
|
53
53
|
```powershell
|
|
54
|
-
irm https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.
|
|
54
|
+
irm https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.31/scripts/install.ps1 | iex
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
curl -fsSL https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.
|
|
58
|
+
curl -fsSL https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.31/scripts/install.sh | bash
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Before sharing the Gitee command externally, make sure both the Gitee `main` branch and the release tag have been updated. The installer in `main` is generated from the latest release bundle.
|
|
@@ -69,8 +69,8 @@ Gitee release checklist:
|
|
|
69
69
|
- `https://gitee.com/marvin-dev/skill-cli-release/raw/main/scripts/install.ps1`
|
|
70
70
|
- `https://gitee.com/marvin-dev/skill-cli-release/raw/main/scripts/install.sh`
|
|
71
71
|
- `https://gitee.com/marvin-dev/skill-cli-release/raw/main/bin/targets/skill-cli-win32-x64.exe`
|
|
72
|
-
- `https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.
|
|
73
|
-
- `https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.
|
|
72
|
+
- `https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.31/scripts/install.ps1`
|
|
73
|
+
- `https://gitee.com/marvin-dev/skill-cli-release/raw/v0.13.31/bin/targets/skill-cli-win32-x64.exe`
|
|
74
74
|
Or run:
|
|
75
75
|
|
|
76
76
|
```bash
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ancoder-skill-cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.31",
|
|
4
4
|
"description": "CLI for managing everything-claude-code (ECC) components — agents, skills, commands, rules, hooks, MCP configs. Single binary, all assets embedded.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"skill-cli": "bin/skill-cli.js"
|
package/scripts/check-bin.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fs = require('fs');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
const childProcess = require('child_process');
|
|
6
8
|
|
|
7
9
|
const rootDir = path.join(__dirname, '..');
|
|
8
10
|
const binDir = path.join(__dirname, '..', 'bin');
|
|
@@ -78,3 +80,97 @@ for (const item of installerVersionPatterns) {
|
|
|
78
80
|
process.exit(1);
|
|
79
81
|
}
|
|
80
82
|
}
|
|
83
|
+
|
|
84
|
+
function currentPlatformAsset() {
|
|
85
|
+
let platform = os.platform();
|
|
86
|
+
let arch = os.arch();
|
|
87
|
+
|
|
88
|
+
if (platform === 'darwin') {
|
|
89
|
+
platform = 'darwin';
|
|
90
|
+
} else if (platform === 'linux') {
|
|
91
|
+
platform = 'linux';
|
|
92
|
+
} else if (platform === 'win32') {
|
|
93
|
+
platform = 'win32';
|
|
94
|
+
} else {
|
|
95
|
+
throw new Error(`unsupported installer smoke platform: ${platform}`);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (arch === 'x64') {
|
|
99
|
+
arch = 'x64';
|
|
100
|
+
} else if (arch === 'arm64') {
|
|
101
|
+
arch = 'arm64';
|
|
102
|
+
} else {
|
|
103
|
+
throw new Error(`unsupported installer smoke architecture: ${arch}`);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (platform === 'win32') {
|
|
107
|
+
if (arch !== 'x64') {
|
|
108
|
+
throw new Error(`unsupported Windows installer smoke architecture: ${arch}`);
|
|
109
|
+
}
|
|
110
|
+
return 'skill-cli-win32-x64.exe';
|
|
111
|
+
}
|
|
112
|
+
return `skill-cli-${platform}-${arch}`;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function runInstallerSmoke() {
|
|
116
|
+
if (process.platform === 'win32') {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-cli-installer-smoke-'));
|
|
121
|
+
try {
|
|
122
|
+
const sourceDir = path.join(tmpDir, 'source');
|
|
123
|
+
const installDir = path.join(tmpDir, 'install');
|
|
124
|
+
fs.mkdirSync(sourceDir, { recursive: true });
|
|
125
|
+
fs.mkdirSync(installDir, { recursive: true });
|
|
126
|
+
|
|
127
|
+
const assetPath = path.join(sourceDir, currentPlatformAsset());
|
|
128
|
+
fs.writeFileSync(assetPath, `#!/usr/bin/env bash
|
|
129
|
+
set -euo pipefail
|
|
130
|
+
case "\${1:-}" in
|
|
131
|
+
version)
|
|
132
|
+
echo "skill-cli version smoke"
|
|
133
|
+
;;
|
|
134
|
+
install|doctor)
|
|
135
|
+
echo "skill-cli \${1} smoke"
|
|
136
|
+
;;
|
|
137
|
+
*)
|
|
138
|
+
echo "unexpected skill-cli smoke command: $*" >&2
|
|
139
|
+
exit 2
|
|
140
|
+
;;
|
|
141
|
+
esac
|
|
142
|
+
`);
|
|
143
|
+
fs.chmodSync(assetPath, 0o755);
|
|
144
|
+
|
|
145
|
+
const installScript = path.join(rootDir, 'scripts', 'install.sh');
|
|
146
|
+
childProcess.execFileSync('bash', [
|
|
147
|
+
installScript,
|
|
148
|
+
'--base-url',
|
|
149
|
+
`file://${sourceDir}`,
|
|
150
|
+
'--install-dir',
|
|
151
|
+
installDir,
|
|
152
|
+
'--no-install',
|
|
153
|
+
'--doctor',
|
|
154
|
+
'none',
|
|
155
|
+
], {
|
|
156
|
+
cwd: rootDir,
|
|
157
|
+
stdio: 'pipe',
|
|
158
|
+
env: { ...process.env, SKILL_CLI_BASE_URL: '' },
|
|
159
|
+
});
|
|
160
|
+
} catch (err) {
|
|
161
|
+
const stdout = err.stdout ? err.stdout.toString() : '';
|
|
162
|
+
const stderr = err.stderr ? err.stderr.toString() : '';
|
|
163
|
+
console.error('skill-cli: install.sh smoke failed');
|
|
164
|
+
if (stdout.trim()) {
|
|
165
|
+
console.error(stdout.trim());
|
|
166
|
+
}
|
|
167
|
+
if (stderr.trim()) {
|
|
168
|
+
console.error(stderr.trim());
|
|
169
|
+
}
|
|
170
|
+
throw err;
|
|
171
|
+
} finally {
|
|
172
|
+
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
runInstallerSmoke();
|
package/scripts/install.sh
CHANGED
|
@@ -188,17 +188,29 @@ fi
|
|
|
188
188
|
|
|
189
189
|
if [ "$RUN_COMPONENT_INSTALL" = "1" ]; then
|
|
190
190
|
echo ""
|
|
191
|
-
|
|
191
|
+
if [ "${#claude_args[@]}" -gt 0 ]; then
|
|
192
|
+
"$TARGET_PATH" install "${claude_args[@]}"
|
|
193
|
+
else
|
|
194
|
+
"$TARGET_PATH" install
|
|
195
|
+
fi
|
|
192
196
|
fi
|
|
193
197
|
|
|
194
198
|
case "$DOCTOR_MODE" in
|
|
195
199
|
lite)
|
|
196
200
|
echo ""
|
|
197
|
-
|
|
201
|
+
if [ "${#claude_args[@]}" -gt 0 ]; then
|
|
202
|
+
"$TARGET_PATH" doctor "${claude_args[@]}" --check-adversarial=false
|
|
203
|
+
else
|
|
204
|
+
"$TARGET_PATH" doctor --check-adversarial=false
|
|
205
|
+
fi
|
|
198
206
|
;;
|
|
199
207
|
full)
|
|
200
208
|
echo ""
|
|
201
|
-
|
|
209
|
+
if [ "${#claude_args[@]}" -gt 0 ]; then
|
|
210
|
+
"$TARGET_PATH" doctor "${claude_args[@]}"
|
|
211
|
+
else
|
|
212
|
+
"$TARGET_PATH" doctor
|
|
213
|
+
fi
|
|
202
214
|
;;
|
|
203
215
|
none)
|
|
204
216
|
;;
|
|
@@ -8,6 +8,7 @@ const rootDir = path.join(__dirname, '..');
|
|
|
8
8
|
const outDir = path.join(rootDir, 'dist', 'install');
|
|
9
9
|
const pkg = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf8'));
|
|
10
10
|
const version = `v${pkg.version}`;
|
|
11
|
+
const generatedAt = normalizeGeneratedAt(process.env.SKILL_CLI_BUNDLE_GENERATED_AT);
|
|
11
12
|
const targets = [
|
|
12
13
|
'skill-cli-darwin-arm64',
|
|
13
14
|
'skill-cli-darwin-x64',
|
|
@@ -76,6 +77,18 @@ function writeFile(dest, content) {
|
|
|
76
77
|
fs.writeFileSync(dest, content);
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
function normalizeGeneratedAt(value) {
|
|
81
|
+
if (!value) {
|
|
82
|
+
return new Date().toISOString();
|
|
83
|
+
}
|
|
84
|
+
const parsed = new Date(value);
|
|
85
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
86
|
+
console.error(`invalid SKILL_CLI_BUNDLE_GENERATED_AT: ${value}`);
|
|
87
|
+
process.exit(2);
|
|
88
|
+
}
|
|
89
|
+
return parsed.toISOString();
|
|
90
|
+
}
|
|
91
|
+
|
|
79
92
|
fs.rmSync(outDir, { recursive: true, force: true });
|
|
80
93
|
|
|
81
94
|
for (const target of targets) {
|
|
@@ -119,7 +132,7 @@ const manifest = {
|
|
|
119
132
|
package: pkg.name,
|
|
120
133
|
version: pkg.version,
|
|
121
134
|
tag: version,
|
|
122
|
-
generatedAt
|
|
135
|
+
generatedAt,
|
|
123
136
|
rootURL: rootURL || null,
|
|
124
137
|
scriptRootURL: scriptRootURL || null,
|
|
125
138
|
baseURL: baseURL || null,
|