@ahood/cli 0.3.4 → 0.3.6

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
@@ -29,30 +29,32 @@ For CI or any non-interactive environment, set `AHOOD_TOKEN` instead of running
29
29
 
30
30
  ## Commands
31
31
 
32
- <!-- Kept in sync by hand with cli/src/help.ts's COMMANDS_HELP (the terminal
33
- --help output's source) and app/docs/page.tsx's COMMANDS array -- update
34
- all three when a command changes. -->
32
+ <!-- Generated from src/help.ts's COMMANDS_HELP by scripts/sync-readme.mjs --
33
+ do not hand-edit the table below. Run `npm run sync-readme` after
34
+ changing COMMANDS_HELP to regenerate it. -->
35
35
 
36
+ <!-- COMMANDS_TABLE_START -->
36
37
  | Command | What it does |
37
38
  | --- | --- |
38
- | `ahood login` | Device-code browser login, stores a token at `~/.config/ahood/credentials.json` (or `$XDG_CONFIG_HOME/ahood/`). |
39
+ | `ahood login` | Device-code browser login, stores a token locally. |
39
40
  | `ahood logout` | Removes the stored token. |
40
41
  | `ahood whoami [--json]` | Reports whether your stored token still authenticates. |
41
42
  | `ahood search <query> [--json] [--limit <n>]` | Search published skills. |
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
- | `ahood versions <owner>/<skill> [--json]` | List a skill's published-version history -- version, changelog, size, and publish date. Most-recent first. |
44
- | `ahood list-mine [--json]` | List your own skills, public and private, with their visibility and download/star counts. |
45
- | `ahood add <owner>/<skill>[@version]` | Install into `.claude/skills/<owner>/<skill>/`, pinned in `.claude/skills.lock.json`. |
46
- | `ahood update [<owner>/<skill> ...] [--dry-run] [--json]` | Move the lockfile pin(s) forward to the latest version. One skill failing to update doesn't stop the rest. `--dry-run` previews current vs. latest version (plus the changelog for anything behind) without installing anything; add `--json` for structured output. |
47
- | `ahood remove <owner>/<skill>` | Uninstall and unpin (local only -- does not affect the published skill). |
48
- | `ahood edit <owner>/<skill> [--tagline] [--tags] [--license] [--visibility] [--homepage] [--repository]` | Update a skill you own. Only the flags you pass are changed; requires the `publish` scope. |
49
- | `ahood unpublish <owner>/<skill>[@version] [--yes]` | Without `@version`, deletes the skill from the registry for every consumer, not just your local install. With `@version`, yanks just that version instead of deleting the whole skill -- it's marked yanked, not removed; existing lockfile pins still resolve, but new installs are warned off it. Prompts for a typed "yes" confirmation, or pass `--yes` for scripts/CI. |
43
+ | `ahood view\|show <owner>/<skill> [--json] [--web]` | Show a single skill's details -- tags, license, homepage, repository, dates, and more -- without installing it (alias: ahood show). |
44
+ | `ahood versions <owner>/<skill> [--json]` | List a skill's published-version history -- version, changelog, size, and publish date. |
45
+ | `ahood list-mine [--json]` | List your own skills, public and private. |
46
+ | `ahood add <owner>/<skill>[@version]` | Install a skill into .claude/skills/, pinned in the lockfile. |
47
+ | `ahood update [<owner>/<skill> ...] [--dry-run] [--json]` | Move the lockfile pin(s) forward to the latest version, for one skill or all installed skills at once. |
48
+ | `ahood remove <owner>/<skill>` | Uninstall and unpin a skill (local only). |
49
+ | `ahood edit <owner>/<skill> [--tagline] [--tags] [--license] [--visibility] [--homepage] [--repository]` | Update a skill you own, changing only the flags you pass. |
50
+ | `ahood unpublish <owner>/<skill>[@version] [--yes]` | Delete a skill from the registry for every consumer, or yank a single version, not just your local install (prompts for confirmation unless --yes is passed). |
50
51
  | `ahood star <owner>/<skill>` | Star a skill. |
51
52
  | `ahood unstar <owner>/<skill>` | Remove your star from a skill. |
