neuronlayer 0.2.2 → 0.2.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.
- package/README.md +3 -1
- package/dist/index.js +32 -0
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -37,7 +37,9 @@ cd your-project
|
|
|
37
37
|
neuronlayer init
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
This registers your project and configures Claude Desktop, Claude Code, and
|
|
40
|
+
This registers your project and configures Claude Desktop, Claude Code, OpenCode, and Cursor automatically. Restart your AI tool and you're ready.
|
|
41
|
+
|
|
42
|
+
> **Windows users**: If upgrading, close any AI tools using NeuronLayer first (or run `taskkill /f /im node.exe`) before reinstalling. Windows locks native binaries while they're in use.
|
|
41
43
|
|
|
42
44
|
---
|
|
43
45
|
|
package/dist/index.js
CHANGED
|
@@ -39282,6 +39282,32 @@ function configureProjectMCP(configPath, projectPath) {
|
|
|
39282
39282
|
return { success: false, message: `Claude Code / OpenCode: Failed - ${err instanceof Error ? err.message : String(err)}` };
|
|
39283
39283
|
}
|
|
39284
39284
|
}
|
|
39285
|
+
function configureOpenCode(projectPath) {
|
|
39286
|
+
const configPath = join15(projectPath, "opencode.json");
|
|
39287
|
+
let config2 = {};
|
|
39288
|
+
try {
|
|
39289
|
+
if (existsSync15(configPath)) {
|
|
39290
|
+
const content = readFileSync12(configPath, "utf-8");
|
|
39291
|
+
config2 = JSON.parse(content);
|
|
39292
|
+
}
|
|
39293
|
+
} catch {
|
|
39294
|
+
}
|
|
39295
|
+
if (!config2.mcp || typeof config2.mcp !== "object") {
|
|
39296
|
+
config2.mcp = {};
|
|
39297
|
+
}
|
|
39298
|
+
const absoluteProjectPath = resolve3(projectPath);
|
|
39299
|
+
config2.mcp["neuronlayer"] = {
|
|
39300
|
+
type: "local",
|
|
39301
|
+
command: ["npx", "-y", "neuronlayer", "--project", absoluteProjectPath],
|
|
39302
|
+
enabled: true
|
|
39303
|
+
};
|
|
39304
|
+
try {
|
|
39305
|
+
writeFileSync6(configPath, JSON.stringify(config2, null, 2));
|
|
39306
|
+
return { success: true, message: `OpenCode: ${configPath}` };
|
|
39307
|
+
} catch (err) {
|
|
39308
|
+
return { success: false, message: `OpenCode: Failed - ${err instanceof Error ? err.message : String(err)}` };
|
|
39309
|
+
}
|
|
39310
|
+
}
|
|
39285
39311
|
function initProject(projectPath) {
|
|
39286
39312
|
const targetPath = projectPath || process.cwd();
|
|
39287
39313
|
const addResult = addProject(targetPath);
|
|
@@ -39307,6 +39333,12 @@ function initProject(projectPath) {
|
|
|
39307
39333
|
} else {
|
|
39308
39334
|
failedClients.push(claudeResult.message);
|
|
39309
39335
|
}
|
|
39336
|
+
const openCodeResult = configureOpenCode(targetPath);
|
|
39337
|
+
if (openCodeResult.success) {
|
|
39338
|
+
configuredClients.push(openCodeResult.message);
|
|
39339
|
+
} else {
|
|
39340
|
+
failedClients.push(openCodeResult.message);
|
|
39341
|
+
}
|
|
39310
39342
|
const claudeCodeConfigPath = join15(targetPath, ".mcp.json");
|
|
39311
39343
|
const claudeCodeResult = configureProjectMCP(claudeCodeConfigPath, targetPath);
|
|
39312
39344
|
if (claudeCodeResult.success) {
|