Installs all autocoder plugin components: parallel agent scripts, shell aliases, loop mechanism, optional ripgrep, and REVIEW.md scaffold. Checks dependencies first and asks before each change.
Complete installation of autocoder plugin components for autonomous issue resolution and parallel agent coordination.
/install
This command installs all autocoder plugin components:
rg, which agents use for fast code search when they shell out~/.local/bin; no rootrg is already installed/loop command (CronCreate) — no installation needed.claude/settings.json for older Claude Code versions/fix-loop to run continuously~/.local/bin/
start-parallel → start-parallel-agents.shadd-worker → add-worker.shremove-worker → remove-worker.shjoin-parallel → join-parallel-agents.shend-parallel → end-parallel-agents.shstop-parallel → stop-parallel-agents.shremote-swarm-setup → remote-swarm-setup.sh (join a swarm on another machine over Tailscale; see docs/remote-swarm.md)~/.local/bin to PATH~/.bashrc or ~/.zshrcscripts/install-shell-aliases.sh (auto-detects agent CLIs)startclt (tmux), startclc (cmux)startct (tmux), startcc (cmux)startgt (tmux), startgc (cmux)startdt (tmux), startdc (cmux)REVIEW.md at the project root: the review rules the /fix pre-landing review hands to every reviewer (failure modes, a nit cap, paths to skip, file:line findings, a summary that leads with a count)scaffold-review-md.shREVIEW.mdThe installer will:
Before making any changes:
Run the installer now:
echo "🔧 Autocoder Plugin Installer"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "This installer will set up:"
echo " 0. Dependency check (tmux/cmux, claude/gemini/codex, gh, rg)"
echo " 1. Loop mechanism (for infinite /fix-loop)"
echo " 2. Parallel agent scripts (terminal commands)"
echo " 3. Shell aliases (optional shortcuts)"
echo " 4. Starter REVIEW.md (optional, this project)"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "📍 Part 0: Dependency Check"
echo ""
echo "Checking for required and optional dependencies..."
echo ""
# Check for terminal multiplexers
HAS_TMUX=false
HAS_CMUX=false
if command -v tmux &> /dev/null; then
TMUX_VERSION=$(tmux -V 2>/dev/null || echo "unknown")
echo "✅ tmux installed ($TMUX_VERSION)"
HAS_TMUX=true
else
echo "❌ tmux not installed"
echo " Install: brew install tmux"
echo " (Required for headless parallel agents on Linux/macOS)"
fi
if command -v cmux &> /dev/null; then
echo "✅ cmux installed"
HAS_CMUX=true
else
echo "⚠️ cmux not installed (optional, macOS only)"
echo " Install: brew tap manaflow-ai/cmux && brew install --cask cmux"
echo " (Native macOS GUI for parallel agents)"
fi
if [ "$HAS_TMUX" = false ] && [ "$HAS_CMUX" = false ]; then
echo ""
echo "⚠️ No terminal multiplexer found!"
echo " You need at least one of tmux or cmux to run parallel agents."
echo " Single-agent mode (/fix, /fix-loop) works without a multiplexer."
fi
echo ""
# Check for agent frameworks
HAS_CLAUDE=false
HAS_GEMINI=false
HAS_CODEX=false
if command -v claude &> /dev/null; then
echo "✅ Claude Code installed"
HAS_CLAUDE=true
else
echo "❌ Claude Code not installed"
echo " Install: npm install -g @anthropic-ai/claude-code"
fi
if command -v gemini &> /dev/null; then
echo "✅ Gemini CLI installed"
HAS_GEMINI=true
else
echo "⚠️ Gemini CLI not installed (optional)"
echo " Install: npm install -g @anthropic-ai/gemini-cli"
fi
if command -v codex &> /dev/null; then
echo "✅ Codex CLI installed"
HAS_CODEX=true
else
echo "⚠️ Codex CLI not installed (optional)"
echo " Install the Codex CLI to enable Codex worker swarms"
fi
echo ""
# Check for GitHub CLI
if command -v gh &> /dev/null; then
echo "✅ GitHub CLI (gh) installed"
else
echo "❌ GitHub CLI (gh) not installed"
echo " Install: brew install gh"
echo " (Required for all autocoder commands)"
fi
# Check for ripgrep (optional: agents search code with it)
if command -v rg &> /dev/null; then
echo "✅ ripgrep (rg) installed"
HAS_RG=true
else
echo "⚠️ ripgrep (rg) not installed (optional; Part 0b offers to install it)"
HAS_RG=false
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
Skip this part when HAS_RG=true. Otherwise, use AskUserQuestion:
Question: "Install ripgrep (rg)? Agents use it for fast code search, especially on large codebases."
Header: "ripgrep"
Options:
- "Yes, install rg" - "Homebrew if present, else the verified release binary into ~/.local/bin (no root)"
- "No, skip this step" - "Agents fall back to grep; you can install later with /install"
If approved:
if [ "$USER_APPROVED_RG" = "yes" ]; then
RG_INSTALLER=""
if [ -f "plugins/autocoder/scripts/install-ripgrep.sh" ]; then
RG_INSTALLER="plugins/autocoder/scripts/install-ripgrep.sh"
else
RG_INSTALLER=$(find "$HOME/.claude/plugins/cache" -name "install-ripgrep.sh" -path "*/autocoder/*" 2>/dev/null | sort -V | tail -1)
fi
if [ -n "$RG_INSTALLER" ]; then
bash "$RG_INSTALLER" && HAS_RG=true
else
echo "❌ Could not locate install-ripgrep.sh; install manually: https://github.com/BurntSushi/ripgrep#installation"
fi
fi
echo ""
Check whether Claude Code supports the /loop command by looking for the CronCreate tool in the available deferred tools list.
If scheduler_create is available and CronCreate is not (Grok): do not install a Stop hook. /fix-loop and /monitor-loop call scheduler_create (durable: true). A Stop hook is not the loop on Grok: it continues one turn at most 8 times. Skip the stop-hook section.
If CronCreate IS available (modern Claude Code):
echo "📍 Part 1: Loop Mechanism"
echo ""
echo "✅ Claude Code /loop command detected (CronCreate available)"
echo " /fix-loop will use the native /loop command — no stop hook needed."
echo ""
INSTALL_STOP_HOOK=false
If a legacy stop hook exists, offer to clean it up:
if [ -f ".claude/settings.json" ] && grep -q "stop-hook" .claude/settings.json 2>/dev/null; then
echo "⚠️ Legacy stop hook found in .claude/settings.json"
echo " This is no longer needed since /loop replaces it."
echo ""
fi
Use AskUserQuestion:
Question: "Remove legacy stop hook from .claude/settings.json? (No longer needed with /loop command)"
Header: "Cleanup"
Options:
- "Yes, remove it" - "Clean up the legacy stop hook since /loop replaces it"
- "No, leave it" - "Keep the stop hook (harmless but unnecessary)"
If approved:
if [ "$USER_APPROVED_CLEANUP" = "yes" ]; then
python3 << 'PYTHON_SCRIPT'
import json
with open(".claude/settings.json", 'r') as f:
settings = json.load(f)
if "hooks" in settings and "Stop" in settings["hooks"]:
settings["hooks"]["Stop"] = [h for h in settings["hooks"]["Stop"] if "stop-hook" not in str(h)]
if not settings["hooks"]["Stop"]:
del settings["hooks"]["Stop"]
if not settings["hooks"]:
del settings["hooks"]
with open(".claude/settings.json", 'w') as f:
json.dump(settings, f, indent=2)
print("✅ Legacy stop hook removed")
PYTHON_SCRIPT
else
echo "⏭️ Kept legacy stop hook"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
Skip the cleanup question entirely if no legacy stop hook was found.
If CronCreate is NOT available (older Claude Code) → Install stop hook as fallback:
echo "📍 Part 1: Stop Hook Installation (fallback)"
echo ""
echo "⚠️ Claude Code /loop command not available in this version."
echo " Installing stop hook for /fix-loop to run continuously."
echo ""
echo "Purpose: Intercepts session exits and feeds /fix back as input."
echo "Location: .claude/settings.json (current project only)"
echo ""
# Auto-detect plugin installation context
# Priority 1: project-local dev install (this repo's own plugins/ directory)
# Priority 2: marketplace cache (~/.claude/plugins/cache/**/autocoder/**)
# Priority 3: legacy fixed paths
STOP_HOOK_PATH=""
if [ -f "plugins/autocoder/hooks/stop-hook.sh" ]; then
STOP_HOOK_PATH="plugins/autocoder/hooks/stop-hook.sh"
CONTEXT="project (plugins/)"
elif [ -f ".claude-plugin/plugins/autocoder/hooks/stop-hook.sh" ]; then
STOP_HOOK_PATH=".claude-plugin/plugins/autocoder/hooks/stop-hook.sh"
CONTEXT="project (.claude-plugin/)"
else
# Search plugin cache - finds any marketplace/version, picks latest by version sort
CACHE_HOOK=$(find "$HOME/.claude/plugins/cache" -name "stop-hook.sh" -path "*/autocoder/*" ! -name "*wrapper*" 2>/dev/null | sort -V | tail -1)
if [ -z "$CACHE_HOOK" ]; then
# Grok: ~/.grok/installed-plugins/<name>-<hash>/hooks/stop-hook.sh
CACHE_HOOK=$(find "$HOME/.grok/installed-plugins" -name "stop-hook.sh" -path "*/autocoder-*/*" ! -path "*/skills/*" ! -name "*wrapper*" 2>/dev/null | sort | tail -1)
fi
if [ -n "$CACHE_HOOK" ]; then
STOP_HOOK_PATH="$CACHE_HOOK"
case "$CACHE_HOOK" in
*"/.grok/installed-plugins/"*) CONTEXT="Grok install" ;;
*) CONTEXT="marketplace cache" ;;
esac
else
echo "❌ Error: Could not locate stop-hook.sh"
echo " Searched:"
echo " - plugins/autocoder/hooks/stop-hook.sh (project)"
echo " - .claude-plugin/plugins/autocoder/hooks/stop-hook.sh (project)"
echo " - ~/.claude/plugins/cache/**/autocoder/**/hooks/stop-hook.sh (marketplace)"
echo " - ~/.grok/installed-plugins/autocoder-*/hooks/stop-hook.sh (Grok)"
exit 1
fi
fi
echo "🔍 Detected: Plugin installed in $CONTEXT context"
echo " Path: $STOP_HOOK_PATH"
echo ""
# Grok already runs hooks/hooks.json from the installed plugin. Copying the
# same Stop hook into .claude/settings.json would run it twice.
if [[ "$STOP_HOOK_PATH" == *"/.grok/installed-plugins/"* ]]; then
echo "✅ Stop hook is bundled in the Grok plugin (hooks/hooks.json)."
echo " Not copying it into .claude/settings.json."
INSTALL_STOP_HOOK=false
# Check if already installed
elif [ -f ".claude/settings.json" ] && grep -qF "$STOP_HOOK_PATH" .claude/settings.json 2>/dev/null; then
echo "✅ Stop hook already installed in this project"
INSTALL_STOP_HOOK=false
else
echo "📝 Stop hook not found. Will add this to .claude/settings.json:"
echo ""
cat << PREVIEW
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash $STOP_HOOK_PATH"
}
]
}
]
}
}
PREVIEW
echo ""
INSTALL_STOP_HOOK=true
fi
echo ""
Use AskUserQuestion to ask about stop hook:
Question: "Install stop hook in this project? (needed for /fix-loop on older Claude Code)"
Header: "Stop Hook"
Options:
- "Yes, install stop hook" - "Required for /fix-loop to run continuously"
- "No, skip this step" - "You can install later with /install"
If approved:
if [ "$USER_APPROVED_STOP_HOOK" = "yes" ]; then
mkdir -p .claude
if [ -f ".claude/settings.json" ]; then
# Merge with existing settings
python3 << PYTHON_SCRIPT
import json
import os
with open(".claude/settings.json", 'r') as f:
settings = json.load(f)
stop_hook = {"matcher": "", "hooks": [{"type": "command", "command": "bash $STOP_HOOK_PATH"}]}
if "hooks" not in settings:
settings["hooks"] = {}
if "Stop" not in settings["hooks"]:
settings["hooks"]["Stop"] = []
CURRENT_CMD = "bash $STOP_HOOK_PATH"
# Remove stale/legacy stop hooks (e.g. stop-hook-wrapper.sh) that aren't the current hook
settings["hooks"]["Stop"] = [h for h in settings["hooks"]["Stop"] if "stop-hook" not in str(h) or CURRENT_CMD in str(h)]
if not any(CURRENT_CMD in str(h) for h in settings["hooks"]["Stop"]):
settings["hooks"]["Stop"].append(stop_hook)
with open(".claude/settings.json", 'w') as f:
json.dump(settings, f, indent=2)
print("✅ Stop hook installed")
PYTHON_SCRIPT
else
# Create new settings file
cat > .claude/settings.json << EOF
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash $STOP_HOOK_PATH"
}
]
}
]
}
}
EOF
echo "✅ Stop hook installed"
fi
else
echo "⏭️ Skipped stop hook installation"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "📍 Part 2: Parallel Agent Scripts"
echo ""
echo "Purpose: Terminal commands for multi-agent coordination using"
echo " tmux and git worktrees."
echo ""
echo "Location: ~/.local/bin/ (global, all projects)"
echo ""
INSTALL_DIR="$HOME/.local/bin"
# Auto-detect plugin script directory (same priority order as stop hook)
if [ -d "plugins/autocoder/scripts" ]; then
SCRIPT_DIR="$(pwd)/plugins/autocoder/scripts"
elif [ -d ".claude-plugin/plugins/autocoder/scripts" ]; then
SCRIPT_DIR="$(pwd)/.claude-plugin/plugins/autocoder/scripts"
else
# Search plugin cache - same logic as stop hook detection above
# Same rules as the SCRIPT_DIR resolver (#142, #201): a complete <ver>/scripts tree
# only (not skills/autocoder/scripts, not an empty dir), ranked by <ver> alone.
CACHE_SCRIPTS=$(find "$HOME/.claude/plugins/cache" -type d -name "scripts" -path "*/autocoder/*" -not -path "*/skills/*" 2>/dev/null \
| while read -r d; do if [ -f "$d/issue-fns.sh" ] && [ -f "$d/fix-loop-gate.sh" ]; then echo "$d"; fi; done \
| awk -F/ '{print $(NF-1) "\t" $0}' | sort -V -t$'\t' -k1,1 | tail -1 | cut -f2-)
if [ -z "$CACHE_SCRIPTS" ]; then
# Grok installs to ~/.grok/installed-plugins/<name>-<hash>/scripts.
CACHE_SCRIPTS=$(find "$HOME/.grok/installed-plugins" -type d -name "scripts" -path "*/autocoder-*/*" -not -path "*/skills/*" 2>/dev/null \
| while read -r d; do if [ -f "$d/issue-fns.sh" ] && [ -f "$d/fix-loop-gate.sh" ]; then echo "$d"; fi; done \
| awk -F/ '{print $(NF-1) "\t" $0}' | sort -V -t$'\t' -k1,1 | tail -1 | cut -f2-)
fi
if [ -n "$CACHE_SCRIPTS" ]; then
SCRIPT_DIR="$CACHE_SCRIPTS"
else
echo "❌ Error: Could not locate autocoder scripts directory"
echo " Searched:"
echo " - plugins/autocoder/scripts (project)"
echo " - .claude-plugin/plugins/autocoder/scripts (project)"
echo " - ~/.claude/plugins/cache/**/autocoder/**/scripts (marketplace)"
echo " - ~/.grok/installed-plugins/autocoder-*/scripts (Grok)"
exit 1
fi
fi
echo "🔍 Scripts directory: $SCRIPT_DIR"
echo ""
# Check if already installed
if [ -f "$INSTALL_DIR/start-parallel" ] && [ -f "$INSTALL_DIR/add-worker" ] && [ -f "$INSTALL_DIR/remove-worker" ] && [ -f "$INSTALL_DIR/join-parallel" ] && [ -f "$INSTALL_DIR/end-parallel" ]; then
echo "✅ Parallel agent scripts already installed"
INSTALL_SCRIPTS=false
else
echo "📝 Will create these symlinks in $INSTALL_DIR:"
echo ""
echo " start-parallel -> $SCRIPT_DIR/start-parallel-agents.sh"
echo " add-worker -> $SCRIPT_DIR/add-worker.sh"
echo " remove-worker -> $SCRIPT_DIR/remove-worker.sh"
echo " join-parallel -> $SCRIPT_DIR/join-parallel-agents.sh"
echo " end-parallel -> $SCRIPT_DIR/end-parallel-agents.sh"
echo " stop-parallel -> $SCRIPT_DIR/stop-parallel-agents.sh"
echo " remote-swarm-setup -> $SCRIPT_DIR/remote-swarm-setup.sh"
echo ""
echo "Terminal usage after install:"
echo " cd ~/src/myproject"
echo " start-parallel 3 # Launch 3 parallel agents"
echo " start-parallel 5 --agent codex --issue-source github --paused"
echo " add-worker # Start one idle worker or add/start one worker"
echo " add-worker 2 # Start or add/start two workers"
echo " remove-worker 2 # Stop worker 2"
echo " join-parallel # Rejoin session"
echo " end-parallel # End session and clean up worktrees"
echo " stop-parallel # Stop sessions (no cleanup)"
echo ""
INSTALL_SCRIPTS=true
fi
# Check PATH
PATH_OK=false
if [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then
echo "✅ ~/.local/bin is already in your PATH"
PATH_OK=true
else
# Detect shell
if [ -n "$BASH_VERSION" ]; then
SHELL_RC="$HOME/.bashrc"
SHELL_NAME="bash"
elif [ -n "$ZSH_VERSION" ]; then
SHELL_RC="$HOME/.zshrc"
SHELL_NAME="zsh"
else
SHELL_RC="$HOME/.profile"
SHELL_NAME="shell"
fi
echo "⚠️ ~/.local/bin is NOT in your PATH"
echo ""
echo "📝 Will add this line to $SHELL_RC:"
echo ""
echo ' export PATH="$HOME/.local/bin:$PATH"'
echo ""
echo "After install, restart your $SHELL_NAME or run:"
echo " source $SHELL_RC"
echo ""
fi
echo ""
Use AskUserQuestion:
Question: "Install parallel agent scripts?"
Header: "Scripts"
Options:
- "Yes, install scripts" - "Global terminal commands: start-parallel, add-worker, remove-worker, join-parallel, end-parallel"
- "No, skip this step" - "You can install later with /install"
If approved:
if [ "$USER_APPROVED_SCRIPTS" = "yes" ]; then
# Create install directory
mkdir -p "$INSTALL_DIR"
# Install the six terminal commands. HOW depends on where the scripts live:
#
# - Repo checkout: symlink. The path is stable and tracks git pulls.
# - Plugin cache: generate a wrapper that resolves the CURRENT plugin
# version at RUN time. NEVER symlink into the cache: every plugin update
# installs into a NEW versioned directory (.../autocoder/<ver>/scripts),
# so a symlink pins whatever version was current at install time and
# silently runs stale code after every update (a start-parallel pinned
# to 4.21.0 kept picking tmux because herdr support shipped in 4.22.0).
install_cli() {
local name="$1" script="$2"
case "$SCRIPT_DIR" in
"$HOME/.claude/plugins/cache/"*)
cat > "$INSTALL_DIR/$name" <<WRAPPER
#!/bin/bash
# Generated by /autocoder:install — do not edit; rerun /autocoder:install.
# Resolves the CURRENT autocoder plugin version at run time so plugin
# updates take effect without reinstalling these commands.
DIR=\$(python3 -c '
import json, os
try:
data = json.load(open(os.path.expanduser("~/.claude/plugins/installed_plugins.json")))
for key, entries in data.get("plugins", {}).items():
if key.split("@")[0] == "autocoder" and entries:
print(os.path.join(entries[0]["installPath"], "scripts")); break
except Exception:
pass' 2>/dev/null)
if [ -z "\$DIR" ] || [ ! -f "\$DIR/$script" ]; then
DIR=\$(find "\$HOME/.claude/plugins/cache" -maxdepth 5 -type d -path "*/autocoder/*/scripts" 2>/dev/null | sort -V | tail -1)
fi
if [ -z "\$DIR" ] || [ ! -f "\$DIR/$script" ]; then
echo "❌ Could not locate the installed autocoder plugin scripts" >&2
exit 1
fi
exec bash "\$DIR/$script" "\$@"
WRAPPER
chmod +x "$INSTALL_DIR/$name"
;;
"$HOME/.grok/installed-plugins/"*)
cat > "$INSTALL_DIR/$name" <<WRAPPER
#!/bin/bash
# Generated by /autocoder:install — do not edit; rerun /autocoder:install.
# Resolves the Grok-installed autocoder plugin at run time.
DIR=\$(find "\$HOME/.grok/installed-plugins" -type d -name scripts -path "*/autocoder-*/*" -not -path "*/skills/*" 2>/dev/null \
| while read -r d; do if [ -f "\$d/$script" ]; then echo "\$d"; fi; done | sort | tail -1)
if [ -z "\$DIR" ] || [ ! -f "\$DIR/$script" ]; then
echo "❌ Could not locate the installed autocoder plugin scripts" >&2
exit 1
fi
exec bash "\$DIR/$script" "\$@"
WRAPPER
chmod +x "$INSTALL_DIR/$name"
;;
*)
ln -sf "$SCRIPT_DIR/$script" "$INSTALL_DIR/$name"
;;
esac
}
install_cli start-parallel start-parallel-agents.sh
install_cli add-worker add-worker.sh
install_cli remove-worker remove-worker.sh
install_cli join-parallel join-parallel-agents.sh
install_cli end-parallel end-parallel-agents.sh
install_cli stop-parallel stop-parallel-agents.sh
install_cli remote-swarm-setup remote-swarm-setup.sh
echo "✅ Commands installed:"
echo " $INSTALL_DIR/start-parallel"
echo " $INSTALL_DIR/add-worker"
echo " $INSTALL_DIR/remove-worker"
echo " $INSTALL_DIR/join-parallel"
echo " $INSTALL_DIR/end-parallel"
echo " $INSTALL_DIR/stop-parallel"
# Add to PATH if needed
if [ "$PATH_OK" = false ]; then
echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$SHELL_RC"
echo "✅ PATH updated in $SHELL_RC"
echo " ⚡ Restart your shell or run: source $SHELL_RC"
fi
else
echo "⏭️ Skipped script installation"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "📍 Part 3: Shell Aliases (Optional)"
echo ""
echo "Purpose: Shorter commands for convenience, with multiplexer-specific variants."
echo ""
echo "Location: $SHELL_RC"
echo ""
echo "📝 Will add these aliases:"
echo ""
echo " # Generic (auto-detect multiplexer)"
echo " alias start='start-parallel'"
echo " alias join='join-parallel'"
echo " alias end='end-parallel'"
echo ""
Show the full alias table:
echo " Agent tmux cmux"
echo " ───────── ──────── ────────"
echo " Claude startclt startclc"
echo " Codex startct startcc"
echo " Gemini startgt startgc"
echo " Droid startdt startdc"
echo ""
echo "install-shell-aliases.sh auto-detects which agent CLIs are installed."
echo "Use --all to install aliases for all agents regardless."
echo ""
echo "Usage after install:"
echo " startclt 3 # 1 manager + 3 Claude workers in tmux"
echo " startct 3 # 1 manager + 3 Codex workers in tmux"
echo " startgt 3 # 1 manager + 3 Gemini workers in tmux"
echo " startdt 3 # 1 manager + 3 Droid workers in tmux"
Use AskUserQuestion:
Question: "Install shell aliases?"
Header: "Aliases"
Options:
- "Yes, auto-detect" - "Install aliases for agent CLIs that are currently installed"
- "Yes, install all" - "Install aliases for all agents (claude, codex, gemini, droid)"
- "No" - "Skip alias installation"
If approved:
if [ "$USER_APPROVED_ALIASES" = "auto" ]; then
bash "$SCRIPT_DIR/install-shell-aliases.sh"
elif [ "$USER_APPROVED_ALIASES" = "all" ]; then
bash "$SCRIPT_DIR/install-shell-aliases.sh" --all
else
echo "⏭️ Skipped alias installation"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
CLAUDE.md is loaded into every agent turn, so review rules don't belong
there. They go in REVIEW.md, which the pre-landing review in /fix gives
to each reviewer (#169). Skip this part when the project already has a
REVIEW.md at its root (set USER_APPROVED_REVIEW_MD=exists).
Otherwise use AskUserQuestion:
Question: "Add a starter REVIEW.md to this project? The /fix pre-landing review gives it to every reviewer."
Header: "REVIEW.md"
Options:
- "Yes" - "Write a starter REVIEW.md at the project root to edit later"
- "No" - "Skip; reviewers use the built-in rules only"
If approved (SCRIPT_DIR as resolved in Part 2):
if [ "$USER_APPROVED_REVIEW_MD" = "yes" ]; then
bash "$SCRIPT_DIR/scaffold-review-md.sh" .
else
echo "⏭️ Skipped REVIEW.md"
fi
echo "✅ Installation Complete!"
echo ""
echo "📊 What was installed:"
echo ""
if [ "$INSTALL_STOP_HOOK" = false ] && grep -q "CronCreate" <<< "${AVAILABLE_TOOLS:-}"; then
echo " ✅ /loop command available (no stop hook needed)"
echo " → /fix-loop uses native CronCreate mechanism"
elif [ "$INSTALL_STOP_HOOK" = true ] && [ "$USER_APPROVED_STOP_HOOK" = "yes" ]; then
echo " ✅ Stop hook in .claude/settings.json (fallback)"
echo " → Enables /fix-loop to run continuously"
else
echo " ⏭️ Loop mechanism (skipped)"
fi
if [ "$INSTALL_SCRIPTS" = true ] && [ "$USER_APPROVED_SCRIPTS" = "yes" ]; then
echo " ✅ Parallel agent scripts in ~/.local/bin/"
echo " → start-parallel: Launch multi-agent system"
echo " → add-worker: Start idle workers or add/start workers"
echo " → remove-worker: Stop selected workers"
echo " → join-parallel: Rejoin existing session"
echo " → end-parallel: End session and clean up worktrees"
echo " → stop-parallel: Stop sessions (no cleanup)"
else
echo " ⏭️ Parallel agent scripts (skipped)"
fi
if [ "$HAS_RG" = true ]; then
echo " ✅ ripgrep (rg) available for agent code search"
else
echo " ⏭️ ripgrep (skipped; agents fall back to grep)"
fi
if [ "$USER_APPROVED_REVIEW_MD" = "yes" ]; then
echo " ✅ Starter REVIEW.md at the project root (edit it to fit the repo)"
elif [ "$USER_APPROVED_REVIEW_MD" = "exists" ]; then
echo " ✅ REVIEW.md already present (left unchanged)"
else
echo " ⏭️ REVIEW.md (skipped)"
fi
if [ "$USER_APPROVED_ALIASES" = "yes" ]; then
echo " ✅ Shell aliases in $SHELL_RC"
if [ "$HAS_TMUX" = true ]; then
echo " → tmux: startt, joint, stopt, endt"
fi
if [ "$HAS_CMUX" = true ]; then
echo " → cmux: startc, joinc, stopc, endc"
fi
if [ "$HAS_CODEX" = true ] && [ "$HAS_TMUX" = true ]; then
echo " → Codex tmux: startct, joinct"
fi
if [ "$HAS_CODEX" = true ] && [ "$HAS_CMUX" = true ]; then
echo " → Codex cmux: startcc, joincc"
fi
else
echo " ⏭️ Shell aliases (skipped)"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "🚀 Quick Start:"
echo ""
echo "1. Test in this project:"
echo " /fix-loop"
echo ""
if [ "$USER_APPROVED_SCRIPTS" = "yes" ]; then
echo "2. From terminal (after restarting shell):"
echo " cd ~/src/myproject"
echo " start-parallel 3 --mux tmux --agent claude"
echo " start-parallel 5 --mux tmux --agent codex --issue-source github --paused"
echo " add-worker --agent codex"
echo " add-worker 2 --agent codex"
echo " remove-worker 2 --agent codex"
echo " join-parallel # Rejoin session"
echo " end-parallel # End session + cleanup"
echo ""
fi
echo "💡 Tip: Run /install again anytime to install skipped components"
echo ""
.claude/settings.json (project-local)
~/.local/bin/start-parallel, ~/.local/bin/add-worker, ~/.local/bin/remove-worker (symlinks, global)
~/.local/bin/join-parallel (symlink, global)
REVIEW.md (project root)
~/.bashrc or ~/.zshrc (global)
To remove installed components:
# Remove stop hook
rm .claude/settings.json
# Remove scripts
rm ~/.local/bin/start-parallel
rm ~/.local/bin/add-worker
rm ~/.local/bin/remove-worker
rm ~/.local/bin/join-parallel
# Remove PATH (edit manually)
# Remove aliases (edit manually)
nano ~/.bashrc # or ~/.zshrc
Safe to run /install multiple times:
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
/autocoder:installfrom autocoder
Claude never picks this command on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /autocoder:install still runs it.
npx claudepluginhub laird/agents --plugin autocoder33 commands in this plugin
/analyze-tracesAnalyze TracesName the agent failures that repeat (#395). This builds one trace per issue attempt from the/approve-proposalApprove ProposalsApprove one or more AI-generated proposals for implementation by removing the `proposal` label./author-evalsAuthor EvalsTurn the failures that repeat into evaluation cases a machine can run and grade (#395). This/autocoder-helpAutocoder HelpStart by examining the environment to give contextual guidance:/brainstorm-issueBrainstorm IssueUse AI-powered brainstorming to explore design options, clarify requirements, and develop implementation approaches for a GitHub issue./close-issueClose IssueResolve and close an issue with an optional closing comment.Other plugins' commands for the same job