@fyow/copilot-everything 1.0.7 → 1.0.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fyow/copilot-everything",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Everything you need for GitHub Copilot CLI - agents, skills, instructions, and hooks configurations",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -39,7 +39,8 @@ Commands:
39
39
 
40
40
  Options:
41
41
  --ai <type> Target AI platform: copilot (default), claude, or all
42
- --force Overwrite existing files
42
+ --force Overwrite existing files (except MCP config)
43
+ --force-mcp Force overwrite MCP config (~/.copilot/mcp-config.json)
43
44
  --skip-agents Skip agent installation
44
45
  --skip-skills Skip skills installation
45
46
  --skip-hooks Skip hooks installation
@@ -48,6 +49,7 @@ Options:
48
49
 
49
50
  Examples:
50
51
  copilot-everything init
52
+ copilot-everything init --force-mcp
51
53
  copilot-everything init --ai copilot
52
54
  copilot-everything init --ai claude
53
55
  copilot-everything init --ai all --force
@@ -89,6 +89,7 @@ function init(flags = {}) {
89
89
  const targetDir = process.cwd();
90
90
  const aiType = flags.ai || 'copilot';
91
91
  const force = flags.force || false;
92
+ const forceMcp = flags['force-mcp'] || false;
92
93
  const skipAgents = flags['skip-agents'] || false;
93
94
  const skipSkills = flags['skip-skills'] || false;
94
95
  const skipHooks = flags['skip-hooks'] || false;
@@ -99,6 +100,7 @@ function init(flags = {}) {
99
100
  console.log(`📁 Target directory: ${targetDir}`);
100
101
  console.log(`🤖 AI platform: ${aiType}`);
101
102
  console.log(`⚡ Force overwrite: ${force ? 'yes' : 'no'}`);
103
+ console.log(`⚡ Force MCP overwrite: ${forceMcp ? 'yes' : 'no'}`);
102
104
  console.log('');
103
105
 
104
106
  const options = { force };
@@ -199,21 +201,22 @@ function init(flags = {}) {
199
201
  totalErrors.push(...agentsMdResult.errors);
200
202
 
201
203
  // MCP config to ~/.copilot/
202
- // NEVER overwrite MCP config even with --force, as it contains user's API keys and custom configs
204
+ // Only overwrite MCP config with --force-mcp flag, as it contains user's API keys and custom configs
203
205
  const homeDir = process.env.HOME || process.env.USERPROFILE;
204
206
  const mcpConfigSrc = path.join(PACKAGE_ROOT, 'copilot', 'mcp-config.json');
205
207
  const mcpConfigDest = path.join(homeDir, '.copilot', 'mcp-config.json');
206
208
 
207
209
  if (fs.existsSync(mcpConfigSrc)) {
208
- if (fs.existsSync(mcpConfigDest)) {
210
+ if (fs.existsSync(mcpConfigDest) && !forceMcp) {
209
211
  console.log(` ⚠️ MCP config: skipped (${mcpConfigDest} already exists)`);
210
212
  console.log(` 💡 Your existing MCP configuration is preserved`);
213
+ console.log(` 💡 Use --force-mcp to overwrite with template`);
211
214
  console.log(` 💡 Template available at: ${mcpConfigSrc}`);
212
215
  totalSkipped += 1;
213
216
  } else {
214
- const mcpResult = copyFile(mcpConfigSrc, mcpConfigDest, { force: false });
217
+ const mcpResult = copyFile(mcpConfigSrc, mcpConfigDest, { force: forceMcp });
215
218
  if (mcpResult.copied > 0) {
216
- console.log(` ✅ MCP config: installed to ${mcpConfigDest}`);
219
+ console.log(` ✅ MCP config: ${forceMcp ? 'overwritten' : 'installed'} to ${mcpConfigDest}`);
217
220
  }
218
221
  totalCopied += mcpResult.copied;
219
222
  totalSkipped += mcpResult.skipped;