@insforge/install 0.0.34 → 0.0.36

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.
@@ -1,3 +1,5 @@
1
1
  {
2
- "enableAllProjectMcpServers": true
3
- }
2
+ "enabledMcpjsonServers": [
3
+ "insforge"
4
+ ]
5
+ }
package/dist/index.js CHANGED
@@ -106,6 +106,14 @@ import {
106
106
  if (!settings.enabledMcpjsonServers.includes("insforge")) {
107
107
  settings.enabledMcpjsonServers.push("insforge");
108
108
  }
109
+
110
+ // Remove "insforge" from disabledMcpjsonServers if present
111
+ if (settings.disabledMcpjsonServers && Array.isArray(settings.disabledMcpjsonServers)) {
112
+ settings.disabledMcpjsonServers = settings.disabledMcpjsonServers.filter(
113
+ (server) => server !== "insforge"
114
+ );
115
+ }
116
+
109
117
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
110
118
  logger.info("Added \"insforge\" to enabledMcpjsonServers in .claude/settings.local.json");
111
119
  } else if (argv.client === "codex") {
@@ -182,6 +190,59 @@ import {
182
190
  };
183
191
  writeConfig(config, argv.client);
184
192
  }
193
+
194
+ // Fetch instructions documentation once (only in dev mode)
195
+ if (argv.dev) {
196
+ let instructionsContent = null;
197
+ try {
198
+ const fetch = (await import('node-fetch')).default;
199
+ const fs = await import('fs');
200
+ const apiBaseUrl = envVars.API_BASE_URL || "http://localhost:7130";
201
+ const response = await fetch(`${apiBaseUrl}/api/docs/instructions`);
202
+
203
+ if (response.ok) {
204
+ const result = await response.json();
205
+ if (result && result.content) {
206
+ instructionsContent = result.content;
207
+ }
208
+ }
209
+ } catch (fetchError) {
210
+ logger.warn(`Could not download instructions: ${fetchError.message}`);
211
+ }
212
+
213
+ // Save instructions to appropriate files based on client
214
+ if (instructionsContent) {
215
+ const fs = await import('fs');
216
+ const frontmatter = `---
217
+ description: Instructions building apps with MCP
218
+ globs: *
219
+ alwaysApply: true
220
+ ---
221
+
222
+ `;
223
+ const contentWithFrontmatter = frontmatter + instructionsContent;
224
+
225
+ // Save CLAUDE.md for claude-code client
226
+ if (argv.client === "claude-code") {
227
+ const claudeMdPath = path.join(process.cwd(), 'CLAUDE.md');
228
+ fs.writeFileSync(claudeMdPath, contentWithFrontmatter, 'utf-8');
229
+ logger.info(`Saved instructions to: ${claudeMdPath}`);
230
+ }
231
+
232
+ // Save cursor rules for cursor client
233
+ if (argv.client === "cursor") {
234
+ const cursorRulesDir = path.join(process.cwd(), '.cursor', 'rules');
235
+ const cursorRulesPath = path.join(cursorRulesDir, 'cursor-rules.mdc');
236
+
237
+ if (!fs.existsSync(cursorRulesDir)) {
238
+ fs.mkdirSync(cursorRulesDir, { recursive: true });
239
+ }
240
+ fs.writeFileSync(cursorRulesPath, contentWithFrontmatter, 'utf-8');
241
+ logger.info(`Saved cursor rules to: ${cursorRulesPath}`);
242
+ }
243
+ }
244
+ }
245
+
185
246
  logger.box(green(`Successfully installed Insforge MCP server in ${argv.client}.`));
186
247
  } catch (e) {
187
248
  logger.error(red(e.message));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/install",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "CLI tool for installing Insforge MCP servers across different AI clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/.mcp.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "insforge": {
4
- "command": "npx",
5
- "args": [
6
- "-y",
7
- "@insforge/mcp@latest"
8
- ],
9
- "env": {
10
- "API_KEY": "ik_fff113df777823a0518b8067e4f4f49bb11661904af26b9fda2ac80892b0558c",
11
- "API_BASE_URL": "http://localhost:7130"
12
- }
13
- }
14
- }
15
- }