55
66set -e
77
8- echo " 🚀 Setting up Claude Code..."
9-
10- # Colors
11- GREEN=' \033[0;32m'
12- BLUE=' \033[0;34m'
13- NC=' \033[0m' # No Color
8+ echo " Setting up Claude Code..."
9+ echo " "
1410
1511# 1. Install Claude Code CLI
16- echo -e " ${BLUE} 📦 Installing Claude Code CLI...${NC} "
12+ echo " [1/6] Installing Claude Code CLI..."
1713curl -fsSL https://claude.ai/install.sh | sh
1814
1915# 2. Create ~/.claude directory structure
20- echo -e " ${BLUE} 📁 Creating directory structure...${NC} "
16+ echo " [2/6] Creating directory structure..."
2117mkdir -p ~ /.claude/{commands,agents,memory}
2218
2319# 3. Create settings.json
24- echo -e " ${BLUE} ⚙️ Creating settings.json...${NC} "
20+ echo " [3/6] Creating settings.json..."
2521cat > ~ /.claude/settings.json << 'EOF '
2622{
2723 "env": {
@@ -38,7 +34,7 @@ cat > ~/.claude/settings.json << 'EOF'
3834 "hooks": [
3935 {
4036 "type": "command",
41- "command": "PID=$(lsof -ti:3000 2>/dev/null); if [ ! -z \"$PID\" ]; then kill -9 $PID 2>/dev/null && echo '🔄 Killed existing process on port 3000'; sleep 1; fi; exit 0"
37+ "command": "PID=$(lsof -ti:3000 2>/dev/null); if [ ! -z \"$PID\" ]; then kill -9 $PID 2>/dev/null && echo 'Killed existing process on port 3000'; sleep 1; fi; exit 0"
4238 }
4339 ]
4440 }
@@ -59,7 +55,7 @@ cat > ~/.claude/settings.json << 'EOF'
5955EOF
6056
6157# 4. Create CLAUDE.md
62- echo -e " ${BLUE} 📝 Creating CLAUDE.md...${NC} "
58+ echo " [4/6] Creating CLAUDE.md..."
6359cat > ~ /.claude/CLAUDE.md << 'EOF '
6460# Global Claude Code Instructions
6561
@@ -224,7 +220,7 @@ When user mentions a keyword from the trigger tables:
224220EOF
225221
226222# 5. Update shell configuration
227- echo -e " ${BLUE} 🐚 Updating shell configuration...${NC} "
223+ echo " [5/6] Updating shell configuration..."
228224
229225SHELL_RC=" $HOME /.zshrc"
230226if [[ " $SHELL " == * " bash" * ]]; then
@@ -240,27 +236,28 @@ export PATH="$HOME/.local/bin:$PATH"
240236export PATH="$HOME/.claude/bin:$PATH"
241237alias c='claude --dangerously-skip-permissions'
242238EOF
243- echo -e " ${GREEN} ✅ Added Claude Code config to $SHELL_RC ${NC} "
239+ echo " Added Claude Code config to $SHELL_RC "
244240else
245- echo -e " ${GREEN} ✅ Shell already configured${NC} "
241+ echo " Shell already configured"
246242fi
247243
248244# 6. Clone codebase if not exists
245+ echo " [6/6] Checking codebase repository..."
249246if [ ! -d " $HOME /codebase" ]; then
250- echo -e " ${BLUE} 📥 Cloning codebase...${NC} "
247+ echo " Cloning codebase..."
251248 git clone https://github.com/databayt/codebase.git " $HOME /codebase"
252249else
253- echo -e " ${GREEN} ✅ Codebase already exists${NC} "
250+ echo " Codebase already exists"
254251fi
255252
256253# Done
257254echo " "
258- echo -e " ${GREEN} ✅ Claude Code setup complete! ${NC} "
255+ echo " Setup complete. "
259256echo " "
260257echo " Next steps:"
261258echo " 1. Run: source $SHELL_RC "
262259echo " 2. Run: c"
263- echo " 3. Start coding! "
260+ echo " 3. Start coding"
264261echo " "
265262echo " Commands:"
266263echo " c - Start Claude Code session"
0 commit comments