@ahood/cli 0.2.0 → 0.2.1

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 CHANGED
@@ -39,7 +39,7 @@ For CI or any non-interactive environment, set `AHOOD_TOKEN` instead of running
39
39
  | `ahood logout` | Removes the stored token. |
40
40
  | `ahood whoami [--json]` | Reports whether your stored token still authenticates. |
41
41
  | `ahood search <query> [--json] [--limit <n>]` | Search published skills. |
42
- | `ahood view <owner>/<skill> [--json] [--web]` | Show a single skill's details without installing it, or open its page in a browser. |
42
+ | `ahood view <owner>/<skill> [--json] [--web]` (alias: `show`) | Show a single skill's details -- tags, license, homepage, repository, dates, etc. -- without installing it, or open its page in a browser. |
43
43
  | `ahood list-mine [--json]` | List your own skills, public and private, with their visibility and download/star counts. |
44
44
  | `ahood add <owner>/<skill>[@version]` | Install into `.claude/skills/<owner>/<skill>/`, pinned in `.claude/skills.lock.json`. |
45
45
  | `ahood update [<owner>/<skill> ...]` | Move the lockfile pin(s) forward to the latest version. One skill failing to update doesn't stop the rest. |
@@ -39,11 +39,22 @@ export async function view(args) {
39
39
  console.log(JSON.stringify(detail));
40
40
  return;
41
41
  }
42
- console.log(`${owner}/${detail.slug} (${detail.visibility})`);
43
- console.log(detail.name);
42
+ const field = (label, value) => console.log(` ${label.padEnd(13)}${value}`);
43
+ console.log(`${detail.owner}/${detail.slug}`);
44
+ field("name:", detail.name);
44
45
  if (detail.tagline)
45
- console.log(detail.tagline);
46
- console.log(`${detail.downloads_count} downloads, ${detail.stars_count} stars`);
47
- console.log(detail.skill_versions ? `latest version: ${detail.skill_versions.version}` : "no published version");
46
+ field("tagline:", detail.tagline);
47
+ field("tags:", detail.tags.length > 0 ? detail.tags.join(", ") : "-");
48
+ field("license:", detail.license ?? "-");
49
+ field("visibility:", detail.visibility);
50
+ field("homepage:", detail.homepage ?? "-");
51
+ field("repository:", detail.repository ?? "-");
52
+ field("version:", detail.skill_versions ? detail.skill_versions.version : "no published version");
53
+ field("downloads:", String(detail.downloads_count));
54
+ field("stars:", String(detail.stars_count));
55
+ field("created:", detail.created_at);
56
+ field("updated:", detail.updated_at);
57
+ if (detail.is_starred !== null)
58
+ field("starred:", detail.is_starred ? "yes" : "no");
48
59
  console.log(url);
49
60
  }
package/dist/help.js CHANGED
@@ -17,7 +17,7 @@ export const COMMANDS_HELP = [
17
17
  },
18
18
  {
19
19
  usage: "ahood view <owner>/<skill> [--json] [--web]",
20
- desc: "Show a single skill's details without installing it.",
20
+ desc: "Show a single skill's details (tags, license, homepage, repository, dates, etc.) without installing it. Alias: ahood show.",
21
21
  flags: [
22
22
  "--json Emit the raw skill object instead of formatted lines.",
23
23
  "--web Open the skill's page in your browser instead of printing.",
@@ -89,8 +89,10 @@ export const COMMANDS_HELP = [
89
89
  examples: ["ahood completion bash >> ~/.bashrc"],
90
90
  },
91
91
  ];
92
+ const COMMAND_ALIASES = { show: "view" };
92
93
  export function findCommandHelp(command) {
93
- return COMMANDS_HELP.find((c) => c.usage.startsWith(`ahood ${command} `) || c.usage === `ahood ${command}`);
94
+ const resolved = COMMAND_ALIASES[command] ?? command;
95
+ return COMMANDS_HELP.find((c) => c.usage.startsWith(`ahood ${resolved} `) || c.usage === `ahood ${resolved}`);
94
96
  }
95
97
  export function formatCommandHelp(entry) {
96
98
  const lines = [entry.usage, "", entry.desc];
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ const COMMANDS = {
33
33
  star,
34
34
  unstar,
35
35
  view,
36
+ show: view, // alias -- "ahood show" is the name issue #30 proposed; same command as "view"
36
37
  completion,
37
38
  };
38
39
  function levenshtein(a, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahood/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI for ahood, a registry for installing and publishing Claude Code skills.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/AlexKay28/ahood-cli",