-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·92 lines (81 loc) · 3.05 KB
/
setup.sh
File metadata and controls
executable file
·92 lines (81 loc) · 3.05 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
#!/bin/bash
set -e
echo "=== Claude Code Global Setup ==="
echo ""
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# -----------------------------------
# Step 1: Create ~/.claude directory
# -----------------------------------
echo "[1/6] Creating ~/.claude directory..."
mkdir -p ~/.claude
mkdir -p ~/.claude/agents
mkdir -p ~/.claude/prompts
# -----------------------------------
# Step 2: Copy global CLAUDE.md
# -----------------------------------
echo "[2/6] Installing global CLAUDE.md..."
cp "$SCRIPT_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
echo " → ~/.claude/CLAUDE.md"
# -----------------------------------
# Step 3: Copy global settings.json
# -----------------------------------
echo "[3/6] Installing global settings.json..."
cp "$SCRIPT_DIR/settings.json" ~/.claude/settings.json
echo " → ~/.claude/settings.json"
# -----------------------------------
# Step 4: Copy global agents
# -----------------------------------
echo "[4/6] Installing global agents..."
cp "$SCRIPT_DIR"/.claude/agents/*.md ~/.claude/agents/
echo " → ~/.claude/agents/explorer.md"
echo " → ~/.claude/agents/implementer.md"
echo " → ~/.claude/agents/reviewer.md"
# -----------------------------------
# Step 5: Copy prompt templates
# -----------------------------------
echo "[5/6] Installing prompt templates..."
cp "$SCRIPT_DIR"/prompts/*.md ~/.claude/prompts/
for f in "$SCRIPT_DIR"/prompts/*.md; do
echo " → ~/.claude/prompts/$(basename "$f")"
done
# -----------------------------------
# Step 6: Install Linear MCP server
# -----------------------------------
echo "[6/6] Linear MCP setup..."
echo ""
if command -v claude &> /dev/null; then
echo " To install the Linear MCP server, you need a Linear API key."
echo " Get one from: https://linear.app/settings/api"
echo ""
read -p " Enter your Linear API key (or press Enter to skip): " LINEAR_KEY
if [ -n "$LINEAR_KEY" ]; then
claude mcp add --transport http linear --scope user \
"https://mcp.linear.app/mcp" \
--header "Authorization: Bearer $LINEAR_KEY"
echo " → Linear MCP server added!"
else
echo " → Skipped. Run this later:"
echo " claude mcp add --transport http linear --scope user \\"
echo " https://mcp.linear.app/mcp \\"
echo " --header \"Authorization: Bearer YOUR_API_KEY\""
fi
else
echo " → Claude CLI not found. Install it first, then run:"
echo " claude mcp add --transport http linear --scope user \\"
echo " https://mcp.linear.app/mcp \\"
echo " --header \"Authorization: Bearer YOUR_API_KEY\""
fi
echo ""
echo "=== Setup Complete ==="
echo ""
echo "Installed globally:"
echo " ~/.claude/CLAUDE.md → Workflow rules"
echo " ~/.claude/settings.json → Permissions & hooks"
echo " ~/.claude/agents/ → Explorer, implementer, reviewer"
echo " ~/.claude/prompts/ → Orchestrator + task templates"
echo ""
echo "Per-repo (copy into any project):"
echo " cp -r $SCRIPT_DIR/tasks your-repo/tasks"
echo ""
echo "Optional alias (add to ~/.zshrc or ~/.bashrc):"
echo " alias cc='claude --permission-mode plan'"