Skip to content
Merged
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
187 changes: 136 additions & 51 deletions conductor-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -366,66 +366,151 @@ else:
" || echo -e "${YELLOW}⚠️ Could not create demo tasks.${NC}"
fi

# Step 8: Launch Agent (improved: handle uncommitted changes)
# Step 8: Development Environment Selection
echo ""
read -p "Would you like to start a dev agent now? [Y/n]: " -n 1 -r
echo -e "${YELLOW}πŸ–₯️ Select your primary development environment:${NC}"
echo ""
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
echo -e "${YELLOW}πŸ€– Starting dev agent...${NC}"

# Check for uncommitted changes
if ! git diff-index --quiet HEAD -- 2>/dev/null; then
echo -e "${YELLOW}⚠️ Uncommitted changes detected.${NC}"
read -p "Stash them automatically before starting agent? [Y/n]: " -n 1 -r
echo " 1) Conductor (https://conductor.build - macOS only)"
echo " 2) Terminal (Warp, iTerm2, Windows Terminal, etc.)"
echo " 3) IDE (Cursor, Cline, Windsurf, VSCode, etc.)"
echo ""
read -p "Enter your choice [1-3]: " -n 1 -r ENV_CHOICE
echo ""

case "$ENV_CHOICE" in
1)
# Conductor App Flow
if [[ "$OSTYPE" != "darwin"* ]]; then
echo -e "${YELLOW}⚠️ Conductor app is currently macOS-only.${NC}"
echo "Please select Terminal or IDE option instead."
exit 0
fi

echo -e "${GREEN}🎼 Conductor App Setup${NC}"
echo "=========================================="
echo ""
echo "πŸ“‹ Next Steps:"
echo ""
echo "1. Open Conductor app:"
echo " ${GREEN}open -a Conductor${NC}"
echo ""
echo "2. Add this project as a workspace:"
echo " β€’ In Conductor: ${YELLOW}File β†’ Add Workspace${NC}"
echo " β€’ Select directory: ${GREEN}$(pwd)${NC}"
echo ""
echo "3. Start working with this prompt:"
echo ""
echo " ${YELLOW}\"Check available tasks and start working on the highest priority one.\"${NC}"
echo ""
echo "πŸ’‘ Pro Tips:"
echo " β€’ Conductor will handle task claiming and worktree setup automatically"
echo " β€’ Use the built-in terminal for git operations"
echo " β€’ AI code reviews happen automatically on PRs"
echo ""
echo "πŸ“š Learn more: https://conductor.build"
;;

2|3)
# Terminal/IDE Flow - Run bootstrap
if [ "$ENV_CHOICE" = "2" ]; then
echo -e "${GREEN}πŸ–₯️ Terminal Workflow${NC}"
else
echo -e "${GREEN}πŸ’» IDE Workflow${NC}"
fi
echo "=========================================="
echo ""

read -p "Would you like to start a dev agent now? [Y/n]: " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
git stash push -m "Auto-stash before Conductor agent startup" || {
echo -e "${RED}❌ Failed to stash changes.${NC}"
echo "Please commit or stash changes manually, then run: bash .conductor/scripts/bootstrap.sh dev"
exit 1
echo -e "${YELLOW}πŸ€– Starting dev agent...${NC}"

# Check for uncommitted changes
if ! git diff-index --quiet HEAD -- 2>/dev/null; then
echo -e "${YELLOW}⚠️ Uncommitted changes detected.${NC}"
read -p "Stash them automatically before starting agent? [Y/n]: " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
git stash push -m "Auto-stash before Conductor agent startup" || {
echo -e "${RED}❌ Failed to stash changes.${NC}"
echo "Please commit or stash changes manually, then run: bash .conductor/scripts/bootstrap.sh dev"
exit 1
}
echo -e "${GREEN}βœ… Changes stashed. You can restore them later with: git stash pop${NC}"
else
echo -e "${YELLOW}⚠️ Skipping agent startup. Please handle uncommitted changes first.${NC}"
echo "Then run: bash .conductor/scripts/bootstrap.sh dev"
exit 0
fi
fi

bash .conductor/scripts/bootstrap.sh dev || {
echo -e "${YELLOW}⚠️ Agent startup failed.${NC}"
echo "You can try again with: bash .conductor/scripts/bootstrap.sh dev"
if git stash list | grep -q "Auto-stash before Conductor"; then
echo "To restore your stashed changes: git stash pop"
fi
}
echo -e "${GREEN}βœ… Changes stashed. You can restore them later with: git stash pop${NC}"
else
echo -e "${YELLOW}⚠️ Skipping agent startup. Please handle uncommitted changes first.${NC}"
echo "Then run: bash .conductor/scripts/bootstrap.sh dev"
exit 0
echo ""
echo "πŸ“‹ To start an agent later:"
echo " ${GREEN}bash .conductor/scripts/bootstrap.sh dev${NC}"
fi
fi

bash .conductor/scripts/bootstrap.sh dev || {
echo -e "${YELLOW}⚠️ Agent startup failed.${NC}"
echo "You can try again with: bash .conductor/scripts/bootstrap.sh dev"
if git stash list | grep -q "Auto-stash before Conductor"; then
echo "To restore your stashed changes: git stash pop"
fi
}
fi
;;

*)
echo -e "${RED}❌ Invalid choice. Please run the installer again.${NC}"
exit 1
;;
esac

