-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·109 lines (92 loc) · 3.36 KB
/
install.sh
File metadata and controls
executable file
·109 lines (92 loc) · 3.36 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# Root Ventures Apply Skill - One-line installer for Claude CLI
set -e
SKILL_DIR="$HOME/.claude/skills/root-ventures-apply"
REPO_URL="https://raw.githubusercontent.com/rootvc/claude-apply-skill/main"
echo ""
echo "🚀 Installing Root Ventures Apply Skill..."
echo ""
# Create skills directory if it doesn't exist
mkdir -p "$SKILL_DIR"
# Download files
echo "📥 Downloading skill files..."
curl -fsSL "$REPO_URL/skill.json" -o "$SKILL_DIR/skill.json"
curl -fsSL "$REPO_URL/prompt.txt" -o "$SKILL_DIR/prompt.txt"
curl -fsSL "$REPO_URL/apply.sh" -o "$SKILL_DIR/apply.sh"
curl -fsSL "$REPO_URL/README.md" -o "$SKILL_DIR/README.md"
# Make apply.sh executable
chmod +x "$SKILL_DIR/apply.sh"
echo ""
echo "✅ Root Ventures Apply Skill installed successfully!"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo " Launching Claude..."
echo ""
echo " Claude will confirm it's ready, then just say:"
echo " 'I want to apply to Root Ventures'"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Check if Claude CLI is installed
# Try multiple ways to find claude (handles aliases, PATH, and direct installation)
CLAUDE_CMD=""
if command -v claude &> /dev/null; then
CLAUDE_CMD="claude"
elif [ -f "$HOME/.claude/local/claude" ]; then
CLAUDE_CMD="$HOME/.claude/local/claude"
elif [ -f "/usr/local/bin/claude" ]; then
CLAUDE_CMD="/usr/local/bin/claude"
fi
if [ -z "$CLAUDE_CMD" ]; then
echo "⚠️ Claude CLI not found."
echo ""
echo "📦 Installing Claude CLI..."
echo ""
# Install Claude CLI using official installer
echo "Installing Claude CLI..."
curl -fsSL https://claude.ai/install.sh | bash
# Add to PATH if not already there
if ! command -v claude &> /dev/null; then
export PATH="$HOME/.claude/local:$PATH"
# Add to shell profile
SHELL_PROFILE=""
if [ -f "$HOME/.zshrc" ]; then
SHELL_PROFILE="$HOME/.zshrc"
elif [ -f "$HOME/.bashrc" ]; then
SHELL_PROFILE="$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
SHELL_PROFILE="$HOME/.bash_profile"
fi
if [ -n "$SHELL_PROFILE" ]; then
if ! grep -q "/.claude/local" "$SHELL_PROFILE"; then
echo 'export PATH="$HOME/.claude/local:$PATH"' >> "$SHELL_PROFILE"
echo "✅ Added Claude CLI to PATH in $SHELL_PROFILE"
fi
fi
fi
# Verify installation
if command -v claude &> /dev/null; then
CLAUDE_CMD="claude"
echo ""
echo "✅ Claude CLI installed successfully!"
echo ""
elif [ -f "$HOME/.claude/local/claude" ]; then
CLAUDE_CMD="$HOME/.claude/local/claude"
echo ""
echo "✅ Claude CLI installed successfully!"
echo ""
else
echo ""
echo "❌ Claude CLI installation failed."
echo "Please install manually from: https://claude.ai/download"
echo ""
echo "After installing, run this to apply:"
echo " claude 'Read ~/.claude/skills/root-ventures-apply/prompt.txt then I want to apply'"
echo ""
exit 1
fi
fi
# Launch Claude with the skill pre-loaded
sleep 1
exec "$CLAUDE_CMD" "Read ~/.claude/skills/root-ventures-apply/prompt.txt"