forked from buildermethods/agent-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-claude-code.sh
More file actions
81 lines (70 loc) · 2.47 KB
/
setup-claude-code.sh
File metadata and controls
81 lines (70 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
# Agent OS Claude Code Setup Script
# This script installs Agent OS commands for Claude Code
set -e # Exit on error
echo "🚀 Agent OS Claude Code Setup"
echo "============================="
echo ""
# Check if Agent OS base installation is present
if [ ! -d "$HOME/.agent-os/instructions" ] || [ ! -d "$HOME/.agent-os/standards" ]; then
echo "⚠️ Agent OS base installation not found!"
echo ""
echo "Please install the Agent OS base installation first:"
echo ""
echo "Option 1 - Automatic installation:"
echo " curl -sSL https://raw.githubusercontent.com/buildermethods/agent-os/main/setup.sh | bash"
echo ""
echo "Option 2 - Manual installation:"
echo " Follow instructions at https://buildermethods.com/agent-os"
echo ""
exit 1
fi
# Base URL for raw GitHub content
BASE_URL="https://raw.githubusercontent.com/buildermethods/agent-os/main"
# Create directories
echo "📁 Creating directories..."
mkdir -p "$HOME/.claude/commands"
# Download command files for Claude Code
echo ""
echo "📥 Downloading Claude Code command files to ~/.claude/commands/"
# Commands
for cmd in plan-product create-spec execute-tasks analyze-product; do
if [ -f "$HOME/.claude/commands/${cmd}.md" ]; then
echo " ⚠️ ~/.claude/commands/${cmd}.md already exists - skipping"
else
curl -s -o "$HOME/.claude/commands/${cmd}.md" "${BASE_URL}/commands/${cmd}.md"
echo " ✓ ~/.claude/commands/${cmd}.md"
fi
done
# Download Claude Code user CLAUDE.md
echo ""
echo "📥 Downloading Claude Code configuration to ~/.claude/"
if [ -f "$HOME/.claude/CLAUDE.md" ]; then
echo " ⚠️ ~/.claude/CLAUDE.md already exists - skipping"
else
curl -s -o "$HOME/.claude/CLAUDE.md" "${BASE_URL}/claude-code/user/CLAUDE.md"
echo " ✓ ~/.claude/CLAUDE.md"
fi
echo ""
echo "✅ Agent OS Claude Code installation complete!"
echo ""
echo "📍 Files installed to:"
echo " ~/.claude/commands/ - Claude Code commands"
echo " ~/.claude/CLAUDE.md - Claude Code configuration"
echo ""
echo "Next steps:"
echo ""
echo "Initiate Agent OS in a new product's codebase with:"
echo " /plan-product"
echo ""
echo "Initiate Agent OS in an existing product's codebase with:"
echo " /analyze-product"
echo ""
echo "Initiate a new feature with:"
echo " /create-spec (or simply ask 'what's next?')"
echo ""
echo "Build and ship code with:"
echo " /execute-task"
echo ""
echo "Learn more at https://buildermethods.com/agent-os"
echo ""