# Note: No cleanup of setup.py, requirements.txt, etc. - leaving them in place for user reference and future use.

# Step 9: Next Steps (enhanced with copy-pasteable commands)
echo ""
echo -e "${GREEN}πŸŽ‰ Installation Successful!${NC}"
echo "=========================================="
echo "Code Conductor is now installed with:"
if [ -n "$DETECTED_STACKS" ]; then
echo " βœ… Auto-detected: $DETECTED_STACKS"
# Step 9: Next Steps (contextual based on environment choice)
if [ "$ENV_CHOICE" != "1" ]; then
# Terminal/IDE users get the full command list
echo ""
echo -e "${GREEN}πŸŽ‰ Installation Successful!${NC}"
echo "=========================================="
echo "Code Conductor is now installed with:"
if [ -n "$DETECTED_STACKS" ]; then
echo " βœ… Auto-detected: $DETECTED_STACKS"
else
echo " βœ… Auto-detected technology stack"
fi
echo " βœ… AI code-reviewer for all PRs"
echo " βœ… Specialized roles: ${CONFIGURED_ROLES}"
echo " βœ… Demo tasks ready to claim"
echo ""
echo "${YELLOW}Quick Start Commands:${NC}"
echo " πŸ“‹ View tasks: ${GREEN}cat .conductor/workflow-state.json | jq '.available_tasks'${NC}"
echo " πŸ€– Start agent: ${GREEN}bash .conductor/scripts/bootstrap.sh dev${NC}"
echo " πŸ“ Create task: ${GREEN}gh issue create -l 'conductor:task'${NC}"
echo " πŸ”§ Adjust config: ${GREEN}$EDITOR .conductor/config.yaml${NC}"
echo ""
echo "${YELLOW}Your first PR will automatically get AI code reviews!${NC}"
echo ""
echo "πŸ“š Documentation: https://github.com/ryanmac/code-conductor"
echo "πŸ› Report issues: https://github.com/ryanmac/code-conductor/issues"
echo ""
echo -e "${GREEN}Happy orchestrating! 🎼${NC}"
else
echo " βœ… Auto-detected technology stack"
# Conductor app users get a simplified message (already shown above)
echo ""
echo -e "${GREEN}πŸŽ‰ Setup Complete!${NC}"
echo "=========================================="
echo "Code Conductor is configured with:"
if [ -n "$DETECTED_STACKS" ]; then
echo " βœ… Auto-detected: $DETECTED_STACKS"
else
echo " βœ… Auto-detected technology stack"
fi
echo " βœ… AI code-reviewer for all PRs"
echo " βœ… Specialized roles: ${CONFIGURED_ROLES}"
echo " βœ… Demo tasks ready in Conductor"
echo ""
echo "πŸ“š Documentation: https://github.com/ryanmac/code-conductor"
echo "πŸ› Report issues: https://github.com/ryanmac/code-conductor/issues"
echo ""
echo -e "${GREEN}Happy orchestrating with Conductor! 🎼${NC}"
fi
echo " βœ… AI code-reviewer for all PRs"
echo " βœ… Specialized roles: ${CONFIGURED_ROLES}"
echo " βœ… Demo tasks ready to claim"
echo ""
echo "${YELLOW}Quick Start Commands:${NC}"
echo " πŸ“‹ View tasks: ${GREEN}cat .conductor/workflow-state.json | jq '.available_tasks'${NC}"
echo " πŸ€– Start agent: ${GREEN}bash .conductor/scripts/bootstrap.sh dev${NC}"
echo " πŸ“ Create task: ${GREEN}gh issue create -l 'conductor:task'${NC}"
echo " πŸ”§ Adjust config: ${GREEN}$EDITOR .conductor/config.yaml${NC}"
echo ""
echo "${YELLOW}Your first PR will automatically get AI code reviews!${NC}"
echo ""
echo "πŸ“š Documentation: https://github.com/ryanmac/code-conductor"
echo "πŸ› Report issues: https://github.com/ryanmac/code-conductor/issues"
echo ""
echo -e "${GREEN}Happy orchestrating! 🎼${NC}"
Loading