-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·166 lines (140 loc) · 5.8 KB
/
install.sh
File metadata and controls
executable file
·166 lines (140 loc) · 5.8 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/usr/bin/env bash
set -euo pipefail
echo "🌟 Installing Claude Code Public Configuration"
# Check if Claude Code is installed
if ! command -v claude &> /dev/null; then
echo "⚠️ Claude Code is not installed. Installing now..."
curl -fsSL https://claude.ai/install.sh | bash
fi
# Create .claude directory if it doesn't exist
mkdir -p ~/.claude
echo "🏪 Installing Official Marketplaces"
# Add claude-plugins-official marketplace
if ! claude plugin marketplace list 2>/dev/null | grep -q "claude-plugins-official"; then
claude plugin marketplace add anthropics/claude-plugins-official
else
echo "ℹ️ Marketplace claude-plugins-official already added, skipping..."
fi
# Add claude-code-plugins marketplace
if ! claude plugin marketplace list 2>/dev/null | grep -q "claude-code-plugins"; then
claude plugin marketplace add anthropics/claude-code
else
echo "ℹ️ Marketplace claude-code-plugins already added, skipping..."
fi
echo "🔌 Installing Official Plugins"
# Install claude-md-management plugin
if ! claude plugin list 2>/dev/null | grep -q "claude-md-management"; then
claude plugin install claude-md-management@claude-plugins-official
else
echo "ℹ️ Plugin claude-md-management already installed, skipping..."
fi
# Install claude-code-setup plugin
if ! claude plugin list 2>/dev/null | grep -q "claude-code-setup"; then
claude plugin install claude-code-setup@claude-plugins-official
else
echo "ℹ️ Plugin claude-code-setup already installed, skipping..."
fi
# Install pyright-lsp plugin
pip install pyright
if ! claude plugin list 2>/dev/null | grep -q "pyright-lsp"; then
claude plugin install pyright-lsp@claude-plugins-official
else
echo "ℹ️ Plugin pyright-lsp already installed, skipping..."
fi
# Install pr-review-toolkit plugin
if ! claude plugin list 2>/dev/null | grep -q "pr-review-toolkit"; then
claude plugin install pr-review-toolkit@claude-plugins-official
else
echo "ℹ️ Plugin pr-review-toolkit already installed, skipping..."
fi
echo "🔌 Installing Chrome DevTools MCP Plugin"
# Add ChromeDevTools marketplace
if ! claude plugin marketplace list 2>/dev/null | grep -q "ChromeDevTools"; then
claude plugin marketplace add ChromeDevTools/chrome-devtools-mcp
else
echo "ℹ️ Marketplace ChromeDevTools already added, skipping..."
fi
# Install chrome-devtools-mcp plugin
if ! claude plugin list 2>/dev/null | grep -q "chrome-devtools-mcp"; then
claude plugin install chrome-devtools-mcp
else
echo "ℹ️ Plugin chrome-devtools-mcp already installed, skipping..."
fi
echo "🔌 Installing Claude Code Stepwise-Dev Plugins"
# Add marketplace (only if not already added)
if ! claude plugin marketplace list 2>/dev/null | grep -q "stepwise-dev"; then
claude plugin marketplace add nikeyes/stepwise-dev
else
echo "ℹ️ Marketplace stepwise-dev already added, skipping..."
fi
# Install each stepwise sub-plugin individually
for stepwise_plugin in stepwise-web stepwise-core stepwise-git stepwise-research; do
if ! claude plugin list 2>/dev/null | grep -q "^${stepwise_plugin}"; then
claude plugin install "${stepwise_plugin}@stepwise-dev"
else
echo "ℹ️ Plugin ${stepwise_plugin} already installed, skipping..."
fi
done
echo "📋 Installing CLAUDE.md"
gcp --backup=numbered ./CLAUDE.md ~/.claude/CLAUDE.md
echo "📊 Installing Custom Status Line"
gcp --backup=numbered ./statusline.sh ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh
echo "🔔 Installing Hooks"
mkdir -p ~/.claude/hooks
gcp --backup=numbered ./hooks/*.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/*.sh
echo "🔄 Installing Profile Switcher"
gcp --backup=numbered ./switch-claude-config.sh ~/.claude/switch-claude-config.sh
chmod +x ~/.claude/switch-claude-config.sh
echo "🎯 Installing Custom Commands"
mkdir -p ~/.claude/commands
gcp --backup=numbered ./commands/*.md ~/.claude/commands/
echo "🧠 Installing Skills"
mkdir -p ~/.claude/skills
for skill_dir in ./skills/*/; do
skill_name=$(basename "$skill_dir")
echo " Installing skill: $skill_name"
mkdir -p ~/.claude/skills/"$skill_name"
gcp --backup=numbered "$skill_dir"* ~/.claude/skills/"$skill_name"/
done
echo "⚙️ Installing Personal Settings"
gcp --backup=numbered ./settings-personal.json ~/.claude/settings-personal.json
echo "🦀 Installing RTK (Rust Token Killer)"
if command -v brew &> /dev/null; then
if ! command -v rtk &> /dev/null; then
brew install rtk
else
echo "ℹ️ RTK already installed, skipping..."
fi
elif ! command -v rtk &> /dev/null; then
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
else
echo "ℹ️ RTK already installed, skipping..."
fi
if command -v rtk &> /dev/null; then
echo "🔧 Configuring RTK for Claude Code"
rtk init -g --auto-patch
echo "🔕 Disabling RTK telemetry"
RTK_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/rtk"
mkdir -p "$RTK_CONFIG_DIR"
RTK_CONFIG="$RTK_CONFIG_DIR/config.toml"
if ! grep -q "\[telemetry\]" "$RTK_CONFIG" 2>/dev/null; then
printf '\n[telemetry]\nenabled = false\n' >> "$RTK_CONFIG"
fi
SHELL_RC="${ZDOTDIR:-$HOME}/.zshrc"
if ! grep -q "RTK_TELEMETRY_DISABLED" "$SHELL_RC" 2>/dev/null; then
printf '\nexport RTK_TELEMETRY_DISABLED=1 # RTK telemetry opt-out\n' >> "$SHELL_RC"
echo "ℹ️ Added RTK_TELEMETRY_DISABLED=1 to $SHELL_RC"
else
echo "ℹ️ RTK_TELEMETRY_DISABLED already set in $SHELL_RC, skipping..."
fi
else
echo "⚠️ RTK installation failed, skipping configuration"
fi
echo ""
echo "✅ Claude Code public configuration installed successfully"
echo "🌟 If you want monitoring with Prometheus and Grafana:"
echo " - Follow: https://github.com/nikeyes/claude-code-monitoring-guide"
echo ""