@insforge/install 0.0.42 → 0.0.44

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.
Files changed (2) hide show
  1. package/dist/index.js +22 -40
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -236,56 +236,38 @@ import {
236
236
  writeConfig(config, argv.client);
237
237
  }
238
238
 
239
- // Fetch instructions documentation once (only in dev mode)
240
- if (argv.dev) {
241
- let instructionsContent = null;
242
- try {
243
- const fetch = (await import('node-fetch')).default;
244
- const fs = await import('fs');
245
- const apiBaseUrl = envVars.API_BASE_URL || "http://localhost:7130";
246
- const response = await fetch(`${apiBaseUrl}/api/docs/instructions`);
239
+ // Fetch instructions documentation and save to appropriate files
240
+ let instructionsContent = null;
241
+ try {
242
+ const fetch = (await import('node-fetch')).default;
243
+ const fs = await import('fs');
244
+ const apiBaseUrl = envVars.API_BASE_URL || "http://localhost:7130";
245
+ const response = await fetch(`${apiBaseUrl}/api/docs/instructions`);
247
246
 
248
- if (response.ok) {
249
- const result = await response.json();
250
- if (result && result.content) {
251
- instructionsContent = result.content;
252
- }
247
+ if (response.ok) {
248
+ const result = await response.json();
249
+ if (result && result.content) {
250
+ instructionsContent = result.content;
253
251
  }
254
- } catch (fetchError) {
255
- logger.warn(`Could not download instructions: ${fetchError.message}`);
256
252
  }
253
+ } catch (fetchError) {
254
+ logger.warn(`Could not download instructions: ${fetchError.message}`);
255
+ }
257
256
 
258
- // Save instructions to appropriate files based on client
259
- if (instructionsContent) {
260
- const fs = await import('fs');
261
- const frontmatter = `---
257
+ // Save instructions to agent.md for all clients
258
+ if (instructionsContent) {
259
+ const fs = await import('fs');
260
+ const frontmatter = `---
262
261
  description: Instructions building apps with MCP
263
262
  globs: *
264
263
  alwaysApply: true
265
264
  ---
266
265
 
267
266
  `;
268
- const contentWithFrontmatter = frontmatter + instructionsContent;
269
-
270
- // Save CLAUDE.md for claude-code client
271
- if (argv.client === "claude-code") {
272
- const claudeMdPath = path.join(process.cwd(), 'CLAUDE.md');
273
- fs.writeFileSync(claudeMdPath, contentWithFrontmatter, 'utf-8');
274
- logger.info(`Saved instructions to: ${claudeMdPath}`);
275
- }
276
-
277
- // Save cursor rules for cursor client
278
- if (argv.client === "cursor") {
279
- const cursorRulesDir = path.join(process.cwd(), '.cursor', 'rules');
280
- const cursorRulesPath = path.join(cursorRulesDir, 'cursor-rules.mdc');
281
-
282
- if (!fs.existsSync(cursorRulesDir)) {
283
- fs.mkdirSync(cursorRulesDir, { recursive: true });
284
- }
285
- fs.writeFileSync(cursorRulesPath, contentWithFrontmatter, 'utf-8');
286
- logger.info(`Saved cursor rules to: ${cursorRulesPath}`);
287
- }
288
- }
267
+ const contentWithFrontmatter = frontmatter + instructionsContent;
268
+ const agentsMdPath = path.join(process.cwd(), 'AGENTS.md');
269
+ fs.writeFileSync(agentsMdPath, contentWithFrontmatter, 'utf-8');
270
+ logger.info(`Saved instructions to: ${agentsMdPath}`);
289
271
  }
290
272
 
291
273
  printHeader('Setup Complete!');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/install",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "CLI tool for installing Insforge MCP servers across different AI clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",