ht-skills 0.1.2 → 0.1.3

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 +2 -1
  2. package/lib/cli.js +28 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ CLI for installing and submitting skills from HT Skills Marketplace.
5
5
  ## Usage
6
6
 
7
7
  ```powershell
8
- npx ht-skills install repo-bug-analyze --registry http://skills.ic.aeroht.local
8
+ npx ht-skills add http://skills.ic.aeroht.local --skill repo-bug-analyze
9
9
  ```
10
10
 
11
11
  ## Commands
@@ -14,4 +14,5 @@ npx ht-skills install repo-bug-analyze --registry http://skills.ic.aeroht.local
14
14
  ht-skills search <query> [--registry <url>] [--limit <n>]
15
15
  ht-skills submit <skillDir> [--registry <url>] [--submitter <name>] [--visibility public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
16
16
  ht-skills install <slug[@version]> [--registry <url>] [--target <dir>] [--tool codex|claude|vscode]
17
+ ht-skills add <registry> --skill <slug[@version]> [--tool codex|claude|vscode]
17
18
  ```
package/lib/cli.js CHANGED
@@ -41,13 +41,15 @@ function printHelp() {
41
41
  ht-skills search <query> [--registry <url>] [--limit <n>]
42
42
  ht-skills submit <skillDir> [--registry <url>] [--submitter <name>] [--visibility public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
43
43
  ht-skills install <slug[@version]> [--registry <url>] [--target <dir>] [--tool codex|claude|vscode]
44
+ ht-skills add <registry> --skill <slug[@version]> [--tool codex|claude|vscode]
44
45
 
45
46
  Examples:
46
47
  ht-skills search openai --registry http://localhost:8787
47
48
  ht-skills submit ./examples/hello-skill --registry http://localhost:8787
48
49
  ht-skills install hello-skill@1.0.0 --registry http://localhost:8787 --tool codex
49
50
  ht-skills install hello-skill@1.0.0 --registry http://localhost:8787 --tool codex,claude,vscode
50
- ht-skills install hello-skill --registry http://localhost:8787`);
51
+ ht-skills install hello-skill --registry http://localhost:8787
52
+ ht-skills add http://localhost:8787 --skill hello-skill`);
51
53
  }
52
54
 
53
55
  function parseArgs(argv) {
@@ -703,6 +705,26 @@ async function cmdSubmit(flags, deps = {}) {
703
705
  log(JSON.stringify(result, null, 2));
704
706
  }
705
707
 
708
+ async function cmdAdd(flags, deps = {}) {
709
+ const source = String(flags._[0] || "").trim();
710
+ const skill = String(flags.skill || "").trim();
711
+
712
+ if (!source) {
713
+ throw new Error("add requires a registry URL, for example ht-skills add http://localhost:8787 --skill hello-skill");
714
+ }
715
+ if (!skill) {
716
+ throw new Error("add requires --skill <slug> or --skill <slug@version>");
717
+ }
718
+
719
+ const installFlags = {
720
+ ...flags,
721
+ _: [skill],
722
+ registry: source,
723
+ };
724
+
725
+ return cmdInstall(installFlags, deps);
726
+ }
727
+
706
728
  async function main(argv = process.argv) {
707
729
  const [, , command, ...rest] = argv;
708
730
  const flags = parseArgs(rest);
@@ -719,6 +741,10 @@ async function main(argv = process.argv) {
719
741
  await cmdInstall(flags);
720
742
  return;
721
743
  }
744
+ if (command === "add") {
745
+ await cmdAdd(flags);
746
+ return;
747
+ }
722
748
  if (command === "submit") {
723
749
  await cmdSubmit(flags);
724
750
  return;
@@ -737,6 +763,7 @@ module.exports = {
737
763
  resolveInstallTargets,
738
764
  fetchResolvedVersion,
739
765
  cmdInstall,
766
+ cmdAdd,
740
767
  cmdSearch,
741
768
  cmdSubmit,
742
769
  main,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ht-skills",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "CLI for installing and submitting skills from HT Skills Marketplace.",
5
5
  "type": "commonjs",
6
6
  "bin": {