claudepluginhub 0.7.0 → 0.7.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/dist/args.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Scope } from './prompts.js';
2
- type ComponentType = 'skill' | 'command' | 'agent';
2
+ declare const COMPONENT_FLAGS: readonly ["--skill", "--command", "--agent"];
3
+ export type ComponentType = (typeof COMPONENT_FLAGS)[number] extends `--${infer T}` ? T : never;
3
4
  export interface ParsedArgs {
4
5
  command: string;
5
6
  identifier: string | null;
@@ -1,4 +1,3 @@
1
1
  import type { Scope } from './prompts.js';
2
- type ComponentType = 'skill' | 'command' | 'agent';
2
+ import type { ComponentType } from './args.js';
3
3
  export declare function runDirectComponentInstall(ownerRepo: string, componentType: ComponentType, repoPath: string, pluginPath: string, yes: boolean, scopeOverride: Scope | null): Promise<void>;
4
- export {};
@@ -7,7 +7,8 @@ import { fetchDefaultBranch, fetchTree } from './github.js';
7
7
  import { print, printStep, printSuccess, printError, BOLD, RESET, DIM, GREEN, } from './output.js';
8
8
  const DIRECT_SENTINEL = '';
9
9
  /**
10
- * Validate that pluginPath has the right extension for its type.
10
+ * Validate that pluginPath has the expected path suffix for its type
11
+ * (/SKILL.md for skills, .md for commands/agents).
11
12
  */
12
13
  function validatePathFormat(componentType, pluginPath) {
13
14
  if (componentType === 'skill') {
@@ -164,7 +165,7 @@ export async function runDirectComponentInstall(ownerRepo, componentType, repoPa
164
165
  };
165
166
  const result = await installComponent(component, scope, false);
166
167
  if (result.status !== 'installed') {
167
- printError(`Failed to install ${componentName}`);
168
+ printError(`Failed to install ${componentName}. Check the error messages above for details.`);
168
169
  process.exit(1);
169
170
  }
170
171
  // Step 9: Merge into lock file
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { runList } from './list.js';
8
8
  import { isOwnerRepo } from './detect.js';
9
9
  import { runGithubInstall, runGithubRemove } from './github-install.js';
10
10
  import { findWrapperScopes } from './wrapper.js';
11
- import { readLock } from './lock.js';
11
+ import { findDirectInstallScopes } from './scope-detect.js';
12
12
  import { parseArgs, validatePlugin, validateComponentFlag } from './args.js';
13
13
  import { print, printBanner, printStep, printSuccess, printError, DIM, RESET, GREEN, CYAN, YELLOW, } from './output.js';
14
14
  const TYPE_BADGES = {
@@ -25,8 +25,8 @@ function printUsage() {
25
25
  Commands:
26
26
  <identifier> Install from a source
27
27
  add <identifier> Same as above
28
- update [identifier] Update (u/ collections only)
29
- list List (u/ collections only)
28
+ update [identifier] Update installed collections
29
+ list List all installed collections
30
30
  remove <identifier> Remove
31
31
 
32
32
  Identifiers:
@@ -34,8 +34,14 @@ Identifiers:
34
34
  u/<userId>/<slug> ClaudePluginHub collection
35
35
  https://claudepluginhub.com/api/user-plugins/.../marketplace.json
36
36
 
37
- Note: owner/repo installs use Claude Code's plugin system.
38
- - list/update only show u/ installs
37
+ Install modes:
38
+ owner/repo Full plugin install (via Claude Code plugin system)
39
+ owner/repo --skill <path> Direct single-component install (skill, command, or agent)
40
+ u/<userId>/<slug> Collection install
41
+
42
+ Notes:
43
+ - list shows all lock-backed installs (collections + direct components)
44
+ - update applies to collections only; direct installs are skipped
39
45
  - Use \`claude plugin list\` for Claude Code plugins
40
46
  - Standalone: \`npx claudepluginhub remove owner/repo\` for cleanup
41
47
 
@@ -50,17 +56,6 @@ Options:
50
56
  -h, --help Show this help
51
57
  `);
52
58
  }
53
- function findDirectInstallScopes(identifier) {
54
- const found = [];
55
- for (const scope of ['project', 'local', 'user']) {
56
- const lock = readLock(scope);
57
- const collection = lock.collections[identifier];
58
- if (collection && collection.apiUrl === '') {
59
- found.push(scope);
60
- }
61
- }
62
- return found;
63
- }
64
59
  async function main() {
65
60
  const args = process.argv.slice(2);
66
61
  if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
@@ -0,0 +1,2 @@
1
+ import type { Scope } from './prompts.js';
2
+ export declare function findDirectInstallScopes(identifier: string): Scope[];
@@ -0,0 +1,12 @@
1
+ import { readLock } from './lock.js';
2
+ export function findDirectInstallScopes(identifier) {
3
+ const found = [];
4
+ for (const scope of ['project', 'local', 'user']) {
5
+ const lock = readLock(scope);
6
+ const collection = lock.collections[identifier];
7
+ if (collection && collection.apiUrl === '') {
8
+ found.push(scope);
9
+ }
10
+ }
11
+ return found;
12
+ }
package/dist/update.js CHANGED
@@ -31,7 +31,10 @@ export async function runUpdate(identifier) {
31
31
  found = true;
32
32
  // Skip direct installs (apiUrl === '' sentinel)
33
33
  if (collection.apiUrl === '') {
34
- print(`${BOLD}${collection.identifier}${RESET} — direct install, re-run install command to update`);
34
+ print(`${BOLD}${collection.identifier}${RESET} — direct install, skipped`);
35
+ for (const comp of Object.values(collection.components)) {
36
+ print(` ${DIM}Re-install: npx claudepluginhub ${collection.identifier} --${comp.type} ${comp.sourcePath}${RESET}`);
37
+ }
35
38
  continue;
36
39
  }
37
40
  print(`${BOLD}Updating${RESET} ${collection.identifier}...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudepluginhub",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Install Claude Code components from ClaudePluginHub",
5
5
  "bin": {
6
6
  "claudepluginhub": "dist/index.js"