52
- | `ahood init [name]` | Scaffold a new skill folder with a minimal, valid `SKILL.md` -- `./<name>/SKILL.md` if a name is given, `./SKILL.md` otherwise. Refuses to overwrite an existing `SKILL.md`. |
53
- | `ahood publish <owner>/<skill>@<version> [--path <dir>] [--name] [--tagline] [--tags] [--license] [--homepage] [--repository] [--json]` | Publish a new version of a skill from a folder containing `SKILL.md` (defaults to the current directory). If the skill doesn't exist yet, creates it first -- `--name` is required in that case; `--tagline`/`--tags`/`--license`/`--homepage`/`--repository` are optional and only used at creation. Processing (validation, checksumming, secret scanning) happens server-side after upload; this command polls and reports the final published/failed status. `--json` suppresses human progress lines and prints one `{version,status,...}` JSON object on completion instead. The legacy form `ahood publish <path> --owner <owner> --slug <skill> --version <x.y.z>` is still accepted. |
54
- | `ahood token create <name>\|list [--json]\|revoke <id>` | Manage personal API tokens. Creating a token requires an existing logged-in session -- see the docs. |
53
+ | `ahood init [name]` | Scaffold a new skill folder with a minimal, valid SKILL.md. |
54
+ | `ahood publish <owner>/<skill>@<version> [--path <dir>] [--name <text>] [--tagline <text>] [--tags <comma,separated>] [--license <id>] [--homepage <url>] [--repository <url>] [--json]` | Publish a new version of a skill from a folder containing SKILL.md, creating the skill first if it doesn't already exist. |
55
+ | `ahood token create <name>\|list [--json]\|revoke <id> [--yes]` | Manage personal API tokens. |
55
56
  | `ahood completion <bash\|zsh\|fish>` | Print a shell completion script for the command names. |
57
+ <!-- COMMANDS_TABLE_END -->
56
58
 
57
59
  Run `ahood help`, `ahood help <command>`, or `ahood <command> --help` for the same reference directly in your terminal. `ahood --version` prints the installed CLI version.
58
60
 
@@ -48,4 +48,7 @@ export async function edit(args) {
48
48
  body: JSON.stringify(body),
49
49
  });
50
50
  console.log(`Updated ${owner}/${updated.slug}: tagline=${JSON.stringify(updated.tagline)}, license=${JSON.stringify(updated.license)}, visibility=${updated.visibility}, tags=[${updated.tags.join(", ")}]`);
51
+ if (updated.tags_warning) {
52
+ console.warn(`WARNING: ${updated.tags_warning}`);
53
+ }
51
54
  }
@@ -55,8 +55,18 @@ export async function unpublish(args) {
55
55
  // just scoped one level down to skill_versions.yanked_at/yanked_reason
56
56
  // instead of skills.deleted_at. Mirroring that existing verb/path
57
57
  // convention rather than inventing a new one.
58
- await apiJson(`/api/v1/skills/${encodeURIComponent(owner)}/${encodeURIComponent(skill)}/versions/${encodeURIComponent(version)}`, { method: "DELETE" });
58
+ const result = await apiJson(`/api/v1/skills/${encodeURIComponent(owner)}/${encodeURIComponent(skill)}/versions/${encodeURIComponent(version)}`, { method: "DELETE" });
59
59
  console.log(`Yanked ${key}. Existing lockfile pins still resolve; new installs will be warned off it.`);
60
+ // yankVersion (lib/skills/mutations.ts) still returns ok:true here even
61
+ // when the yank itself succeeded but the latest_version_id recompute
62
+ // that follows it failed -- it attaches this field instead of failing
63
+ // the whole request, since the yank already took effect. Discarding the
64
+ // response body would silently drop that signal (ahood-cli#68): the
65
+ // pointer could now be stale with nothing in the terminal to say so, and
66
+ // a later `ahood add owner/skill` trusts latest_version_id completely.
67
+ if (result.latest_version_warning) {
68
+ console.warn(`WARNING: ${result.latest_version_warning}`);
69
+ }
60
70
  return;
61
71
  }
62
72
  const { owner, skill } = parseOwnerSkill(spec, USAGE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahood/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
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",
@@ -28,7 +28,8 @@
28
28
  "scripts": {
29
29
  "build": "tsc -p tsconfig.json",
30
30
  "prepublishOnly": "npm run build",
31
- "test": "vitest run"
31
+ "test": "vitest run",
32
+ "sync-readme": "node scripts/sync-readme.mjs"
32
33
  },
33
34
  "dependencies": {
34
35
  "tar-stream": "^3.2.1"