devscribe-reason 1.0.8 → 1.0.9

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/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "devscribe-reason",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "MCP server that captures engineering decision reasoning and commits structured markdown to GitHub",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "devscribe-reason": "src/index.js",
9
- "devscribe-reason-setup": "scripts/setup.js"
8
+ "devscribe-reason": "scripts/cli.js"
10
9
  },
11
10
  "scripts": {
12
11
  "start": "node src/index.js",
package/scripts/cli.js ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync } from "node:child_process";
4
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
5
+ import { join } from "node:path";
6
+ import { homedir } from "node:os";
7
+ import { globSync } from "glob";
8
+ import { fileURLToPath } from "node:url";
9
+ import { dirname } from "node:path";
10
+
11
+ const args = process.argv.slice(2);
12
+ const command = args[0];
13
+
14
+ // If no command or "server" command, run the MCP server
15
+ if (!command || command === "server") {
16
+ const __filename = fileURLToPath(import.meta.url);
17
+ const __dirname = dirname(__filename);
18
+ const serverPath = join(__dirname, "../src/index.js");
19
+
20
+ // Run the server
21
+ execSync(`node ${serverPath}`, { stdio: "inherit" });
22
+ process.exit(0);
23
+ }
24
+
25
+ // If "setup" command, run setup
26
+ if (command === "setup") {
27
+ const __filename = fileURLToPath(import.meta.url);
28
+ const __dirname = dirname(__filename);
29
+ const setupPath = join(__dirname, "setup.js");
30
+
31
+ // Run setup
32
+ execSync(`node ${setupPath}`, {
33
+ stdio: "inherit",
34
+ env: process.env,
35
+ });
36
+ process.exit(0);
37
+ }
38
+
39
+ // Unknown command
40
+ console.error(`Unknown command: ${command}`);
41
+ console.error("\nUsage:");
42
+ console.error(" npx devscribe-reason - Start the MCP server");
43
+ console.error(" npx devscribe-reason setup - Configure Claude Code/Cursor");
44
+ process.exit(1);
package/src/CLAUDE.md CHANGED
@@ -24,7 +24,7 @@ The server exposes four MCP tools that Claude Code calls throughout a coding ses
24
24
  Works with both Claude Code and Cursor:
25
25
 
26
26
  ```bash
27
- GITHUB_TOKEN=ghp_your_token npx devscribe-reason-setup
27
+ GITHUB_TOKEN=ghp_your_token npx devscribe-reason setup
28
28
  ```
29
29
 
30
30
  This command will:
@@ -34,7 +34,7 @@ This command will:
34
34
 
35
35
  **If you need to specify the repo explicitly:**
36
36
  ```bash
37
- GITHUB_TOKEN=ghp_your_token GITHUB_REPO=owner/repo npx devscribe-reason-setup
37
+ GITHUB_TOKEN=ghp_your_token GITHUB_REPO=owner/repo npx devscribe-reason setup
38
38
  ```
39
39
 
40
40
  **After setup:** The MCP server will start automatically when you open Claude Code or Cursor. You don't need to manually start anything.