devscribe-reason 1.0.8 → 1.0.10
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 +2 -3
- package/scripts/cli.js +56 -0
- package/src/CLAUDE.md +2 -2
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devscribe-reason",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
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": "
|
|
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,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { dirname } from "node:path";
|
|
5
|
+
import { spawn } from "node:child_process";
|
|
6
|
+
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
const command = args[0];
|
|
9
|
+
|
|
10
|
+
// If no command or "server" command, run the MCP server
|
|
11
|
+
if (!command || command === "server") {
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
|
|
14
|
+
// Spawn the server directly without shelling out
|
|
15
|
+
const serverProcess = spawn("node", [dirname(__filename) + "/../src/index.js"], {
|
|
16
|
+
stdio: "inherit",
|
|
17
|
+
env: process.env,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
serverProcess.on("error", (err) => {
|
|
21
|
+
console.error("Failed to start server:", err);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Keep the process alive
|
|
26
|
+
serverProcess.on("exit", (code) => {
|
|
27
|
+
process.exit(code || 0);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// If "setup" command, run setup
|
|
32
|
+
if (command === "setup") {
|
|
33
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
34
|
+
|
|
35
|
+
// Spawn setup directly without shelling out
|
|
36
|
+
const setupProcess = spawn("node", [dirname(__filename) + "/setup.js"], {
|
|
37
|
+
stdio: "inherit",
|
|
38
|
+
env: process.env,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
setupProcess.on("error", (err) => {
|
|
42
|
+
console.error("Failed to run setup:", err);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
setupProcess.on("exit", (code) => {
|
|
47
|
+
process.exit(code || 0);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Unknown command
|
|
52
|
+
console.error(`Unknown command: ${command}`);
|
|
53
|
+
console.error("\nUsage:");
|
|
54
|
+
console.error(" npx devscribe-reason - Start the MCP server");
|
|
55
|
+
console.error(" npx devscribe-reason setup - Configure Claude Code/Cursor");
|
|
56
|
+
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
|
|
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
|
|
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.
|