@@ -1143,6 +1143,10 @@ cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
11431143 snprintf (path , sizeof (path ), "%s/.kiro" , home_dir );
11441144 agents .kiro = dir_exists (path );
11451145
1146+ /* Junie (JetBrains): ~/.junie/ */
1147+ snprintf (path , sizeof (path ), "%s/.junie" , home_dir );
1148+ agents .junie = dir_exists (path );
1149+
11461150 return agents ;
11471151}
11481152
@@ -1679,6 +1683,17 @@ int cbm_remove_antigravity_mcp(const char *config_path) {
16791683 return cbm_remove_editor_mcp (config_path );
16801684}
16811685
1686+ /* ── Junie MCP config (JSON, same mcpServers format) ──────────── */
1687+
1688+ int cbm_upsert_junie_mcp (const char * binary_path , const char * config_path ) {
1689+ /* Junie (JetBrains) uses same mcpServers format as Cursor/Antigravity */
1690+ return cbm_install_editor_mcp (binary_path , config_path );
1691+ }
1692+
1693+ int cbm_remove_junie_mcp (const char * config_path ) {
1694+ return cbm_remove_editor_mcp (config_path );
1695+ }
1696+
16821697/* ── Claude Code pre-tool hooks ───────────────────────────────── */
16831698
16841699/* Matcher intentionally excludes Read: gating Read breaks Claude Code's
@@ -2934,6 +2949,7 @@ static void print_detected_agents(const cbm_detected_agents_t *a) {
29342949 {a -> cursor , "Cursor" },
29352950 {a -> openclaw , "OpenClaw" },
29362951 {a -> kiro , "Kiro" },
2952+ {a -> junie , "Junie" },
29372953 };
29382954 printf ("Detected agents:" );
29392955 bool any = false;
@@ -3247,6 +3263,16 @@ static void install_editor_agent_configs(const cbm_detected_agents_t *agents, co
32473263 install_generic_agent_config ("Kiro" , binary_path , cp , NULL , dry_run ,
32483264 cbm_install_editor_mcp );
32493265 }
3266+ if (agents -> junie ) {
3267+ char cp [CLI_BUF_1K ];
3268+ char sd [CLI_BUF_1K ];
3269+ snprintf (cp , sizeof (cp ), "%s/.junie/mcp/mcp.json" , home );
3270+ snprintf (sd , sizeof (sd ), "%s/.junie/mcp" , home );
3271+ if (!dry_run ) {
3272+ cbm_mkdir_p (sd , CLI_OCTAL_PERM );
3273+ }
3274+ install_generic_agent_config ("Junie" , binary_path , cp , NULL , dry_run , cbm_upsert_junie_mcp );
3275+ }
32503276}
32513277
32523278static void cbm_install_agent_configs (const char * home , const char * binary_path , bool force ,
@@ -3346,6 +3372,7 @@ char *cbm_build_install_plan_json(const char *home, const char *binary_path) {
33463372 {det .cursor , "cursor" },
33473373 {det .openclaw , "openclaw" },
33483374 {det .kiro , "kiro" },
3375+ {det .junie , "junie" },
33493376 };
33503377
33513378 yyjson_mut_doc * doc = yyjson_mut_doc_new (NULL );
@@ -3720,6 +3747,12 @@ static void uninstall_editor_agents(const cbm_detected_agents_t *agents, const c
37203747 uninstall_agent_mcp_instr ((mcp_uninstall_args_t ){"Kiro" , cp , NULL }, dry_run ,
37213748 cbm_remove_editor_mcp );
37223749 }
3750+ if (agents -> junie ) {
3751+ char cp [CLI_BUF_1K ];
3752+ snprintf (cp , sizeof (cp ), "%s/.junie/mcp/mcp.json" , home );
3753+ uninstall_agent_mcp_instr ((mcp_uninstall_args_t ){"Junie" , cp , NULL }, dry_run ,
3754+ cbm_remove_junie_mcp );
3755+ }
37233756}
37243757
37253758int cbm_cmd_uninstall (int argc , char * * argv ) {
0 commit comments