ht-skills 0.2.1 → 0.2.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 +3 -3
  2. package/lib/cli.js +33 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,13 +12,13 @@ npx ht-skills add --skill repo-bug-analyze
12
12
 
13
13
  ```text
14
14
  ht-skills login [--registry <url>]
15
- ht-skills publish [skillDir] [--registry <url>] [--visibility public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
15
+ ht-skills publish [skillDir] [--registry <url>] [--access public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
16
16
  ht-skills search <query> [--registry <url>] [--limit <n>]
17
17
  ht-skills submit <skillDir> [--registry <url>] [--submitter <name>] [--visibility public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
18
18
  ht-skills install <slug[@version]> [more-skills...] [--registry <url>] [--target <dir>] [--tool codex|claude|vscode]
19
19
  ht-skills add [registry] --skill <slug[@version]>,<slug[@version]> [--tool codex|claude|vscode]
20
20
  ```
21
21
 
22
- `login` opens the browser, completes marketplace sign-in, and stores a registry token under `~/.ht-skills/config.json`.
22
+ `login` prints a dedicated `/cli-login` URL, waits for Enter, opens the browser, and stores the approved registry token under `~/.ht-skills/config.json`.
23
23
 
24
- `publish` zips the target skill directory, uploads it through the marketplace package inspection flow, and then submits the generated preview token for review.
24
+ `publish` zips the target skill directory, uploads it through the marketplace package inspection flow, and then submits the generated preview token for review. The default access is `public`; use `--access private` to keep the skill private before review.
package/lib/cli.js CHANGED
@@ -48,7 +48,7 @@ function printHelp() {
48
48
  console.log(`Usage:
49
49
  ht-skills search <query> [--registry <url>] [--limit <n>]
50
50
  ht-skills login [--registry <url>]
51
- ht-skills publish [skillDir] [--registry <url>] [--visibility public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
51
+ ht-skills publish [skillDir] [--registry <url>] [--access public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
52
52
  ht-skills submit <skillDir> [--registry <url>] [--submitter <name>] [--visibility public|private|shared] [--shared-with a@b.com,c@d.com] [--publish-now]
53
53
  ht-skills install <slug[@version]> [more-skills...] [--registry <url>] [--target <dir>] [--tool codex|claude|vscode]
54
54
  ht-skills add [registry] --skill <slug[@version]>,<slug[@version]> [--tool codex|claude|vscode]
@@ -57,6 +57,7 @@ Examples:
57
57
  ht-skills search openai
58
58
  ht-skills login
59
59
  ht-skills publish .
60
+ ht-skills publish . --access private
60
61
  ht-skills submit ./examples/hello-skill
61
62
  ht-skills install hello-skill@1.0.0 --tool codex
62
63
  ht-skills install hello-skill repo-bug-analyze --tool codex
@@ -238,6 +239,32 @@ function summarizePreviewErrors(preview) {
238
239
  return errors.slice(0, 4).join("; ");
239
240
  }
240
241
 
242
+ async function promptToOpenBrowser(url, deps = {}) {
243
+ const ask = deps.ask || null;
244
+ if (ask) {
245
+ await ask(`Press Enter to open the browser for:\n${url}\n`);
246
+ return;
247
+ }
248
+
249
+ const isInteractive = typeof deps.isInteractive === "boolean"
250
+ ? deps.isInteractive
251
+ : Boolean(process.stdin.isTTY && process.stdout.isTTY);
252
+
253
+ if (!isInteractive) {
254
+ return;
255
+ }
256
+
257
+ const rl = readline.createInterface({
258
+ input: process.stdin,
259
+ output: process.stdout,
260
+ });
261
+ try {
262
+ await rl.question(`Press Enter to open the browser for:\n${url}\n`);
263
+ } finally {
264
+ rl.close();
265
+ }
266
+ }
267
+
241
268
  function formatInstallError(error, { slug, version = null, registry, stage = "resolve" }) {
242
269
  const rawMessage = String(error?.message || "Install failed").trim();
243
270
  const status = Number(error?.status || 0);
@@ -1252,6 +1279,9 @@ async function cmdLogin(flags, deps = {}) {
1252
1279
  throw new Error("registry did not return a usable CLI login flow");
1253
1280
  }
1254
1281
 
1282
+ log(`Complete CLI sign-in here:\n${browserUrl}`);
1283
+ await promptToOpenBrowser(browserUrl, deps);
1284
+
1255
1285
  try {
1256
1286
  await Promise.resolve(openBrowser(browserUrl));
1257
1287
  log(`Opened browser for ${registry}. Complete sign-in to continue...`);
@@ -1328,12 +1358,11 @@ async function cmdPublish(flags, deps = {}) {
1328
1358
  throw new Error(summarizePreviewErrors(preview));
1329
1359
  }
1330
1360
 
1361
+ const visibility = String(flags.access || flags.visibility || "public").trim().toLowerCase() || "public";
1331
1362
  const body = {
1332
1363
  preview_token: preview.preview_token,
1364
+ visibility,
1333
1365
  };
1334
- if (flags.visibility) {
1335
- body.visibility = String(flags.visibility);
1336
- }
1337
1366
  if (flags["shared-with"]) {
1338
1367
  body.shared_with = String(flags["shared-with"])
1339
1368
  .split(",")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ht-skills",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "CLI for installing and submitting skills from HT Skills Marketplace.",
5
5
  "type": "commonjs",
6
6
  "bin": {