-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·51 lines (42 loc) · 1.51 KB
/
install.sh
File metadata and controls
executable file
·51 lines (42 loc) · 1.51 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
#!/bin/bash
# Claude Code Setup Installer
# Copies all configuration files into ~/.claude
set -euo pipefail
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLAUDE_DIR="$HOME/.claude"
echo "==> Installing Claude Code configuration from $REPO_DIR"
# Create directory structure
mkdir -p "$CLAUDE_DIR/rules"
mkdir -p "$CLAUDE_DIR/hooks"
mkdir -p "$CLAUDE_DIR/skills"
# CLAUDE.md + rules
echo " -> Copying CLAUDE.md and rules..."
cp "$REPO_DIR/CLAUDE.md" "$CLAUDE_DIR/CLAUDE.md"
cp "$REPO_DIR/rules/"*.md "$CLAUDE_DIR/rules/"
# Hooks
echo " -> Installing hooks..."
cp "$REPO_DIR/hooks/"*.sh "$CLAUDE_DIR/hooks/"
cp "$REPO_DIR/hooks/"*.mjs "$CLAUDE_DIR/hooks/"
chmod +x "$CLAUDE_DIR/hooks/"*.sh
chmod +x "$CLAUDE_DIR/hooks/"*.mjs
# Skills
echo " -> Installing skills..."
cp -r "$REPO_DIR/skills/"* "$CLAUDE_DIR/skills/"
# settings.json — only install if not already present, otherwise warn
if [ -f "$CLAUDE_DIR/settings.json" ]; then
echo ""
echo " [!] $CLAUDE_DIR/settings.json already exists — skipping to avoid overwrite."
echo " Review $REPO_DIR/settings.json and merge manually if needed."
else
echo " -> Installing settings.json..."
cp "$REPO_DIR/settings.json" "$CLAUDE_DIR/settings.json"
fi
echo ""
echo "==> Done! Configuration installed to $CLAUDE_DIR"
echo ""
echo "Next steps:"
echo " 1. Set your GitHub token (for GitHub MCP):"
echo " echo 'export GITHUB_TOKEN=ghp_yourtoken' >> ~/.bashrc"
echo " source ~/.bashrc"
echo ""
echo " 2. Restart Claude Code to apply all changes."