@ppdocs/mcp 3.8.0 → 3.9.0
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/dist/cli.js +4 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* 命令: init - 初始化项目配置 + 安装工作流模板 + 自动注册 MCP
|
|
4
4
|
*/
|
|
5
5
|
import * as fs from 'fs';
|
|
6
|
+
import * as os from 'os';
|
|
6
7
|
import * as path from 'path';
|
|
7
8
|
import { fileURLToPath } from 'url';
|
|
8
9
|
import { execSync } from 'child_process';
|
|
@@ -294,12 +295,12 @@ function autoRegisterMcp(cwd, apiUrl, user, skipGemini = false) {
|
|
|
294
295
|
console.log(`⚠️ Codex MCP registration failed`);
|
|
295
296
|
}
|
|
296
297
|
}
|
|
297
|
-
// Gemini CLI
|
|
298
|
+
// Gemini CLI (gemini mcp add 不支持 --env,直接写 settings.json)
|
|
298
299
|
if (commandExists('gemini') && !skipGemini) {
|
|
299
300
|
detected.push('Gemini');
|
|
300
301
|
try {
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
const geminiSettings = path.join(os.homedir(), '.gemini', 'settings.json');
|
|
303
|
+
createMcpConfigAt(geminiSettings, apiUrl, { user, projectRoot: cwd });
|
|
303
304
|
}
|
|
304
305
|
catch {
|
|
305
306
|
console.log(`⚠️ Gemini MCP registration failed`);
|