a11y-devkit-deploy 0.6.2 → 0.6.4

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/config/a11y.json CHANGED
@@ -15,6 +15,12 @@
15
15
  "vscode": ".github/skills",
16
16
  "local": ".github/skills"
17
17
  },
18
+ "ideMcpPaths": {
19
+ "claude": ".claude/mcp.json",
20
+ "cursor": ".cursor/mcp.json",
21
+ "codex": ".codex/mcp.json",
22
+ "vscode": ".github/mcp.json"
23
+ },
18
24
  "mcpServers": [
19
25
  {
20
26
  "name": "wcag",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a11y-devkit-deploy",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "CLI to deploy a11y skills and MCP servers across IDEs",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/cli.js CHANGED
@@ -61,7 +61,7 @@ async function run() {
61
61
  const platformInfo = getPlatform();
62
62
  const config = await loadConfig();
63
63
  const pkg = await loadPackageJson();
64
- const idePaths = getIdePaths(projectRoot, platformInfo, config.ideSkillsPaths);
64
+ const idePaths = getIdePaths(projectRoot, platformInfo, config.ideSkillsPaths, config.ideMcpPaths);
65
65
  const args = parseArgs(process.argv);
66
66
 
67
67
  header(`A11y Devkit Deploy v${pkg.version}`, "Install skills + MCP servers across IDEs");
@@ -70,13 +70,13 @@ async function run() {
70
70
  console.log("\nSkills to install:");
71
71
  config.skills.forEach((skill) => {
72
72
  const description = skillDescriptions[skill] || "No description";
73
- info(` ${skill} - ${description}`);
73
+ console.log(`${skill} - ${description}`);
74
74
  });
75
75
 
76
76
  console.log("\nMCP Servers to install:");
77
77
  config.mcpServers.forEach((server) => {
78
78
  const description = mcpDescriptions[server.name] || "No description";
79
- info(` ${server.name} - ${description}`);
79
+ console.log(`${server.name} - ${description}`);
80
80
  });
81
81
  console.log("");
82
82
 
@@ -88,6 +88,7 @@ async function run() {
88
88
  ];
89
89
 
90
90
  let scope = args.scope;
91
+ let mcpScope = null;
91
92
  let ideSelection = ["claude", "cursor", "codex", "vscode"];
92
93
  let installSkills = true;
93
94
 
@@ -99,11 +100,29 @@ async function run() {
99
100
  name: "scope",
100
101
  message: "Install skills + repo locally or globally?",
101
102
  choices: [
102
- { title: "Local to this project", value: "local" },
103
+ { title: `Local to this project (${formatPath(projectRoot)})`, value: "local" },
103
104
  { title: "Global for this user", value: "global" }
104
105
  ],
105
106
  initial: 0
106
107
  },
108
+ {
109
+ type: "select",
110
+ name: "mcpScope",
111
+ message: "Install MCP configs locally or globally?",
112
+ choices: [
113
+ {
114
+ title: `Local to this project (${formatPath(projectRoot)})`,
115
+ value: "local",
116
+ description: "Write to project-level IDE config folders (version-controllable)"
117
+ },
118
+ {
119
+ title: "Global for this user",
120
+ value: "global",
121
+ description: "Write to user-level IDE config folders"
122
+ }
123
+ ],
124
+ initial: 0
125
+ },
107
126
  {
108
127
  type: "multiselect",
109
128
  name: "ides",
@@ -129,6 +148,7 @@ async function run() {
129
148
  );
130
149
 
131
150
  scope = scope || response.scope;
151
+ mcpScope = response.mcpScope || "local";
132
152
  ideSelection = response.ides || ideSelection;
133
153
  installSkills = response.installSkills;
134
154
  }
@@ -136,13 +156,17 @@ async function run() {
136
156
  if (!scope) {
137
157
  scope = "local";
138
158
  }
159
+ if (!mcpScope) {
160
+ mcpScope = "local";
161
+ }
139
162
 
140
163
  if (!ideSelection.length) {
141
164
  warn("No IDEs selected. MCP installation requires at least one IDE.");
142
165
  process.exit(1);
143
166
  }
144
167
 
145
- info(`Install scope: ${scope === "local" ? "Local" : "Global"}`);
168
+ info(`Skills scope: ${scope === "local" ? "Local" : "Global"}`);
169
+ info(`MCP scope: ${mcpScope === "local" ? "Local" : "Global"}`);
146
170
 
147
171
  // Create temp directory for npm install
148
172
  const tempDir = path.join(getTempDir(), `.a11y-devkit-${Date.now()}`);
@@ -166,10 +190,19 @@ async function run() {
166
190
 
167
191
  // Configure MCP servers using npx (no local installation needed!)
168
192
  const mcpSpinner = startSpinner("Updating MCP configurations...");
169
- for (const ide of ideSelection) {
170
- await installMcpConfig(idePaths[ide].mcpConfig, config.mcpServers, idePaths[ide].mcpServerKey);
193
+ const mcpConfigPaths = mcpScope === "local"
194
+ ? ideSelection.map((ide) => idePaths[ide].localMcpConfig)
195
+ : ideSelection.map((ide) => idePaths[ide].mcpConfig);
196
+
197
+ for (let i = 0; i < ideSelection.length; i++) {
198
+ const ide = ideSelection[i];
199
+ await installMcpConfig(
200
+ mcpConfigPaths[i],
201
+ config.mcpServers,
202
+ idePaths[ide].mcpServerKey
203
+ );
171
204
  }
172
- mcpSpinner.succeed(`MCP configs updated for ${ideSelection.length} IDE(s).`);
205
+ mcpSpinner.succeed(`MCP configs updated for ${ideSelection.length} IDE(s) (${mcpScope} scope).`);
173
206
 
174
207
  // Clean up temporary directory
175
208
  const cleanupSpinner = startSpinner("Cleaning up temporary files...");
package/src/paths.js CHANGED
@@ -30,7 +30,7 @@ function getAppSupportDir(platformInfo = getPlatform()) {
30
30
  return process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config");
31
31
  }
32
32
 
33
- function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths = null) {
33
+ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths = null, ideMcpPaths = null) {
34
34
  const appSupport = getAppSupportDir(platformInfo);
35
35
  const home = os.homedir();
36
36
 
@@ -43,10 +43,18 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
43
43
  local: ".github/skills"
44
44
  };
45
45
 
46
+ const mcpPaths = ideMcpPaths || {
47
+ claude: ".claude/mcp.json",
48
+ cursor: ".cursor/mcp.json",
49
+ codex: ".codex/mcp.json",
50
+ vscode: ".vscode/mcp.json"
51
+ };
52
+
46
53
  return {
47
54
  claude: {
48
55
  name: "Claude Code",
49
56
  mcpConfig: path.join(appSupport, "Claude", "mcp.json"),
57
+ localMcpConfig: path.join(projectRoot, mcpPaths.claude),
50
58
  mcpServerKey: "servers",
51
59
  skillsDir: path.join(home, skillsPaths.claude),
52
60
  localSkillsDir: path.join(projectRoot, skillsPaths.claude)
@@ -54,6 +62,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
54
62
  cursor: {
55
63
  name: "Cursor",
56
64
  mcpConfig: path.join(appSupport, "Cursor", "mcp.json"),
65
+ localMcpConfig: path.join(projectRoot, mcpPaths.cursor),
57
66
  mcpServerKey: "mcpServers",
58
67
  skillsDir: path.join(home, skillsPaths.cursor),
59
68
  localSkillsDir: path.join(projectRoot, skillsPaths.cursor)
@@ -61,6 +70,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
61
70
  codex: {
62
71
  name: "Codex",
63
72
  mcpConfig: path.join(home, ".codex", "mcp.json"),
73
+ localMcpConfig: path.join(projectRoot, mcpPaths.codex),
64
74
  mcpServerKey: "servers",
65
75
  skillsDir: path.join(home, skillsPaths.codex),
66
76
  localSkillsDir: path.join(projectRoot, skillsPaths.codex)
@@ -68,6 +78,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
68
78
  vscode: {
69
79
  name: "VSCode",
70
80
  mcpConfig: path.join(appSupport, "Code", "User", "mcp.json"),
81
+ localMcpConfig: path.join(projectRoot, mcpPaths.vscode),
71
82
  mcpServerKey: "servers",
72
83
  skillsDir: path.join(home, skillsPaths.vscode),
73
84
  localSkillsDir: path.join(projectRoot, skillsPaths.vscode)