@@ -1235,6 +1235,10 @@ cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
12351235 snprintf (path , sizeof (path ), "%s/.kiro" , home_dir );
12361236 agents .kiro = dir_exists (path );
12371237
1238+ /* Junie (JetBrains): ~/.junie/ */
1239+ snprintf (path , sizeof (path ), "%s/.junie" , home_dir );
1240+ agents .junie = dir_exists (path );
1241+
12381242 return agents ;
12391243}
12401244
@@ -1771,6 +1775,17 @@ int cbm_remove_antigravity_mcp(const char *config_path) {
17711775 return cbm_remove_editor_mcp (config_path );
17721776}
17731777
1778+ /* ── Junie MCP config (JSON, same mcpServers format) ──────────── */
1779+
1780+ int cbm_upsert_junie_mcp (const char * binary_path , const char * config_path ) {
1781+ /* Junie (JetBrains) uses same mcpServers format as Cursor/Antigravity */
1782+ return cbm_install_editor_mcp (binary_path , config_path );
1783+ }
1784+
1785+ int cbm_remove_junie_mcp (const char * config_path ) {
1786+ return cbm_remove_editor_mcp (config_path );
1787+ }
1788+
17741789/* ── Claude Code pre-tool hooks ───────────────────────────────── */
17751790
17761791/* Matcher intentionally excludes Read: gating Read breaks Claude Code's
@@ -3148,6 +3163,7 @@ static void print_detected_agents(const cbm_detected_agents_t *a) {
31483163 {a -> cursor , "Cursor" },
31493164 {a -> openclaw , "OpenClaw" },
31503165 {a -> kiro , "Kiro" },
3166+ {a -> junie , "Junie" },
31513167 };
31523168 printf ("Detected agents:" );
31533169 bool any = false;
@@ -3516,6 +3532,16 @@ static void install_editor_agent_configs(const cbm_detected_agents_t *agents, co
35163532 install_generic_agent_config ("Kiro" , binary_path , cp , NULL , dry_run ,
35173533 cbm_install_editor_mcp );
35183534 }
3535+ if (agents -> junie ) {
3536+ char cp [CLI_BUF_1K ];
3537+ char sd [CLI_BUF_1K ];
3538+ snprintf (cp , sizeof (cp ), "%s/.junie/mcp/mcp.json" , home );
3539+ snprintf (sd , sizeof (sd ), "%s/.junie/mcp" , home );
3540+ if (!dry_run ) {
3541+ cbm_mkdir_p (sd , CLI_OCTAL_PERM );
3542+ }
3543+ install_generic_agent_config ("Junie" , binary_path , cp , NULL , dry_run , cbm_upsert_junie_mcp );
3544+ }
35193545}
35203546
35213547static void cbm_install_agent_configs (const char * home , const char * binary_path , bool force ,
@@ -3668,6 +3694,7 @@ char *cbm_build_install_plan_json(const char *home, const char *binary_path) {
36683694 {det .cursor , "cursor" },
36693695 {det .openclaw , "openclaw" },
36703696 {det .kiro , "kiro" },
3697+ {det .junie , "junie" },
36713698 };
36723699
36733700 yyjson_mut_doc * doc = yyjson_mut_doc_new (NULL );
@@ -4041,6 +4068,12 @@ static void uninstall_editor_agents(const cbm_detected_agents_t *agents, const c
40414068 uninstall_agent_mcp_instr ((mcp_uninstall_args_t ){"Kiro" , cp , NULL }, dry_run ,
40424069 cbm_remove_editor_mcp );
40434070 }
4071+ if (agents -> junie ) {
4072+ char cp [CLI_BUF_1K ];
4073+ snprintf (cp , sizeof (cp ), "%s/.junie/mcp/mcp.json" , home );
4074+ uninstall_agent_mcp_instr ((mcp_uninstall_args_t ){"Junie" , cp , NULL }, dry_run ,
4075+ cbm_remove_junie_mcp );
4076+ }
40444077}
40454078
40464079int cbm_cmd_uninstall (int argc , char * * argv ) {
0 commit comments