@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 +1 -1
- package/dist/commands/view.js +16 -5
- package/dist/help.js +4 -2
- package/dist/index.js +1 -0
- package/package.json +1 -1
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. |
|
package/dist/commands/view.js
CHANGED
|
@@ -39,11 +39,22 @@ export async function view(args) {
|
|
|
39
39
|
console.log(JSON.stringify(detail));
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
console.log(
|
|
43
|
-
console.log(detail.
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
package/package.json
CHANGED