devscribe-reason 1.0.5 ā 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/.cursor/mcp.json +16 -0
- package/package.json +1 -1
- package/scripts/setup.js +28 -1
- package/src/CLAUDE.md +2 -1
package/.cursor/mcp.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"devscribe-reason": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": [
|
|
6
|
+
"-y",
|
|
7
|
+
"devscribe-reason"
|
|
8
|
+
],
|
|
9
|
+
"env": {
|
|
10
|
+
"GITHUB_TOKEN": "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",
|
|
11
|
+
"GITHUB_REPO": "giannihart/MyWebsite",
|
|
12
|
+
"GITHUB_BRANCH": "main"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
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
|
@@ -27,10 +27,11 @@ Works with both Claude Code and Cursor:
|
|
|
27
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
|