MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / install_generic_agent_config

Function install_generic_agent_config

src/cli/cli.c:3309–3332  ·  view source on GitHub ↗

Install MCP config + optional instructions for a generic agent. */

Source from the content-addressed store, hash-verified

3307
3308/* Install MCP config + optional instructions for a generic agent. */
3309static void install_generic_agent_config(const char *label, const char *binary_path,
3310 const char *config_path, const char *instr_path,
3311 bool dry_run,
3312 int (*install_mcp)(const char *, const char *)) {
3313 /* Plan mode: record planned writes, mutate nothing (#388). */
3314 if (g_install_plan) {
3315 plan_record(label, "mcp_config", config_path);
3316 if (instr_path) {
3317 plan_record(label, "instructions", instr_path);
3318 }
3319 return;
3320 }
3321 printf("%s:\n", label);
3322 if (!dry_run) {
3323 install_mcp(binary_path, config_path);
3324 }
3325 printf(" mcp: %s\n", config_path);
3326 if (instr_path) {
3327 if (!dry_run) {
3328 cbm_upsert_instructions(instr_path, agent_instructions_content);
3329 }
3330 printf(" instructions: %s\n", instr_path);
3331 }
3332}
3333
3334/* Install MCP configs for CLI-based agents (Codex, Gemini, OpenCode, Antigravity, Aider). */
3335/* Install Gemini CLI config with hooks. */

Callers 4

install_gemini_configFunction · 0.85

Calls 2

plan_recordFunction · 0.85
cbm_upsert_instructionsFunction · 0.85

Tested by

no test coverage detected