@windyroad/agent-plugins 0.1.1 → 0.1.2-preview.13

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/bin/install.mjs CHANGED
@@ -22,16 +22,17 @@ const PLUGINS = [
22
22
  const HELP = `
23
23
  Usage: npx @windyroad/agent-plugins [options]
24
24
 
25
- Install, update, or uninstall all Windy Road AI agent plugins and skills.
25
+ Install, update, or uninstall all Windy Road AI agent plugins.
26
26
 
27
27
  Commands:
28
- (default) Install all plugins and skills
29
- --update Update marketplace and reinstall all plugins and skills
30
- --uninstall Remove all plugins and skills
28
+ (default) Install all plugins (project scope)
29
+ --update Update marketplace and reinstall all plugins
30
+ --uninstall Remove all plugins
31
31
 
32
32
  Options:
33
33
  --plugin <names> Install only specific plugins (space-separated)
34
34
  e.g. --plugin architect tdd risk-scorer
35
+ --scope <scope> Installation scope: project (default) or user
35
36
  --dry-run Show what would be done without executing
36
37
  --help, -h Show this help
37
38
 
@@ -54,6 +55,7 @@ function parseArgs(argv) {
54
55
  update: false,
55
56
  dryRun: false,
56
57
  plugins: null,
58
+ scope: "project",
57
59
  };
58
60
 
59
61
  for (let i = 0; i < args.length; i++) {
@@ -71,6 +73,14 @@ function parseArgs(argv) {
71
73
  case "--dry-run":
72
74
  flags.dryRun = true;
73
75
  break;
76
+ case "--scope":
77
+ i++;
78
+ if (!args[i] || !["project", "user", "local"].includes(args[i])) {
79
+ console.error("--scope requires: project, user, or local");
80
+ process.exit(1);
81
+ }
82
+ flags.scope = args[i];
83
+ break;
74
84
  case "--plugin":
75
85
  case "--plugins": {
76
86
  flags.plugins = [];
@@ -104,28 +114,25 @@ function parseArgs(argv) {
104
114
  return flags;
105
115
  }
106
116
 
107
- function doInstall(plugins) {
108
- console.log("\nInstalling Windy Road AI agent plugins and skills...\n");
117
+ function doInstall(plugins, { scope = "project" } = {}) {
118
+ console.log(`\nInstalling Windy Road AI agent plugins (${scope} scope)...\n`);
109
119
 
110
- console.log("[1/3] Adding marketplace...");
120
+ console.log("[1/2] Adding marketplace...");
111
121
  utils.addMarketplace();
112
122
 
113
- console.log(`\n[2/3] Installing plugins (${plugins.length})...`);
123
+ console.log(`\n[2/2] Installing plugins (${plugins.length})...`);
114
124
  let installed = 0;
115
125
  for (const plugin of plugins) {
116
- if (utils.installPlugin(plugin)) installed++;
126
+ if (utils.installPlugin(plugin, { scope })) installed++;
117
127
  }
118
128
  console.log(` ${installed}/${plugins.length} plugins installed.`);
119
129
 
120
- console.log("\n[3/3] Installing skills...");
121
- utils.installSkills();
122
-
123
130
  console.log(`
124
131
  Done! Restart Claude Code to activate all plugins.
125
132
 
126
133
  Installed:
127
- - ${installed} plugins (agents + hooks)
128
- - Skills (type /wr: to see them in autocomplete)
134
+ - ${installed} plugins (agents, hooks, and skills)
135
+ - Type /wr: to see skills in autocomplete
129
136
 
130
137
  To update: npx @windyroad/agent-plugins --update
131
138
  To uninstall: npx @windyroad/agent-plugins --uninstall
@@ -133,24 +140,21 @@ To uninstall: npx @windyroad/agent-plugins --uninstall
133
140
  }
134
141
 
135
142
  function doUpdate(plugins) {
136
- console.log("\nUpdating Windy Road AI agent plugins and skills...\n");
143
+ console.log("\nUpdating Windy Road AI agent plugins...\n");
137
144
 
138
- console.log("[1/3] Updating marketplace...");
145
+ console.log("[1/2] Updating marketplace...");
139
146
  utils.run(
140
147
  `claude plugin marketplace update ${utils.MARKETPLACE_NAME}`,
141
148
  `Marketplace: ${utils.MARKETPLACE_NAME}`
142
149
  );
143
150
 
144
- console.log(`\n[2/3] Updating plugins (${plugins.length})...`);
151
+ console.log(`\n[2/2] Updating plugins (${plugins.length})...`);
145
152
  let updated = 0;
146
153
  for (const plugin of plugins) {
147
154
  if (utils.updatePlugin(plugin)) updated++;
148
155
  }
149
156
  console.log(` ${updated}/${plugins.length} plugins updated.`);
150
157
 
151
- console.log("\n[3/3] Updating skills...");
152
- utils.updateSkills();
153
-
154
158
  console.log("\nDone! Restart Claude Code to apply updates.\n");
155
159
  }
156
160
 
@@ -161,8 +165,6 @@ function doUninstall(plugins) {
161
165
  utils.uninstallPlugin(plugin);
162
166
  }
