ancoder-skill-cli 0.13.38-beta.6 → 0.13.38-beta.7

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/skill-cli.js CHANGED
@@ -1,53 +1,53 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
3
-
4
- const path = require('path');
5
- const { spawn } = require('child_process');
6
- const fs = require('fs');
7
-
8
- const isWindows = process.platform === 'win32';
9
- const key = `${process.platform}-${process.arch}`;
10
- const targetMap = {
11
- 'darwin-arm64': 'skill-cli-darwin-arm64',
12
- 'darwin-x64': 'skill-cli-darwin-x64',
13
- 'linux-arm64': 'skill-cli-linux-arm64',
14
- 'linux-x64': 'skill-cli-linux-x64',
15
- 'win32-x64': 'skill-cli-win32-x64.exe',
16
- };
17
-
18
- const bundledName = targetMap[key];
19
- const bundledPath = bundledName ? path.join(__dirname, 'targets', bundledName) : null;
20
- const fallbackName = isWindows ? 'skill-cli.exe' : 'skill-cli';
21
- const fallbackPath = path.join(__dirname, fallbackName);
22
-
23
- const binPath = bundledPath && fs.existsSync(bundledPath) ? bundledPath : fallbackPath;
24
-
25
- if (!fs.existsSync(binPath)) {
26
- console.error(
27
- 'skill-cli: binary not found for ' + key + '. ' +
28
- 'Expected bundled binary: ' + (bundledName || 'unsupported-platform') + '.'
29
- );
30
- process.exit(1);
31
- }
32
-
33
- if (!isWindows) {
34
- try {
35
- fs.chmodSync(binPath, 0o755);
36
- } catch (_) {
37
- // ignore chmod failures on readonly installs
38
- }
39
- }
40
-
41
- const child = spawn(binPath, process.argv.slice(2), {
42
- stdio: 'inherit',
43
- shell: false,
44
- });
45
-
46
- child.on('close', (code) => {
47
- process.exit(code != null ? code : 0);
48
- });
49
-
50
- child.on('error', (err) => {
51
- console.error('skill-cli:', err.message);
52
- process.exit(1);
53
- });
2
+ 'use strict';
3
+
4
+ const path = require('path');
5
+ const { spawn } = require('child_process');
6
+ const fs = require('fs');
7
+
8
+ const isWindows = process.platform === 'win32';
9
+ const key = `${process.platform}-${process.arch}`;
10
+ const targetMap = {
11
+ 'darwin-arm64': 'skill-cli-darwin-arm64',
12
+ 'darwin-x64': 'skill-cli-darwin-x64',
13
+ 'linux-arm64': 'skill-cli-linux-arm64',
14
+ 'linux-x64': 'skill-cli-linux-x64',
15
+ 'win32-x64': 'skill-cli-win32-x64.exe',
16
+ };
17
+
18
+ const bundledName = targetMap[key];
19
+ const bundledPath = bundledName ? path.join(__dirname, 'targets', bundledName) : null;
20
+ const fallbackName = isWindows ? 'skill-cli.exe' : 'skill-cli';
21
+ const fallbackPath = path.join(__dirname, fallbackName);
22
+
23
+ const binPath = bundledPath && fs.existsSync(bundledPath) ? bundledPath : fallbackPath;
24
+
25
+ if (!fs.existsSync(binPath)) {
26
+ console.error(
27
+ 'skill-cli: binary not found for ' + key + '. ' +
28
+ 'Expected bundled binary: ' + (bundledName || 'unsupported-platform') + '.'
29
+ );
30
+ process.exit(1);
31
+ }
32
+
33
+ if (!isWindows) {
34
+ try {
35
+ fs.chmodSync(binPath, 0o755);
36
+ } catch (_) {
37
+ // ignore chmod failures on readonly installs
38
+ }
39
+ }
40
+
41
+ const child = spawn(binPath, process.argv.slice(2), {
42
+ stdio: 'inherit',
43
+ shell: false,
44
+ });
45
+
46
+ child.on('close', (code) => {
47
+ process.exit(code != null ? code : 0);
48
+ });
49
+
50
+ child.on('error', (err) => {
51
+ console.error('skill-cli:', err.message);
52
+ process.exit(1);
53
+ });
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "name": "ancoder-skill-cli",
3
- "version": "0.13.38-beta.6",
4
- "description": "CLI for managing everything-claude-code (ECC) components — agents, skills, commands, rules, hooks, MCP configs. Single binary, all assets embedded.",
5
- "bin": {
6
- "skill-cli": "bin/skill-cli.js"
7
- },
8
- "scripts": {
9
- "postinstall": "node scripts/postinstall.js",
10
- "prepublishOnly": "node scripts/check-bin.js",
11
- "build": "bash scripts/build-all.sh",
12
- "install-bundle": "node scripts/make-install-bundle.js"
13
- },
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/AncoderAI/Ancoder_SkillsCreator.git"
17
- },
18
- "homepage": "https://github.com/AncoderAI/Ancoder_SkillsCreator#readme",
19
- "bugs": {
20
- "url": "https://github.com/AncoderAI/Ancoder_SkillsCreator/issues"
21
- },
22
- "keywords": [
23
- "skill",
24
- "claude",
25
- "claude-code",
26
- "anthropic",
27
- "agentskills",
28
- "everything-claude-code",
29
- "ecc",
30
- "cli",
31
- "agents",
32
- "mcp"
33
- ],
34
- "author": "AncoderAI",
35
- "license": "MIT",
36
- "engines": {
37
- "node": ">=16"
38
- },
39
- "files": [
40
- "bin/skill-cli.js",
41
- "bin/targets",
42
- "scripts/install.sh",
43
- "scripts/install.ps1",
44
- "scripts/make-install-bundle.js",
45
- "scripts/check-install-host.js",
46
- "scripts/postinstall.js",
47
- "scripts/check-bin.js",
48
- "README.md",
49
- "LICENSE"
50
- ],
51
- "publishConfig": {
52
- "access": "public"
53
- }
54
- }
1
+ {
2
+ "name": "ancoder-skill-cli",
3
+ "version": "0.13.38-beta.7",
4
+ "description": "CLI for managing everything-claude-code (ECC) components — agents, skills, commands, rules, hooks, MCP configs. Single binary, all assets embedded.",
5
+ "bin": {
6
+ "skill-cli": "bin/skill-cli.js"
7
+ },
8
+ "scripts": {
9
+ "postinstall": "node scripts/postinstall.js",
10
+ "prepublishOnly": "node scripts/check-bin.js",
11
+ "build": "bash scripts/build-all.sh",
12
+ "install-bundle": "node scripts/make-install-bundle.js"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/AncoderAI/Ancoder_SkillsCreator.git"
17
+ },
18
+ "homepage": "https://github.com/AncoderAI/Ancoder_SkillsCreator#readme",
19
+ "bugs": {
20
+ "url": "https://github.com/AncoderAI/Ancoder_SkillsCreator/issues"
21
+ },
22
+ "keywords": [
23
+ "skill",
24
+ "claude",
25
+ "claude-code",
26
+ "anthropic",
27
+ "agentskills",
28
+ "everything-claude-code",
29
+ "ecc",
30
+ "cli",
31
+ "agents",
32
+ "mcp"
33
+ ],
34
+ "author": "AncoderAI",
35
+ "license": "MIT",
36
+ "engines": {
37
+ "node": ">=16"
38
+ },
39
+ "files": [
40
+ "bin/skill-cli.js",
41
+ "bin/targets",
42
+ "scripts/install.sh",
43
+ "scripts/install.ps1",
44
+ "scripts/make-install-bundle.js",
45
+ "scripts/check-install-host.js",
46
+ "scripts/postinstall.js",
47
+ "scripts/check-bin.js",
48
+ "README.md",
49
+ "LICENSE"
50
+ ],
51
+ "publishConfig": {
52
+ "access": "public"
53
+ }
54
+ }
@@ -1,176 +1,176 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- const path = require('path');
5
- const fs = require('fs');
6
- const os = require('os');
7
- const childProcess = require('child_process');
8
-
9
- const rootDir = path.join(__dirname, '..');
10
- const binDir = path.join(__dirname, '..', 'bin');
11
- const targetsDir = path.join(binDir, 'targets');
12
- const packageJSONPath = path.join(rootDir, 'package.json');
13
- const expected = [
14
- 'skill-cli-darwin-arm64',
15
- 'skill-cli-darwin-x64',
16
- 'skill-cli-linux-arm64',
17
- 'skill-cli-linux-x64',
18
- 'skill-cli-win32-x64.exe',
19
- ];
20
- const expectedInstallers = [
21
- 'scripts/install.ps1',
22
- 'scripts/install.sh',
23
- 'scripts/make-install-bundle.js',
24
- 'scripts/check-install-host.js',
25
- ];
26
-
27
- const missing = expected.filter((name) => !fs.existsSync(path.join(targetsDir, name)));
28
-
29
- if (missing.length > 0) {
30
- console.error('skill-cli: missing bundled binaries for npm publish:');
31
- for (const name of missing) {
32
- console.error(' - ' + name);
33
- }
34
- console.error('Run: bash scripts/build-all.sh');
35
- process.exit(1);
36
- }
37
-
38
- const pkg = JSON.parse(fs.readFileSync(packageJSONPath, 'utf8'));
39
- const files = new Set(pkg.files || []);
40
- const missingInstallers = expectedInstallers.filter((name) => !fs.existsSync(path.join(rootDir, name)));
41
- const missingInstallerFilesEntries = expectedInstallers.filter((name) => !files.has(name));
42
-
43
- if (missingInstallers.length > 0) {
44
- console.error('skill-cli: missing one-line installer scripts:');
45
- for (const name of missingInstallers) {
46
- console.error(' - ' + name);
47
- }
48
- process.exit(1);
49
- }
50
-
51
- if (missingInstallerFilesEntries.length > 0) {
52
- console.error('skill-cli: package.json files is missing installer scripts:');
53
- for (const name of missingInstallerFilesEntries) {
54
- console.error(' - ' + name);
55
- }
56
- process.exit(1);
57
- }
58
-
59
- const installerVersionPatterns = [
60
- {
61
- file: 'scripts/install.sh',
62
- pattern: /DEFAULT_VERSION="([^"]+)"/,
63
- },
64
- {
65
- file: 'scripts/install.ps1',
66
- pattern: /\$Version = "([^"]+)"/,
67
- },
68
- ];
69
-
70
- for (const item of installerVersionPatterns) {
71
- const installerPath = path.join(rootDir, item.file);
72
- const content = fs.readFileSync(installerPath, 'utf8');
73
- const match = content.match(item.pattern);
74
- if (!match) {
75
- console.error(`skill-cli: could not find default version in ${item.file}`);
76
- process.exit(1);
77
- }
78
- if (match[1] !== 'main') {
79
- console.error(`skill-cli: ${item.file} default version is ${match[1]}, expected main`);
80
- process.exit(1);
81
- }
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();
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+ const os = require('os');
7
+ const childProcess = require('child_process');
8
+
9
+ const rootDir = path.join(__dirname, '..');
10
+ const binDir = path.join(__dirname, '..', 'bin');
11
+ const targetsDir = path.join(binDir, 'targets');
12
+ const packageJSONPath = path.join(rootDir, 'package.json');
13
+ const expected = [
14
+ 'skill-cli-darwin-arm64',
15
+ 'skill-cli-darwin-x64',
16
+ 'skill-cli-linux-arm64',
17
+ 'skill-cli-linux-x64',
18
+ 'skill-cli-win32-x64.exe',
19
+ ];
20
+ const expectedInstallers = [
21
+ 'scripts/install.ps1',
22
+ 'scripts/install.sh',
23
+ 'scripts/make-install-bundle.js',
24
+ 'scripts/check-install-host.js',
25
+ ];
26
+
27
+ const missing = expected.filter((name) => !fs.existsSync(path.join(targetsDir, name)));
28
+
29
+ if (missing.length > 0) {
30
+ console.error('skill-cli: missing bundled binaries for npm publish:');
31
+ for (const name of missing) {
32
+ console.error(' - ' + name);
33
+ }
34
+ console.error('Run: bash scripts/build-all.sh');
35
+ process.exit(1);
36
+ }
37
+
38
+ const pkg = JSON.parse(fs.readFileSync(packageJSONPath, 'utf8'));
39
+ const files = new Set(pkg.files || []);
40
+ const missingInstallers = expectedInstallers.filter((name) => !fs.existsSync(path.join(rootDir, name)));
41
+ const missingInstallerFilesEntries = expectedInstallers.filter((name) => !files.has(name));
42
+
43
+ if (missingInstallers.length > 0) {
44
+ console.error('skill-cli: missing one-line installer scripts:');
45
+ for (const name of missingInstallers) {
46
+ console.error(' - ' + name);
47
+ }
48
+ process.exit(1);
49
+ }
50
+
51
+ if (missingInstallerFilesEntries.length > 0) {
52
+ console.error('skill-cli: package.json files is missing installer scripts:');
53
+ for (const name of missingInstallerFilesEntries) {
54
+ console.error(' - ' + name);
55
+ }
56
+ process.exit(1);
57
+ }
58
+
59
+ const installerVersionPatterns = [
60
+ {
61
+ file: 'scripts/install.sh',
62
+ pattern: /DEFAULT_VERSION="([^"]+)"/,
63
+ },
64
+ {
65
+ file: 'scripts/install.ps1',
66
+ pattern: /\$Version = "([^"]+)"/,
67
+ },
68
+ ];
69
+
70
+ for (const item of installerVersionPatterns) {
71
+ const installerPath = path.join(rootDir, item.file);
72
+ const content = fs.readFileSync(installerPath, 'utf8');
73
+ const match = content.match(item.pattern);
74
+ if (!match) {
75
+ console.error(`skill-cli: could not find default version in ${item.file}`);
76
+ process.exit(1);
77
+ }
78
+ if (match[1] !== 'main') {
79
+ console.error(`skill-cli: ${item.file} default version is ${match[1]}, expected main`);
80
+ process.exit(1);
81
+ }
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();