@doquflow/cli 0.4.2 → 0.4.3

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.
@@ -19,6 +19,16 @@ function getClaudeDesktopConfigPath() {
19
19
  }
20
20
  return node_path_1.default.join(node_os_1.default.homedir(), ".config", "Claude", "claude_desktop_config.json");
21
21
  }
22
+ function getVSCodeMcpConfigPath() {
23
+ const platform = process.platform;
24
+ if (platform === "darwin") {
25
+ return node_path_1.default.join(node_os_1.default.homedir(), "Library", "Application Support", "Code", "User", "mcp.json");
26
+ }
27
+ else if (platform === "win32") {
28
+ return node_path_1.default.join(node_os_1.default.homedir(), "AppData", "Roaming", "Code", "User", "mcp.json");
29
+ }
30
+ return node_path_1.default.join(node_os_1.default.homedir(), ".config", "Code", "User", "mcp.json");
31
+ }
22
32
  function resolveServerBin() {
23
33
  // Try npm-installed package first
24
34
  try {
@@ -150,9 +160,10 @@ async function writeClaudeMd(projectDir) {
150
160
  }
151
161
  async function run() {
152
162
  const configPath = getClaudeDesktopConfigPath();
163
+ const vscodeConfigPath = getVSCodeMcpConfigPath();
153
164
  const serverBin = resolveServerBin();
154
165
  const nodeBin = process.execPath;
155
- // Read or initialise Claude Desktop config
166
+ // Register in Claude Desktop config
156
167
  let config = {};
157
168
  try {
158
169
  const raw = await promises_1.default.readFile(configPath, "utf8");
@@ -166,6 +177,27 @@ async function run() {
166
177
  config.mcpServers.docuflow = { command: nodeBin, args: [serverBin] };
167
178
  await promises_1.default.mkdir(node_path_1.default.dirname(configPath), { recursive: true });
168
179
  await promises_1.default.writeFile(configPath, JSON.stringify(config, null, 2) + "\n", "utf8");
180
+ // Register in VS Code (GitHub Copilot) user MCP config
181
+ let vscodeRegistered = false;
182
+ let vscodeConfig = {};
183
+ try {
184
+ const raw = await promises_1.default.readFile(vscodeConfigPath, "utf8");
185
+ vscodeConfig = JSON.parse(raw);
186
+ }
187
+ catch {
188
+ // File may not exist — create it
189
+ }
190
+ if (!vscodeConfig.servers)
191
+ vscodeConfig.servers = {};
192
+ vscodeConfig.servers.docuflow = { command: nodeBin, args: [serverBin], type: "stdio" };
193
+ try {
194
+ await promises_1.default.mkdir(node_path_1.default.dirname(vscodeConfigPath), { recursive: true });
195
+ await promises_1.default.writeFile(vscodeConfigPath, JSON.stringify(vscodeConfig, null, 2) + "\n", "utf8");
196
+ vscodeRegistered = true;
197
+ }
198
+ catch {
199
+ // VS Code not installed or config dir not writable — skip silently
200
+ }
169
201
  // Create .docuflow/ directory structure
170
202
  const projectDir = process.cwd();
171
203
  const docuflowDir = node_path_1.default.join(projectDir, ".docuflow");
@@ -216,12 +248,12 @@ async function run() {
216
248
  console.log(` Claude Code will automatically read DocuFlow tool instructions.`);
217
249
  console.log("");
218
250
  console.log("🔧 MCP Configuration:");
219
- console.log(` MCP key: mcpServers.docuflow`);
220
- console.log(` Config file: ${configPath}`);
251
+ console.log(` Claude Desktop: ✓ registered`);
252
+ console.log(` GitHub Copilot: ${vscodeRegistered ? "✓ registered" : "— VS Code not detected (add manually to .vscode/mcp.json)"}`);
221
253
  console.log("");
222
254
  console.log("📖 Next steps:");
223
255
  console.log(" 1. Edit .docuflow/schema.md to customize your wiki");
224
256
  console.log(" 2. Add source files to .docuflow/sources/");
225
- console.log(" 3. Use LLM Wiki tools to ingest, query, and maintain wiki");
226
- console.log(" 4. Restart Claude Desktop to activate");
257
+ console.log(" 3. Use DocuFlow tools to ingest, query, and maintain wiki");
258
+ console.log(" 4. Restart Claude Desktop / reload VS Code window to activate");
227
259
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doquflow/cli",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "CLI for setting up Docuflow in your project",
5
5
  "author": "Docuflow <hello@doquflows.dev>",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "build": "tsc"
31
31
  },
32
32
  "dependencies": {
33
- "@doquflow/server": "0.4.2"
33
+ "@doquflow/server": "0.4.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^22.0.0",