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

Function uninstall_cli_agents

src/cli/cli.c:3969–4014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3967}
3968
3969static void uninstall_cli_agents(const cbm_detected_agents_t *agents, const char *home,
3970 bool dry_run) {
3971 if (agents->codex) {
3972 char cp[CLI_BUF_1K];
3973 char ip[CLI_BUF_1K];
3974 snprintf(cp, sizeof(cp), "%s/.codex/config.toml", home);
3975 snprintf(ip, sizeof(ip), "%s/.codex/AGENTS.md", home);
3976 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Codex CLI", cp, ip}, dry_run,
3977 cbm_remove_codex_mcp);
3978 if (!dry_run) {
3979 cbm_remove_codex_hooks(cp);
3980 }
3981 }
3982 if (agents->gemini) {
3983 uninstall_gemini_config(home, dry_run);
3984 }
3985 if (agents->opencode) {
3986 char cp[CLI_BUF_1K];
3987 char ip[CLI_BUF_1K];
3988 snprintf(cp, sizeof(cp), "%s/.config/opencode/opencode.json", home);
3989 snprintf(ip, sizeof(ip), "%s/.config/opencode/AGENTS.md", home);
3990 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"OpenCode", cp, ip}, dry_run,
3991 cbm_remove_opencode_mcp);
3992 }
3993 if (agents->antigravity) {
3994 char cp[CLI_BUF_1K];
3995 char ip[CLI_BUF_1K];
3996 snprintf(cp, sizeof(cp), "%s/.gemini/config/mcp_config.json", home);
3997 snprintf(ip, sizeof(ip), "%s/.gemini/antigravity-cli/AGENTS.md", home);
3998 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Antigravity", cp, ip}, dry_run,
3999 cbm_remove_antigravity_mcp);
4000 if (!dry_run) {
4001 char sp[CLI_BUF_1K];
4002 snprintf(sp, sizeof(sp), "%s/.gemini/antigravity-cli/settings.json", home);
4003 cbm_remove_gemini_session_hooks(sp);
4004 }
4005 }
4006 if (agents->aider) {
4007 char ip[CLI_BUF_1K];
4008 snprintf(ip, sizeof(ip), "%s/CONVENTIONS.md", home);
4009 if (!dry_run) {
4010 cbm_remove_instructions(ip);
4011 }
4012 printf("Aider: removed instructions\n");
4013 }
4014}
4015
4016/* Remove editor agent configs (Zed, KiloCode, VS Code, OpenClaw). */
4017static void uninstall_editor_agents(const cbm_detected_agents_t *agents, const char *home,

Callers 1

cbm_cmd_uninstallFunction · 0.85

Calls 5

cbm_remove_codex_hooksFunction · 0.85
uninstall_gemini_configFunction · 0.85
cbm_remove_instructionsFunction · 0.85

Tested by

no test coverage detected