devscribe-reason 1.0.6 ā 1.0.7
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/setup.js +28 -1
- package/src/CLAUDE.md +4 -3
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devscribe-reason",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
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/setup.js"
|
|
10
9
|
},
|
|
11
10
|
"scripts": {
|
|
12
11
|
"start": "node src/index.js",
|
package/scripts/setup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { execSync } from "node:child_process";
|
|
3
|
+
import { execSync, spawn } from "node:child_process";
|
|
4
4
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { homedir } from "node:os";
|
|
@@ -182,4 +182,31 @@ if (cursorAvailable) {
|
|
|
182
182
|
if (claudeAvailable || cursorAvailable) {
|
|
183
183
|
console.log("\nš To use devscribe-reason in your sessions:");
|
|
184
184
|
console.log(" GITHUB_TOKEN=your_token npx devscribe-reason\n");
|
|
185
|
+
console.log("š Starting MCP server...\n");
|
|
186
|
+
|
|
187
|
+
// Spawn the MCP server after setup
|
|
188
|
+
const { fileURLToPath } = await import("node:url");
|
|
189
|
+
const { dirname } = await import("node:path");
|
|
190
|
+
|
|
191
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
192
|
+
const __dirname = dirname(__filename);
|
|
193
|
+
const serverPath = join(__dirname, "../src/index.js");
|
|
194
|
+
|
|
195
|
+
// Set up environment variables for the server
|
|
196
|
+
const serverEnv = {
|
|
197
|
+
...process.env,
|
|
198
|
+
...(token && { GITHUB_TOKEN: token }),
|
|
199
|
+
...(repo && { GITHUB_REPO: repo }),
|
|
200
|
+
GITHUB_BRANCH: branch,
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const server = spawn("node", [serverPath], {
|
|
204
|
+
env: serverEnv,
|
|
205
|
+
stdio: "inherit",
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
server.on("error", (err) => {
|
|
209
|
+
console.error("Failed to start MCP server:", err);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
});
|
|
185
212
|
}
|
package/src/CLAUDE.md
CHANGED
|
@@ -24,17 +24,18 @@ 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
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
This command will:
|
|
31
31
|
- Auto-detect your GitHub repo from git remote
|
|
32
32
|
- Auto-detect Claude Code or Cursor
|
|
33
33
|
- Configure the MCP server automatically
|
|
34
|
+
- Start the MCP server
|
|
34
35
|
|
|
35
36
|
**If you need to specify the repo explicitly:**
|
|
36
37
|
```bash
|
|
37
|
-
GITHUB_TOKEN=ghp_your_token GITHUB_REPO=owner/repo npx devscribe-reason
|
|
38
|
+
GITHUB_TOKEN=ghp_your_token GITHUB_REPO=owner/repo npx devscribe-reason
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
**GitHub Token:** Create a [Personal Access Token](https://github.com/settings/tokens) with `repo` scope (or `contents: write` for fine-grained tokens).
|