Skip to content

Commit 5600644

Browse files
committed
feat: add Crush support to executable_yolo
- Add crush to supported commands list - Add --yolo flag support for Crush CLI - Handle crush in multi-agent mode with -i flag for prompts - Add crush to branch cleanup patterns - Update help text to include crush support 💘 Generated with Crush Co-Authored-By: Crush <crush@charm.land> Signed-off-by: Lars Trieloff <lars@trieloff.net>
1 parent c73ceb0 commit 5600644

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

executable_yolo

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Supported Commands:
102102
qwen Uses --yolo; adds -i when prompt present
103103
kimi Uses --yolo (requires Ghostty for interactive prompts)
104104
opencode No extra flags added
105+
crush Uses --yolo; adds -i when prompt present
105106
<other> Adds --yolo (generic fallback)
106107
107108
Multi-agent Mode:
@@ -288,6 +289,10 @@ get_command_flags() {
288289
# kimi uses --yolo for auto-approval
289290
echo "--yolo"
290291
;;
292+
crush)
293+
# crush uses --yolo for auto-approval
294+
echo "--yolo"
295+
;;
291296
*)
292297
echo "--yolo"
293298
;;
@@ -302,7 +307,7 @@ command_exists() {
302307
# Get all installed supported coding agents
303308
get_installed_agents() {
304309
local agents=()
305-
local supported_commands=("codex" "claude" "copilot" "droid" "amp" "cursor-agent" "opencode" "qwen" "gemini" "kimi")
310+
local supported_commands=("codex" "claude" "copilot" "droid" "amp" "cursor-agent" "opencode" "qwen" "gemini" "kimi" "crush")
306311

307312
for cmd in "${supported_commands[@]}"; do
308313
if command_exists "$cmd"; then
@@ -922,8 +927,8 @@ run_multi_agents() {
922927
fi
923928
agent_prompts+=("") # opencode handles prompts via --prompt flag
924929
;;
925-
gemini|qwen)
926-
# gemini/qwen: add -i when prompt present to remain interactive
930+
gemini|qwen|crush)
931+
# gemini/qwen/crush: add -i when prompt present to remain interactive
927932
cmd_arr+=("$agent")
928933
if [[ -n "$flags" ]]; then
929934
# shellcheck disable=SC2206
@@ -935,7 +940,7 @@ run_multi_agents() {
935940
prompt_joined=$(printf '%s ' "${common_args[@]}"); prompt_joined=${prompt_joined%% }
936941
cmd_arr+=("-i" "$prompt_joined")
937942
fi
938-
agent_prompts+=("") # gemini/qwen handle prompts via -i flag
943+
agent_prompts+=("") # gemini/qwen/crush handle prompts via -i flag
939944
;;
940945
droid)
941946
# droid: allow inline prompt to seed session
@@ -1093,7 +1098,7 @@ pick_random_agent() {
10931098

10941099
if [[ ${#agents[@]} -eq 0 ]]; then
10951100
print_error "no supported coding agents found in PATH"
1096-
print_info "Supported agents: codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, kimi"
1101+
print_info "Supported agents: codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, kimi, crush"
10971102
return 1
10981103
fi
10991104

@@ -1178,7 +1183,7 @@ mop_cleanup() {
11781183
print_success "Deleted branch: $branch"
11791184
((branch_count++))
11801185
fi
1181-
done < <(git branch | sed 's/^[* ] //' | grep -E '^(claude|codex|copilot|amp|opencode|gemini|qwen|droid|cursor-agent|kimi)-[0-9]+$')
1186+
done < <(git branch | sed 's/^[* ] //' | grep -E '^(claude|codex|copilot|amp|opencode|gemini|qwen|droid|cursor-agent|kimi|crush)-[0-9]+$')
11821187

11831188
if (( branch_count == 0 )); then
11841189
print_info "No agent branches found"
@@ -1384,7 +1389,7 @@ main() {
13841389

13851390
if [[ ${#all_agents[@]} -eq 0 ]]; then
13861391
print_error "no supported coding agents found in PATH"
1387-
print_info "Supported agents: codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, kimi"
1392+
print_info "Supported agents: codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, kimi, crush"
13881393
exit 1
13891394
fi
13901395

@@ -1549,7 +1554,7 @@ main() {
15491554
full_command=("$command_name" --prompt "$prompt_joined")
15501555
fi
15511556
;;
1552-
gemini|qwen)
1557+
gemini|qwen|crush)
15531558
if [[ -n "$flags" ]]; then
15541559
# shellcheck disable=SC2206
15551560
local flag_array=($flags)

0 commit comments

Comments
 (0)