@skillsmanager/cli 0.0.4 → 0.0.5

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/dist/index.js CHANGED
@@ -14,8 +14,11 @@ import { updateCommand } from "./commands/update.js";
14
14
  import { refreshCommand } from "./commands/refresh.js";
15
15
  import { setupGoogleCommand } from "./commands/setup/google.js";
16
16
  import { setupGithubCommand } from "./commands/setup/github.js";
17
+ import { logoutGoogleCommand, logoutGithubCommand } from "./commands/logout.js";
17
18
  import { collectionCreateCommand } from "./commands/collection.js";
19
+ import { skillDeleteCommand } from "./commands/skill.js";
18
20
  import { installCommand, uninstallCommand } from "./commands/install.js";
21
+ import { statusCommand } from "./commands/status.js";
19
22
  import { registryCreateCommand, registryListCommand, registryDiscoverCommand, registryAddCollectionCommand, registryRemoveCollectionCommand, registryPushCommand, } from "./commands/registry.js";
20
23
  const supportedAgents = Object.keys(AGENT_PATHS).join(", ");
21
24
  // Read the bundled SKILL.md as the CLI help — single source of truth
@@ -44,7 +47,24 @@ setup
44
47
  .command("github")
45
48
  .description("One-time GitHub setup — checks gh CLI and runs gh auth login")
46
49
  .action(setupGithubCommand);
50
+ // ── Logout ───────────────────────────────────────────────────────────────────
51
+ const logout = program
52
+ .command("logout")
53
+ .description("Log out of a storage backend");
54
+ logout
55
+ .command("google")
56
+ .description("Clear Google OAuth session (and optionally credentials)")
57
+ .option("--all", "Also remove credentials.json to start setup from scratch")
58
+ .action((options) => logoutGoogleCommand(options));
59
+ logout
60
+ .command("github")
61
+ .description("Log out of GitHub (runs gh auth logout)")
62
+ .action(logoutGithubCommand);
47
63
  // ── Core commands ────────────────────────────────────────────────────────────
64
+ program
65
+ .command("status")
66
+ .description("Show login status and identity for each backend")
67
+ .action(statusCommand);
48
68
  program
49
69
  .command("init")
50
70
  .description("Authenticate and discover collections (runs automatically when needed)")
@@ -64,10 +84,13 @@ program
64
84
  .option("--scope <scope>", "global (~/.agent/skills/) or project (./.agent/skills/)", "global")
65
85
  .action((names, options) => fetchCommand(names, options));
66
86
  program
67
- .command("add <path>")
68
- .description("Upload a local skill directory to a collection")
87
+ .command("add [path]")
88
+ .description("Upload a local skill directory to a collection, or register a remote path")
69
89
  .option("--collection <name>", "Target collection (default: first available)")
70
- .action((skillPath, options) => addCommand(skillPath, options));
90
+ .option("--remote-path <rel/path>", "Register a skill path from the collection's skills-source repo (no local files needed)")
91
+ .option("--name <name>", "Skill name (required with --remote-path)")
92
+ .option("--description <desc>", "Skill description (used with --remote-path)")
93
+ .action((skillPath, options) => addCommand(skillPath ?? "", options));
71
94
  program
72
95
  .command("update <path>")
73
96
  .description("Push local edits to a skill back to storage and refresh cache")
@@ -77,6 +100,15 @@ program
77
100
  .command("refresh")
78
101
  .description("Re-discover collections from storage")
79
102
  .action(refreshCommand);
103
+ // ── Skill ────────────────────────────────────────────────────────────────────
104
+ const skill = program
105
+ .command("skill")
106
+ .description("Manage individual skills");
107
+ skill
108
+ .command("delete <name>")
109
+ .description("Delete a single skill from a collection")
110
+ .option("--collection <name>", "Collection to delete from (required if skill is in multiple)")
111
+ .action((name, options) => skillDeleteCommand(name, options));
80
112
  // ── Collection ───────────────────────────────────────────────────────────────
81
113
  const collection = program
82
114
  .command("collection")
@@ -86,6 +118,7 @@ collection
86
118
  .description("Create a new collection (defaults to SKILLS_MY_SKILLS)")
87
119
  .option("--backend <backend>", "gdrive (default) or github", "gdrive")
88
120
  .option("--repo <owner/repo>", "GitHub repo to use (required for --backend github)")
