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
2 changes: 1 addition & 1 deletion PROJECT_INDEX.json

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions hooks/install-hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,19 @@ mkdir -p "$HOOKS_CONFIG"
if [ -f "$HOOKS_CONFIG/agent-os-hooks.json" ]; then
echo "⚠️ Agent OS hooks are already installed"
echo ""
echo "Do you want to reinstall/update them? (y/n)"
read -r response

if [[ "$response" != "y" ]]; then
echo "Installation cancelled"
exit 0
# Skip prompt if running non-interactively (piped input)
if [ ! -t 0 ]; then
echo "Running in non-interactive mode - updating hooks..."
echo ""
else
echo "Do you want to reinstall/update them? (y/n)"
read -r response

if [[ "$response" != "y" ]]; then
echo "Installation cancelled"
exit 0
fi
fi

echo ""
Expand Down
22 changes: 14 additions & 8 deletions integrations/setup-subagent-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,22 @@ main() {
echo "Your existing workflows remain unchanged - enhancements are available when YOU want them."
echo ""

read -p "Continue with setup? (y/n): " -n 1 -r
echo ""

if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Setup cancelled."
exit 0
# Skip prompt if running non-interactively (piped input)
if [ ! -t 0 ]; then
echo "Running in non-interactive mode - proceeding with setup..."
echo ""
else
read -p "Continue with setup? (y/n): " -n 1 -r
echo ""

if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Setup cancelled."
exit 0
fi

echo ""
fi

echo ""

# Run setup steps
check_claude_code

Expand Down
22 changes: 16 additions & 6 deletions setup-claude-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,15 @@ echo "📥 Installing subagent integration..."
curl -s -o "/tmp/setup-subagent-integration.sh" "${BASE_URL}/integrations/setup-subagent-integration.sh"
if [ -f "/tmp/setup-subagent-integration.sh" ]; then
chmod +x "/tmp/setup-subagent-integration.sh"
if /tmp/setup-subagent-integration.sh; then
/tmp/setup-subagent-integration.sh

# Check if installation actually completed by verifying config file exists
if [ -f "$HOME/.agent-os/subagent-config.yaml" ]; then
echo "✅ Subagent integration installed successfully!"
else
echo "⚠️ Subagent integration installation had issues"
echo "⚠️ Subagent integration setup did not complete properly"
fi

rm -f "/tmp/setup-subagent-integration.sh"
else
echo "⚠️ Could not download subagent integration setup"
Expand All @@ -156,10 +160,13 @@ echo "📥 Installing Claude Code hooks..."
echo " ✓ Hook utilities found"

# Run the hooks installation
if "$HOME/.agent-os/hooks/install-hooks.sh"; then
"$HOME/.agent-os/hooks/install-hooks.sh"

# Check if installation actually completed by verifying config file exists
if [ -f "$HOME/.config/claude/hooks.json" ]; then
echo " ✅ Claude Code hooks installed successfully!"
else
echo " ⚠️ Claude Code hooks installation failed"
echo " ⚠️ Claude Code hooks installation did not complete properly"
echo " You can install them manually by running:"
echo " ~/.agent-os/hooks/install-hooks.sh"
fi
Expand Down Expand Up @@ -193,10 +200,13 @@ echo "📥 Installing Claude Code hooks..."
echo " ✓ Downloaded claude-code-hooks.json"

# Run installation
if "$HOME/.agent-os/hooks/install-hooks.sh"; then
"$HOME/.agent-os/hooks/install-hooks.sh"

# Check if installation actually completed by verifying config file exists
if [ -f "$HOME/.config/claude/hooks.json" ]; then
echo " ✅ Claude Code hooks installed successfully!"
else
echo " ⚠️ Claude Code hooks installation failed"
echo " ⚠️ Claude Code hooks installation did not complete properly"
fi
fi

Expand Down
19 changes: 6 additions & 13 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

set -e # Exit on error

# Initialize flags
OVERWRITE_INSTRUCTIONS=false
# Initialize flags - always update instructions to get latest versions
OVERWRITE_INSTRUCTIONS=true
OVERWRITE_STANDARDS=false

# Parse command line arguments
Expand Down Expand Up @@ -312,17 +312,10 @@ echo " ~/.agent-os/workflow-modules/ - Modular workflow components"
echo " ~/.agent-os/tools/ - Agent OS CLI tools (aos)"
echo " ~/.agent-os/VERSION - Version $AGENT_OS_VERSION"
echo ""
if [ "$OVERWRITE_INSTRUCTIONS" = false ] && [ "$OVERWRITE_STANDARDS" = false ]; then
echo "💡 Note: Existing files were skipped to preserve your customizations"
echo " Use --overwrite-instructions or --overwrite-standards to update specific files"
else
echo "💡 Note: Some files were overwritten based on your flags"
if [ "$OVERWRITE_INSTRUCTIONS" = false ]; then
echo " Existing instruction files were preserved"
fi
if [ "$OVERWRITE_STANDARDS" = false ]; then
echo " Existing standards files were preserved"
fi
echo "💡 Note: Instructions are always updated to latest versions"
echo " Standards files preserve your customizations unless --overwrite-standards is used"
if [ "$OVERWRITE_STANDARDS" = true ]; then
echo " Standards files were overwritten with latest versions"
fi
# Check for existing Claude Code commands and offer update
if [ -d "$HOME/.claude/commands" ] && [ "$(ls -A $HOME/.claude/commands 2>/dev/null)" ]; then
Expand Down
Loading