@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 +1 -1
- package/src/cli.js +3 -1
- package/src/commands/init.js +7 -4
package/package.json
CHANGED
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
|
package/src/commands/init.js
CHANGED
|
@@ -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
|
-
//
|
|
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:
|
|
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;
|