Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ yolo -w
yolo --dry-run
```

When you run `yolo` without specifying a command, it scans your system for all installed supported coding agents (codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, qwen, kimi, crush) and picks one at random. You only live yolo - even choosing your AI assistant is too much commitment!
When you run `yolo` without specifying a command, it scans your system for all installed supported coding agents (codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, qwen, kimi, crush, aider, goose) and picks one at random. You only live yolo - even choosing your AI assistant is too much commitment!

### Basic Usage

Expand Down Expand Up @@ -223,6 +223,7 @@ Use `--mop` to clean up orphaned worktrees from interrupted sessions or when you
| `qwen` | `--yolo` (+ `-i` when prompt present) |
| `kimi` | `--yolo` (+ `--command` when prompt present) |
| `crush` | `--yolo` (+ Ghostty injection when prompt present) |
| `goose` | *(no flags - prompts passed via stdin)* |
| *(other)* | `--yolo` |

### Examples
Expand All @@ -244,6 +245,13 @@ yolo claude
yolo claude "fix all the bugs"
yolo codex --help

# Goose examples
yolo goose "analyze the codebase and suggest improvements"
yolo -w goose "implement feature X" # Create worktree for goose session
yolo -e goose # Compose complex prompt in editor for goose
yolo -w -c goose "quick experiment" # Create worktree, auto-cleanup after
yolo -w -nc goose "keep this work" # Create worktree, preserve it after

# Editor mode
yolo -e claude # Compose prompt in editor
yolo -e codex,claude,gemini # Editor prompt for multi-agent
Expand Down Expand Up @@ -293,7 +301,7 @@ When you run `yolo` without specifying a command:
yolo

# YOLO does:
# 1. Scans PATH for installed agents (codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, qwen, kimi, crush)
# 1. Scans PATH for installed agents (codex, claude, copilot, droid, amp, cursor-agent, opencode, gemini, qwen, kimi, crush, aider, goose)
# 2. Picks one at random using $RANDOM
# 3. Adds appropriate flags for that agent
# 4. Launches it
Expand Down Expand Up @@ -557,6 +565,8 @@ YOLO works with the following AI coding assistants:
| **Gemini** | [github.com/google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli) | Google's open-source AI agent with Gemini 2.5 Pro |
| **Kimi** | [kimi.moonshot.cn](https://kimi.moonshot.cn) | Moonshot AI's coding assistant with advanced reasoning |
| **Crush** | [charm.sh/crush](https://charm.sh/crush) | Charm's interactive CLI tool for software engineering tasks |
| **Aider** | [github.com/paul-gauthier/aider](https://github.com/paul-gauthier/aider) | AI pair programmer in your terminal |
| **Goose** | [github.com/block/goose](https://github.com/block/goose) | Block's open-source AI coding agent (Square, Cash App, Afterpay) |

## Related Projects

Expand Down
41 changes: 34 additions & 7 deletions executable_yolo
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Supported Commands:
opencode No extra flags added
crush Uses --yolo (requires Ghostty for interactive prompts)
aider Uses --yes-always (requires Ghostty for interactive prompts)
goose No extra flags added (prompts passed via stdin)
<other> Adds --yolo (generic fallback)

Multi-agent Mode:
Expand Down Expand Up @@ -300,6 +301,11 @@ get_command_flags() {
# aider uses --yes-always for auto-approval
echo "--yes-always"
;;
goose)
# Goose has no bypass flags - runs autonomously by default
# Prompts are passed via stdin, not command-line flags
echo ""
;;
*)
echo "--yolo"
;;
Expand All @@ -314,7 +320,7 @@ command_exists() {
# Get all installed supported coding agents
get_installed_agents() {
local agents=()
local supported_commands=("codex" "claude" "copilot" "droid" "amp" "cursor-agent" "opencode" "qwen" "gemini" "kimi" "crush" "aider")
local supported_commands=("codex" "claude" "copilot" "droid" "amp" "cursor-agent" "opencode" "qwen" "gemini" "kimi" "crush" "aider" "goose")

for cmd in "${supported_commands[@]}"; do
if command_exists "$cmd"; then
Expand Down Expand Up @@ -465,8 +471,8 @@ send_ghostty_command() {
# Escape for AppleScript: backslashes and quotes need escaping
# AppleScript string literals use backslash as escape character
local escaped_cmd="$cmd"
escaped_cmd="${escaped_cmd//\\/\\\\}" # Escape backslashes first: \ \\
escaped_cmd="${escaped_cmd//\"/\\\"}" # Then escape quotes: " \"
escaped_cmd="${escaped_cmd//\\/\\\\}" # Escape backslashes first: \ ? \\
escaped_cmd="${escaped_cmd//\"/\\\"}" # Then escape quotes: " ? \"

# Type the command and press return
print_debug "AppleScript escaped: $escaped_cmd"
Expand Down Expand Up @@ -922,6 +928,17 @@ run_multi_agents() {
fi
agent_prompts+=("") # amp handles prompts via stdin, not delayed
;;
goose)
# Goose: pass prompts via stdin using 'goose session'
if (( ${#common_args[@]} )); then
local prompt_joined
prompt_joined=$(printf '%s ' "${common_args[@]}"); prompt_joined=${prompt_joined%% }
shell_cmd="echo $(printf %q "$prompt_joined") | goose session"
else
cmd_arr+=("goose" "session")
fi
agent_prompts+=("") # goose handles prompts via stdin, not delayed
;;
copilot)
# Copilot: doesn't support direct interactive prompts
# Launch agent, then send prompt via AppleScript after startup
Expand Down Expand Up @@ -1155,7 +1172,7 @@ pick_random_agent() {

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

Expand Down Expand Up @@ -1240,7 +1257,7 @@ mop_cleanup() {
print_success "Deleted branch: $branch"
((branch_count++))
fi
done < <(git branch | sed 's/^[* ] //' | grep -E '^(claude|codex|copilot|amp|opencode|gemini|qwen|droid|cursor-agent|kimi|crush)-[0-9]+$')
done < <(git branch | sed 's/^[* ] //' | grep -E '^(claude|codex|copilot|amp|opencode|gemini|qwen|droid|cursor-agent|kimi|crush|aider|goose)-[0-9]+$')

if (( branch_count == 0 )); then
print_info "No agent branches found"
Expand Down Expand Up @@ -1446,7 +1463,7 @@ main() {

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

Expand Down Expand Up @@ -1492,7 +1509,7 @@ main() {
fi

# Determine mode based on command_name format:
# - Contains spaces: it's a prompt full YOLO mode
# - Contains spaces: it's a prompt ? full YOLO mode
# - Contains commas (no spaces): multi-agent mode (agent1,agent2,agent3)
# - Single word: single-agent mode
if [[ "$command_name" == *" "* ]]; then
Expand Down Expand Up @@ -1544,6 +1561,16 @@ main() {
fi
fi
;;
goose)
# Goose: pass prompts via stdin using 'goose session'
if (( ${#command_args[@]} )); then
local prompt_joined
prompt_joined=$(printf '%s ' "${command_args[@]}"); prompt_joined=${prompt_joined%% }
full_command=(bash -lc "echo $(printf %q "$prompt_joined") | goose session")
else
full_command=("goose" "session")
fi
;;
copilot)
# Trust the current directory explicitly
local trust_dir
Expand Down