-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·143 lines (131 loc) · 5.31 KB
/
install.sh
File metadata and controls
executable file
·143 lines (131 loc) · 5.31 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/bin/bash
set -e
# Pre-flight: Verify Claude Code is installed
if ! command -v claude &>/dev/null; then
echo ""
echo " ERROR: Claude Code is not installed."
echo ""
echo " Cofounder requires Claude Code (Anthropic's CLI for Claude)."
echo " Install it first: npm install -g @anthropic-ai/claude-code"
echo ""
echo " Then re-run: bash ~/.cofounder/install.sh"
echo ""
exit 1
fi
# Cofounder — AI Co-founder for Solo Founders
# One-line install: gh repo clone ajsai47/get-cofounder ~/.cofounder && bash ~/.cofounder/install.sh
REPO_URL="https://github.com/ajsai47/get-cofounder.git"
INSTALL_DIR="$HOME/.cofounder"
SKILL_DIR="$HOME/.claude/skills/cofounder"
AGENTS_DIR="$HOME/.claude/agents"
COMMANDS_DIR="$HOME/.claude/commands"
HOOKS_DIR="$HOME/.claude/hooks/cofounder"
SETTINGS_FILE="$HOME/.claude/settings.json"
echo ""
echo " ██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗███╗ ██╗██████╗ ███████╗██████╗ "
echo " ██╔════╝██╔═══██╗██╔════╝██╔═══██╗██║ ██║████╗ ██║██╔══██╗██╔════╝██╔══██╗"
echo " ██║ ██║ ██║█████╗ ██║ ██║██║ ██║██╔██╗ ██║██║ ██║█████╗ ██████╔╝"
echo " ██║ ██║ ██║██╔══╝ ██║ ██║██║ ██║██║╚██╗██║██║ ██║██╔══╝ ██╔══██╗"
echo " ╚██████╗╚██████╔╝██║ ╚██████╔╝╚██████╔╝██║ ╚████║██████╔╝███████╗██║ ██║"
echo " ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═════╝ ╚══════╝╚═╝ ╚═╝"
echo ""
echo " Your AI co-founder — 11 departments, 34 agents"
echo " Installing..."
echo ""
# Clone or update the repo
if [ -d "$INSTALL_DIR" ]; then
echo " → Updating existing installation..."
cd "$INSTALL_DIR" && git pull --quiet
else
echo " → Downloading Cofounder..."
if command -v gh &>/dev/null && gh auth status &>/dev/null; then
gh repo clone ajsai47/get-cofounder "$INSTALL_DIR" -- --quiet
else
git clone --quiet "$REPO_URL" "$INSTALL_DIR"
fi
fi
# Create .claude directories if they don't exist
mkdir -p "$SKILL_DIR"
mkdir -p "$AGENTS_DIR"
mkdir -p "$COMMANDS_DIR"
mkdir -p "$HOOKS_DIR"
mkdir -p "$HOME/.claude/cofounder-memory"
# Install skill (symlink for easy updates)
echo " → Installing skill..."
if [ -L "$SKILL_DIR" ] || [ -d "$SKILL_DIR" ]; then
rm -rf "$SKILL_DIR"
fi
ln -sf "$INSTALL_DIR/skill" "$SKILL_DIR"
# Install agents (symlink each department)
echo " → Installing agents..."
for dept_dir in "$INSTALL_DIR/agents"/*/; do
dept_name=$(basename "$dept_dir")
target="$AGENTS_DIR/$dept_name"
if [ -L "$target" ] || [ -d "$target" ]; then
rm -rf "$target"
fi
ln -sf "$dept_dir" "$target"
done
# Install commands (symlink each command file)
echo " → Installing commands..."
for cmd_file in "$INSTALL_DIR/skill/commands"/*.md; do
cmd_name=$(basename "$cmd_file")
target="$COMMANDS_DIR/$cmd_name"
if [ -L "$target" ] || [ -f "$target" ]; then
rm -f "$target"
fi
ln -sf "$cmd_file" "$target"
done
# Install hooks (symlink each hook script, make executable)
echo " → Installing hooks..."
HOOKS_INSTALLED=0
for hook_file in "$INSTALL_DIR/hooks"/*.sh; do
[ -f "$hook_file" ] || continue
hook_name=$(basename "$hook_file")
target="$HOOKS_DIR/$hook_name"
if [ -L "$target" ] || [ -f "$target" ]; then
rm -f "$target"
fi
chmod +x "$hook_file"
ln -sf "$hook_file" "$target"
HOOKS_INSTALLED=$((HOOKS_INSTALLED + 1))
done
# Install settings template (only if user doesn't already have one)
SETTINGS_STATUS="skipped (already exists)"
if [ ! -f "$SETTINGS_FILE" ]; then
if [ -f "$INSTALL_DIR/skill/templates/settings.json" ]; then
echo " → Installing settings template..."
cp "$INSTALL_DIR/skill/templates/settings.json" "$SETTINGS_FILE"
SETTINGS_STATUS="installed"
fi
else
echo " → Settings template already exists, skipping..."
fi
echo ""
echo " ✓ Skill installed at $SKILL_DIR"
echo " ✓ Agents installed at $AGENTS_DIR"
echo " ✓ Commands installed at $COMMANDS_DIR"
echo " ✓ Hooks installed at $HOOKS_DIR ($HOOKS_INSTALLED hooks)"
echo " ✓ Settings template: $SETTINGS_STATUS"
echo ""
echo " Departments installed:"
for dept_dir in "$INSTALL_DIR/agents"/*/; do
dept_name=$(basename "$dept_dir")
agent_count=$(find "$dept_dir" -name "*.md" | wc -l | tr -d ' ')
echo " • $dept_name ($agent_count agents)"
done
echo ""
echo " Commands installed:"
echo " • /cofounder — Start a session"
for cmd_file in "$INSTALL_DIR/skill/commands"/*.md; do
cmd_name=$(basename "$cmd_file" .md)
echo " • /$cmd_name"
done
echo ""
echo " Get started:"
echo " 1. Open Claude Code in any project"
echo " 2. Type /cofounder"
echo " 3. Follow the setup to configure your company context"
echo ""
echo " Update anytime: cd ~/.cofounder && git pull"
echo ""