useskl 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +21 -0
  2. package/bin/skl.cjs +37 -0
  3. package/package.json +23 -0
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # useskl
2
+
3
+ Self-hosted, cross-harness skill distribution & management CLI. Installs the
4
+ `skl` command.
5
+
6
+ ```sh
7
+ npm install -g useskl
8
+ skl --version
9
+ ```
10
+
11
+ `skl` is a Bun-compiled native binary. This npm package is a thin launcher that
12
+ execs the platform-specific binary for your OS/arch, installed automatically as
13
+ an [`optionalDependencies`](https://docs.npmjs.com/cli/configuring-npm/package-json#optionaldependencies)
14
+ package (`skl-cli-darwin-arm64`, `skl-cli-darwin-x64`, `skl-cli-linux-x64`,
15
+ `skl-cli-linux-arm64`). There is no postinstall download.
16
+
17
+ Other install options: `brew install loopdoop/tap/skl`,
18
+ `curl -fsSL https://useskl.com/install.sh | sh`, or download a binary directly
19
+ from [Releases](https://github.com/loopdoop/skl/releases).
20
+
21
+ See <https://useskl.com>.
package/bin/skl.cjs ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ // skl launcher (ADR-0050): resolves the platform-specific binary package
3
+ // (installed via the launcher's optionalDependencies, so npm pulls only the one
4
+ // matching this machine's os/cpu) and execs it. This is the compiled-binary npm
5
+ // pattern — there is NO postinstall download.
6
+ "use strict";
7
+
8
+ const { spawnSync } = require("node:child_process");
9
+
10
+ const OS = { darwin: "darwin", linux: "linux" }[process.platform];
11
+ const CPU = { arm64: "arm64", x64: "x64" }[process.arch];
12
+
13
+ if (!OS || !CPU) {
14
+ console.error(
15
+ `skl: unsupported platform ${process.platform}-${process.arch}. Download a binary from https://github.com/loopdoop/skl/releases`,
16
+ );
17
+ process.exit(1);
18
+ }
19
+
20
+ const pkg = `skl-cli-${OS}-${CPU}`;
21
+ let binPath;
22
+ try {
23
+ binPath = require.resolve(`${pkg}/bin/skl`);
24
+ } catch {
25
+ console.error(
26
+ `skl: missing platform package '${pkg}'. Reinstall skl (npm i -g skl-cli), or download a binary from https://github.com/loopdoop/skl/releases`,
27
+ );
28
+ process.exit(1);
29
+ }
30
+
31
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: "inherit" });
32
+ if (result.error) {
33
+ console.error(`skl: failed to run ${binPath}: ${result.error.message}`);
34
+ process.exit(1);
35
+ }
36
+ // Mirror the child's exit signal/code.
37
+ process.exit(result.status === null ? 1 : result.status);
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "useskl",
3
+ "version": "0.1.2",
4
+ "description": "Self-hosted, cross-harness skill distribution & management CLI (the `skl` command)",
5
+ "bin": {
6
+ "skl": "bin/skl.cjs"
7
+ },
8
+ "files": [
9
+ "bin/skl.cjs"
10
+ ],
11
+ "optionalDependencies": {
12
+ "skl-cli-darwin-arm64": "0.1.2",
13
+ "skl-cli-darwin-x64": "0.1.2",
14
+ "skl-cli-linux-x64": "0.1.2",
15
+ "skl-cli-linux-arm64": "0.1.2"
16
+ },
17
+ "license": "UNLICENSED",
18
+ "homepage": "https://useskl.com",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/loopdoop/skl.git"
22
+ }
23
+ }