163
167
 
164
- utils.removeSkills();
165
-
166
168
  console.log("\nDone. Restart Claude Code to apply changes.\n");
167
169
  }
168
170
 
@@ -187,5 +189,5 @@ if (flags.uninstall) {
187
189
  } else if (flags.update) {
188
190
  doUpdate(plugins);
189
191
  } else {
190
- doInstall(plugins);
192
+ doInstall(plugins, { scope: flags.scope });
191
193
  }
@@ -46,15 +46,6 @@ export function checkPrerequisites() {
46
46
  );
47
47
  process.exit(1);
48
48
  }
49
-
50
- try {
51
- execSync("npx --version", { stdio: "pipe" });
52
- } catch {
53
- console.error(
54
- "Error: 'npx' not found. Install Node.js first:\n https://nodejs.org\n"
55
- );
56
- process.exit(1);
57
- }
58
49
  }
59
50
 
60
51
  export function addMarketplace() {
@@ -64,9 +55,9 @@ export function addMarketplace() {
64
55
  );
65
56
  }
66
57
 
67
- export function installPlugin(pluginName) {
58
+ export function installPlugin(pluginName, { scope = "project" } = {}) {
68
59
  return run(
69
- `claude plugin install ${pluginName}@${MARKETPLACE_NAME}`,
60
+ `claude plugin install ${pluginName}@${MARKETPLACE_NAME} --scope ${scope}`,
70
61
  pluginName
71
62
  );
72
63
  }
@@ -79,33 +70,14 @@ export function uninstallPlugin(pluginName) {
79
70
  return run(`claude plugin uninstall ${pluginName}`, `Removing ${pluginName}`);
80
71
  }
81
72
 
82
- export function installSkills() {
83
- return run(
84
- `npx -y skills add --yes --all ${MARKETPLACE_REPO}`,
85
- "Skills (via skills package)"
86
- );
87
- }
88
-
89
- export function updateSkills() {
90
- return run("npx -y skills update", "Skills update");
91
- }
92
-
93
- export function removeSkills() {
94
- return run(
95
- `npx -y skills remove --yes --all ${MARKETPLACE_REPO}`,
96
- "Removing skills"
97
- );
98
- }
99
-
100
73
  /**
101
- * Install a single package: marketplace add + plugin install + skills.
74
+ * Install a single package: marketplace add + plugin install.
102
75
  */
103
- export function installPackage(pluginName, { deps = [] } = {}) {
104
- console.log(`\nInstalling @windyroad/${pluginName.replace("wr-", "")}...\n`);
76
+ export function installPackage(pluginName, { deps = [], scope = "project" } = {}) {
77
+ console.log(`\nInstalling @windyroad/${pluginName.replace("wr-", "")} (${scope} scope)...\n`);
105
78
 
106
79
  addMarketplace();
107
- installPlugin(pluginName);
108
- installSkills();
80
+ installPlugin(pluginName, { scope });
109
81
 
110
82
  if (deps.length > 0) {
111
83
  console.log(`\nNote: This plugin works best with:`);
@@ -130,7 +102,6 @@ export function updatePackage(pluginName) {
130
102
  "Updating marketplace"
131
103
  );
132
104
  updatePlugin(pluginName);
133
- updateSkills();
134
105
 
135
106
  console.log("\nDone! Restart Claude Code to apply updates.\n");
136
107
  }
@@ -144,9 +115,6 @@ export function uninstallPackage(pluginName) {
144
115
  uninstallPlugin(pluginName);
145
116
 
146
117
  console.log("\nDone. Restart Claude Code to apply changes.\n");
147
- console.log("Note: Skills are shared across packages. Run");
148
- console.log(" npx @windyroad/agent-plugins --uninstall");
149
- console.log("to remove all skills.\n");
150
118
  }
151
119
 
152
120
  /**
@@ -154,10 +122,22 @@ export function uninstallPackage(pluginName) {
154
122
  */
155
123
  export function parseStandardArgs(argv) {
156
124
  const args = argv.slice(2);
157
- return {
125
+ const flags = {
158
126
  help: args.includes("--help") || args.includes("-h"),
159
127
  uninstall: args.includes("--uninstall"),
160
128
  update: args.includes("--update"),
161
129
  dryRun: args.includes("--dry-run"),
130
+ scope: "project",
162
131
  };
132
+ const scopeIdx = args.indexOf("--scope");
133
+ if (scopeIdx !== -1 && args[scopeIdx + 1]) {
134
+ const val = args[scopeIdx + 1];
135
+ if (["project", "user", "local"].includes(val)) {
136
+ flags.scope = val;
137
+ } else {
138
+ console.error("--scope requires: project, user, or local");
139
+ process.exit(1);
140
+ }
141
+ }
142
+ return flags;
163
143
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/agent-plugins",
3
- "version": "0.1.1",
3
+ "version": "0.1.2-preview.13",
4
4
  "description": "One-command installer for all Windy Road AI agent plugins and skills",
5
5
  "bin": {
6
6
  "windyroad-agent-plugins": "./bin/install.mjs"