121
+ .option("--skills-repo <owner/repo>", "GitHub repo where skills live (github backend only; defaults to --repo)")
89
122
  .action((name, options) => collectionCreateCommand(name, options));
90
123
  // ── Registry ─────────────────────────────────────────────────────────────────
91
124
  const registry = program
@@ -116,6 +149,7 @@ registry
116
149
  .command("remove-collection <name>")
117
150
  .description("Remove a collection reference from the registry")
118
151
  .option("--delete", "Also delete the collection and all its skills from the backend")
152
+ .option("--backend <backend>", "Backend the collection lives on (local, gdrive, github)")
119
153
  .action((name, options) => registryRemoveCollectionCommand(name, options));
120
154
  registry
121
155
  .command("push")
package/dist/registry.js CHANGED
@@ -6,7 +6,7 @@ export const LEGACY_COLLECTION_FILENAME = "SKILLS_SYNC.yaml";
6
6
  // ── Collection (formerly "registry") parsing ─────────────────────────────────
7
7
  export function parseCollection(content) {
8
8
  const data = YAML.parse(content);
9
- return {
9
+ const col = {
10
10
  name: data.name ?? "",
11
11
  owner: data.owner ?? "",
12
12
  skills: (data.skills ?? []).map((s) => ({
@@ -15,9 +15,13 @@ export function parseCollection(content) {
15
15
  description: s.description ?? "",
16
16
  })),
17
17
  };
18
+ if (data.metadata && typeof data.metadata === "object") {
19
+ col.metadata = data.metadata;
20
+ }
21
+ return col;
18
22
  }
19
23
  export function serializeCollection(collection) {
20
- return YAML.stringify({
24
+ const obj = {
21
25
  name: collection.name,
22
26
  owner: collection.owner,
23
27
  skills: collection.skills.map((s) => ({
@@ -25,7 +29,11 @@ export function serializeCollection(collection) {
25
29
  path: s.path,
26
30
  description: s.description,
27
31
  })),
28
- });
32
+ };
33
+ if (collection.metadata && Object.keys(collection.metadata).length > 0) {
34
+ obj.metadata = collection.metadata;
35
+ }
36
+ return YAML.stringify(obj);
29
37
  }
30
38
  // Backwards-compat aliases
31
39
  export const parseRegistry = parseCollection;
package/dist/types.d.ts CHANGED
@@ -7,6 +7,7 @@ export interface CollectionFile {
7
7
  name: string;
8
8
  owner: string;
9
9
  skills: SkillEntry[];
10
+ metadata?: Record<string, unknown>;
10
11
  }
11
12
  export interface CollectionInfo {
12
13
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillsmanager/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Discover, fetch, and manage agent skills from local or remote storage",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,7 +35,7 @@
35
35
  "url": "git+https://github.com/talktoajayprakash/skillsmanager.git"
36
36
  },
37
37
  "author": "Ajay Prakash",
38
- "license": "MIT",
38
+ "license": "Apache-2.0",
39
39
  "homepage": "https://github.com/talktoajayprakash/skillsmanager#readme",
40
40
  "dependencies": {
41
41
  "chalk": "^4.1.2",
@@ -11,6 +11,7 @@ Skills Manager is a CLI tool for managing agent skills stored locally or in remo
11
11
 
12
12
  - Local storage works out of the box — no setup needed.
13
13
  - For Google Drive: a human must run `skillsmanager setup google` once to configure credentials.
14
+ - For GitHub: requires the `gh` CLI to be installed and authenticated (`gh auth login`). No additional skillsmanager setup needed.
14
15
  - All commands except `setup google` are non-interactive and designed for agent use.
15
16
 
16
17
  ## Commands
@@ -57,6 +58,16 @@ skillsmanager update <path> --collection <name>
57
58
 
58
59
  After updating, the local cache is refreshed so all symlinks on this machine reflect the change immediately.
59
60
 
61
+ ### Delete a skill
62
+
63
+ ```bash
64
+ # Delete a skill from its collection (removes from backend, cache, and index)
65
+ skillsmanager skill delete <name>
66
+
67
+ # If the skill exists in multiple collections, specify which one
68
+ skillsmanager skill delete <name> --collection <collection-name>
69
+ ```
70
+
60
71
  ### Registry and collection management
61
72
 
62
73
  ```bash
@@ -66,27 +77,37 @@ skillsmanager registry create
66
77
  # Create a registry in Google Drive
67
78
  skillsmanager registry create --backend gdrive
68
79
 
80
+ # Create a registry in a GitHub repo (creates repo if it doesn't exist)
81
+ skillsmanager registry create --backend github --repo <owner/repo>
82
+
69
83
  # Show all registries and their collection references
70
84
  skillsmanager registry list
71
85
 
72
86
  # Search a backend for registries owned by the current user
73
87
  skillsmanager registry discover --backend gdrive
88
+ skillsmanager registry discover --backend github
74
89
 
75
90
  # Add a collection reference to the registry
76
91
  skillsmanager registry add-collection <name>
77
92
 
78
- # Push local registry and collections to Google Drive
93
+ # Push local registry and collections to Google Drive (safe to re-run — skips already-synced collections)
79
94
  skillsmanager registry push --backend gdrive
80
95
 
96
+ # Push local registry and collections to GitHub (safe to re-run — skips already-synced collections)
97
+ skillsmanager registry push --backend github --repo <owner/repo>
98
+
81
99
  # Remove a collection reference from the registry (keeps data)
82
100
  skillsmanager registry remove-collection <name>
83
101
 
84
102
  # Remove and permanently delete the collection and all its skills
85
103
  skillsmanager registry remove-collection <name> --delete
86
104
 
87
- # Create a new collection
105
+ # Create a new collection (local by default)
88
106
  skillsmanager collection create [name]
89
107
 
108
+ # Create a collection in a GitHub repo
109
+ skillsmanager collection create [name] --backend github --repo <owner/repo>
110
+
90
111
  # Re-discover collections from storage
91
112
  skillsmanager refresh
92
113
  ```
@@ -116,6 +137,9 @@ skillsmanager uninstall
116
137
  **User asks to share a skill they created:**
117
138
  1. Ensure the skill directory has a `SKILL.md` with `name` and `description` in YAML frontmatter
118
139
  2. `skillsmanager add <path-to-skill-directory>`
140
+ 3. Fetch the skill to make it immediately available to the agent:
141
+ - For all projects: `skillsmanager fetch <skill-name> --agent claude`
142
+ - For current project only: `skillsmanager fetch <skill-name> --agent claude --scope project`
119
143
 
120
144
  **User asks to update a skill:**
121
145
  1. Edit the skill files locally
@@ -128,9 +152,20 @@ skillsmanager uninstall
128
152
  1. `skillsmanager setup google` (one-time, human-only)
129
153
  2. `skillsmanager registry push --backend gdrive`
130
154
 
155
+ **User wants to store skills in a GitHub repo:**
156
+ 1. `skillsmanager collection create <name> --backend github --repo <owner/repo>` — creates the GitHub repo if needed, and auto-registers the collection in the existing registry (or creates a local registry if none exists)
157
+ 2. `skillsmanager add <path> --collection <name>` — upload the skill into that collection
158
+
159
+ **User wants to discover GitHub-hosted collections:**
160
+ 1. `skillsmanager registry discover --backend github`
161
+
131
162
  **User wants to see what registries and collections exist:**
132
163
  1. `skillsmanager registry list`
133
164
 
165
+ **User asks to delete/remove a single skill:**
166
+ 1. `skillsmanager skill delete <skill-name>`
167
+ 2. If the skill lives in multiple collections, add `--collection <name>` to target the right one
168
+
134
169
  **User wants to remove a collection:**
135
170
  1. `skillsmanager registry remove-collection <name>` (removes reference only, data is kept)
136
171
  2. `skillsmanager registry remove-collection <name> --delete` (permanently deletes collection and skills)
@@ -139,7 +174,7 @@ skillsmanager uninstall
139
174
 
140
175
  - **Registry** (`SKILLS_REGISTRY.yaml`): root index pointing to all collections across backends
141
176
  - **Collection** (`SKILLS_COLLECTION.yaml`): folder of skills with an index file
142
- - **Backends**: `local` (default, `~/.skillsmanager/`) and `gdrive` (Google Drive)
177
+ - **Backends**: `local` (default, `~/.skillsmanager/`), `gdrive` (Google Drive), and `github` (GitHub repo via `gh` CLI)
143
178
  - **Cache**: skills are cached at `~/.skillsmanager/cache/<uuid>/` and symlinked to agent directories
144
179
  - **Symlinks**: all agents share one cached copy — updating the cache updates all agents
145
180