claude-dev-kit 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/angelic-workshop-energy-clearing.md +113 -0
- package/.claude/agents/angelic-workshop-intake.md +84 -0
- package/.claude/agents/angelic-workshop-integration.md +140 -0
- package/.claude/agents/angelic-workshop-invocation.md +92 -0
- package/.claude/agents/angelic-workshop-lead.md +225 -0
- package/.claude/agents/angelic-workshop-transmission.md +108 -0
- package/.claude/agents/deep-think-partner.md +41 -0
- package/.claude/agents/dev-backend.md +74 -0
- package/.claude/agents/dev-e2e.md +101 -0
- package/.claude/agents/dev-frontend.md +82 -0
- package/.claude/agents/dev-lead.md +144 -0
- package/.claude/agents/dev-reviewer.md +122 -0
- package/.claude/agents/dev-test.md +88 -0
- package/.claude/agents/documentation-manager.md +73 -0
- package/.claude/agents/haiku-executor.md +8 -0
- package/.claude/agents/pm-groomer.md +98 -0
- package/.claude/agents/pm-prp-writer.md +144 -0
- package/.claude/agents/pm-sizer.md +84 -0
- package/.claude/agents/project-manager.md +91 -0
- package/.claude/agents/system-architect.md +98 -0
- package/.claude/agents/validation-gates.md +121 -0
- package/.claude/agents/workflow-builder.md +416 -0
- package/.claude/commands/ai/detect.md +117 -0
- package/.claude/commands/ai/route.md +128 -0
- package/.claude/commands/ai/switch.md +121 -0
- package/.claude/commands/bs/brainstorm_full.md +149 -0
- package/.claude/commands/bs/claude.md +37 -0
- package/.claude/commands/bs/codex.md +37 -0
- package/.claude/commands/bs/gemini.md +37 -0
- package/.claude/commands/bs/glm.md +37 -0
- package/.claude/commands/bs/grok.md +37 -0
- package/.claude/commands/bs/kimi.md +37 -0
- package/.claude/commands/bs/minimax.md +37 -0
- package/.claude/commands/bs/ollama.md +71 -0
- package/.claude/commands/code/build-and-fix.md +80 -0
- package/.claude/commands/code/simplify.md +77 -0
- package/.claude/commands/dev/backend.md +47 -0
- package/.claude/commands/dev/e2e.md +49 -0
- package/.claude/commands/dev/frontend.md +45 -0
- package/.claude/commands/dev/review.md +48 -0
- package/.claude/commands/dev/test.md +54 -0
- package/.claude/commands/dev-epic.md +121 -0
- package/.claude/commands/dev-issue.md +79 -0
- package/.claude/commands/dev.md +134 -0
- package/.claude/commands/execute-prp.md +113 -0
- package/.claude/commands/fix-github-issue.md +14 -0
- package/.claude/commands/generate-prp.md +73 -0
- package/.claude/commands/git/status.md +14 -0
- package/.claude/commands/haiku.md +13 -0
- package/.claude/commands/improve.md +178 -0
- package/.claude/commands/init.md +311 -0
- package/.claude/commands/pm/groom.md +58 -0
- package/.claude/commands/pm/plan-epic.md +74 -0
- package/.claude/commands/pm/size.md +46 -0
- package/.claude/commands/pm.md +47 -0
- package/.claude/commands/primer.md +16 -0
- package/.claude/commands/self-improve.md +243 -0
- package/.claude/commands/think.md +68 -0
- package/.claude/commands/workflow/angelic-workshop.md +89 -0
- package/.claude/commands/workflow/build.md +91 -0
- package/.claude/hooks/pre-tool-use/block-dangerous-commands.js +196 -0
- package/.claude/hooks/skill-activation-prompt/package-lock.json +560 -0
- package/.claude/hooks/skill-activation-prompt/package.json +16 -0
- package/.claude/hooks/skill-activation-prompt/skill-activation-prompt.ts +135 -0
- package/.claude/hooks/skill-activation-prompt/skill-rules.json +50 -0
- package/.claude/hooks/stop/context_monitor.py +155 -0
- package/.claude/hooks/stop/learning_logger.py +218 -0
- package/.claude/skills/ai-router/SKILL.md +119 -0
- package/.claude/skills/build-and-fix/SKILL.md +271 -0
- package/.claude/skills/build-and-fix/examples/javascript-lint-fix.md +37 -0
- package/.claude/skills/build-and-fix/language-configs/javascript.yaml +139 -0
- package/.claude/skills/build-and-fix/references/config-schema.md +120 -0
- package/.claude/skills/build-and-fix/references/error-patterns.md +273 -0
- package/.claude/skills/code-investigator/SKILL.md +299 -0
- package/.claude/skills/code-investigator/references/investigation-workflows.md +542 -0
- package/.claude/skills/code-investigator/references/language-specific.md +761 -0
- package/.claude/skills/code-investigator/references/search-patterns.md +258 -0
- package/.claude/skills/code-investigator/references/serena-patterns.md +328 -0
- package/.claude/skills/stack-detector/SKILL.md +153 -0
- package/.claude/skills/verification-before-completion/SKILL.md +143 -0
- package/.claude/templates/claude-md-template.md +56 -0
- package/.claude/templates/stacks/express-node.md +134 -0
- package/.claude/templates/stacks/fastapi.md +152 -0
- package/.claude/templates/stacks/generic.md +101 -0
- package/.claude/templates/stacks/nextjs-prisma.md +235 -0
- package/README.md +499 -0
- package/bin/claude-dev-kit.js +11 -0
- package/package.json +31 -0
- package/scripts/install.sh +448 -0
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Claude Dev Kit — Installer v2.1
|
|
3
|
+
#
|
|
4
|
+
# Copies .claude/ into your project, installs hook deps,
|
|
5
|
+
# then runs an MCP wizard to configure Claude's integrations
|
|
6
|
+
# (Git platform, ticket system, design tools, code search).
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# bash install.sh [target-directory]
|
|
10
|
+
# TARGET=/path/to/project bash install.sh
|
|
11
|
+
# bash install.sh --mcp-only (skip file copy, just configure MCPs)
|
|
12
|
+
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
# ─── Colors ───────────────────────────────────────────────────────────────────
|
|
16
|
+
BOLD='\033[1m'
|
|
17
|
+
DIM='\033[2m'
|
|
18
|
+
GREEN='\033[0;32m'
|
|
19
|
+
YELLOW='\033[1;33m'
|
|
20
|
+
CYAN='\033[0;36m'
|
|
21
|
+
RED='\033[0;31m'
|
|
22
|
+
NC='\033[0m'
|
|
23
|
+
|
|
24
|
+
# ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
25
|
+
info() { echo -e "${CYAN} →${NC} $*"; }
|
|
26
|
+
success() { echo -e "${GREEN} ✓${NC} $*"; }
|
|
27
|
+
warn() { echo -e "${YELLOW} ⚠${NC} $*"; }
|
|
28
|
+
error() { echo -e "${RED} ✗${NC} $*" >&2; }
|
|
29
|
+
header() { echo -e "\n${BOLD}$*${NC}"; }
|
|
30
|
+
dim() { echo -e "${DIM}$*${NC}"; }
|
|
31
|
+
|
|
32
|
+
ask() {
|
|
33
|
+
# ask <variable-name> <prompt> [default]
|
|
34
|
+
local var="$1" prompt="$2" default="${3:-}"
|
|
35
|
+
local hint=""
|
|
36
|
+
[[ -n "$default" ]] && hint=" ${DIM}[${default}]${NC}"
|
|
37
|
+
echo -ne " ${prompt}${hint}: "
|
|
38
|
+
read -r "$var" </dev/tty
|
|
39
|
+
if [[ -z "${!var}" && -n "$default" ]]; then
|
|
40
|
+
eval "$var='$default'"
|
|
41
|
+
fi
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ask_yn() {
|
|
45
|
+
# ask_yn <prompt> — returns 0 for yes, 1 for no
|
|
46
|
+
echo -ne " $1 ${DIM}[y/N]${NC}: "
|
|
47
|
+
read -r _yn </dev/tty
|
|
48
|
+
[[ "$_yn" =~ ^[Yy]$ ]]
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
menu() {
|
|
52
|
+
# menu <variable-name> <prompt> <option1> <option2> ...
|
|
53
|
+
local var="$1" prompt="$2"
|
|
54
|
+
shift 2
|
|
55
|
+
local options=("$@")
|
|
56
|
+
echo -e " ${BOLD}${prompt}${NC}"
|
|
57
|
+
for i in "${!options[@]}"; do
|
|
58
|
+
echo -e " $((i+1))) ${options[$i]}"
|
|
59
|
+
done
|
|
60
|
+
echo -ne " Choice [1-${#options[@]}]: "
|
|
61
|
+
read -r _choice </dev/tty
|
|
62
|
+
local idx=$(( _choice - 1 ))
|
|
63
|
+
if [[ $idx -ge 0 && $idx -lt ${#options[@]} ]]; then
|
|
64
|
+
eval "$var='${options[$idx]}'"
|
|
65
|
+
else
|
|
66
|
+
eval "$var='${options[0]}'"
|
|
67
|
+
fi
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
multi_menu() {
|
|
71
|
+
# multi_menu <array-variable-name> <prompt> <option1> <option2> ...
|
|
72
|
+
local var="$1" prompt="$2"
|
|
73
|
+
shift 2
|
|
74
|
+
local options=("$@")
|
|
75
|
+
echo -e " ${BOLD}${prompt}${NC}"
|
|
76
|
+
echo -e " ${DIM}Enter numbers separated by spaces (e.g. 1 3)${NC}"
|
|
77
|
+
for i in "${!options[@]}"; do
|
|
78
|
+
echo -e " $((i+1))) ${options[$i]}"
|
|
79
|
+
done
|
|
80
|
+
echo -ne " Choices: "
|
|
81
|
+
read -r _choices </dev/tty
|
|
82
|
+
local -a selected=()
|
|
83
|
+
for n in $_choices; do
|
|
84
|
+
local idx=$(( n - 1 ))
|
|
85
|
+
[[ $idx -ge 0 && $idx -lt ${#options[@]} ]] && selected+=("${options[$idx]}")
|
|
86
|
+
done
|
|
87
|
+
eval "$var=(\"\${selected[@]}\")"
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# Run a claude mcp add command, logging output, warn on failure
|
|
91
|
+
mcp_add() {
|
|
92
|
+
local name="$1"; shift
|
|
93
|
+
local log="$LOG_FILE"
|
|
94
|
+
if claude mcp add "$@" >> "$log" 2>&1; then
|
|
95
|
+
success "$name MCP installed"
|
|
96
|
+
else
|
|
97
|
+
warn "$name MCP install failed — see $log for details"
|
|
98
|
+
fi
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
# ─── Main ─────────────────────────────────────────────────────────────────────
|
|
102
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
103
|
+
KIT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
104
|
+
TARGET="${1:-${TARGET:-$(pwd)}}"
|
|
105
|
+
MCP_ONLY=false
|
|
106
|
+
|
|
107
|
+
[[ "${1:-}" == "--mcp-only" ]] && MCP_ONLY=true && TARGET="${TARGET:-$(pwd)}"
|
|
108
|
+
|
|
109
|
+
# Install log — all subprocess output goes here instead of being suppressed
|
|
110
|
+
LOG_FILE="$TARGET/.claude/install.log"
|
|
111
|
+
|
|
112
|
+
echo ""
|
|
113
|
+
echo -e "${BOLD}╔═══════════════════════════════════════╗${NC}"
|
|
114
|
+
echo -e "${BOLD}║ Claude Dev Kit — Installer ║${NC}"
|
|
115
|
+
echo -e "${BOLD}╚═══════════════════════════════════════╝${NC}"
|
|
116
|
+
echo ""
|
|
117
|
+
|
|
118
|
+
# ─── Phase 1: File Installation ───────────────────────────────────────────────
|
|
119
|
+
if [[ "$MCP_ONLY" == "false" ]]; then
|
|
120
|
+
header "Phase 1: Install .claude/ into your project"
|
|
121
|
+
echo -e " ${DIM}Source: $KIT_ROOT${NC}"
|
|
122
|
+
echo -e " ${DIM}Target: $TARGET${NC}"
|
|
123
|
+
echo ""
|
|
124
|
+
|
|
125
|
+
if [[ "${CI:-}" != "true" ]]; then
|
|
126
|
+
ask_yn "Install .claude/ into $TARGET?" || { echo "Aborted."; exit 0; }
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
# Backup existing .claude
|
|
130
|
+
if [[ -d "$TARGET/.claude" ]]; then
|
|
131
|
+
BACKUP="$TARGET/.claude.bak.$(date +%Y%m%d_%H%M%S)"
|
|
132
|
+
warn "Existing .claude/ found — backing up to $(basename "$BACKUP")"
|
|
133
|
+
mv "$TARGET/.claude" "$BACKUP"
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
# Copy files
|
|
137
|
+
info "Copying .claude/ ..."
|
|
138
|
+
if command -v rsync &>/dev/null; then
|
|
139
|
+
rsync -a --exclude='node_modules' --exclude='*.jsonl' \
|
|
140
|
+
"$KIT_ROOT/.claude/" "$TARGET/.claude/"
|
|
141
|
+
else
|
|
142
|
+
cp -r "$KIT_ROOT/.claude" "$TARGET/.claude"
|
|
143
|
+
rm -rf "$TARGET/.claude/hooks/skill-activation-prompt/node_modules"
|
|
144
|
+
fi
|
|
145
|
+
success ".claude/ installed"
|
|
146
|
+
|
|
147
|
+
# Ensure log directory exists now that .claude/ is present
|
|
148
|
+
mkdir -p "$TARGET/.claude"
|
|
149
|
+
: > "$LOG_FILE" # create/truncate log
|
|
150
|
+
|
|
151
|
+
# ── Inject .gitignore entries into target project ────────────────────────────
|
|
152
|
+
TARGET_GITIGNORE="$TARGET/.gitignore"
|
|
153
|
+
GITIGNORE_MARKER="# Claude Dev Kit — managed entries"
|
|
154
|
+
if [[ -f "$TARGET_GITIGNORE" ]] && grep -qF "$GITIGNORE_MARKER" "$TARGET_GITIGNORE" 2>/dev/null; then
|
|
155
|
+
info ".gitignore already contains CDK entries — skipping"
|
|
156
|
+
else
|
|
157
|
+
info "Adding .gitignore entries to protect secrets..."
|
|
158
|
+
cat >> "$TARGET_GITIGNORE" <<'EOF'
|
|
159
|
+
|
|
160
|
+
# Claude Dev Kit — managed entries
|
|
161
|
+
# settings.json may contain MCP API tokens written by install.sh — never commit it.
|
|
162
|
+
.claude/settings.json
|
|
163
|
+
# Audit log and install log contain local paths — no need to track.
|
|
164
|
+
.claude/audit.log
|
|
165
|
+
.claude/install.log
|
|
166
|
+
EOF
|
|
167
|
+
success ".gitignore updated (settings.json, audit.log, install.log excluded)"
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# Install hook dependencies
|
|
171
|
+
HOOK_DIR="$TARGET/.claude/hooks/skill-activation-prompt"
|
|
172
|
+
if [[ -f "$HOOK_DIR/package.json" ]]; then
|
|
173
|
+
info "Installing skill-activation-prompt hook dependencies..."
|
|
174
|
+
pushd "$HOOK_DIR" > /dev/null
|
|
175
|
+
if command -v bun &>/dev/null; then
|
|
176
|
+
if ! bun install --silent >> "$LOG_FILE" 2>&1; then
|
|
177
|
+
warn "bun install failed — see $LOG_FILE for details"
|
|
178
|
+
fi
|
|
179
|
+
elif command -v npm &>/dev/null; then
|
|
180
|
+
if ! npm install --silent >> "$LOG_FILE" 2>&1; then
|
|
181
|
+
warn "npm install failed — see $LOG_FILE for details"
|
|
182
|
+
fi
|
|
183
|
+
else
|
|
184
|
+
warn "Neither bun nor npm found. Run manually: cd $HOOK_DIR && npm install"
|
|
185
|
+
fi
|
|
186
|
+
popd > /dev/null
|
|
187
|
+
success "Hook dependencies installed"
|
|
188
|
+
fi
|
|
189
|
+
fi
|
|
190
|
+
|
|
191
|
+
# ─── Phase 2: MCP Wizard ──────────────────────────────────────────────────────
|
|
192
|
+
echo ""
|
|
193
|
+
header "Phase 2: Configure Claude MCP integrations"
|
|
194
|
+
echo -e " ${DIM}MCPs extend Claude with tools for your Git platform, ticket system, and design tools.${NC}"
|
|
195
|
+
echo ""
|
|
196
|
+
|
|
197
|
+
if ! command -v claude &>/dev/null; then
|
|
198
|
+
warn "Claude CLI not found — cannot configure MCPs."
|
|
199
|
+
info "Install the Claude CLI: https://claude.ai/code"
|
|
200
|
+
info "Then re-run: bash $0 --mcp-only"
|
|
201
|
+
echo ""
|
|
202
|
+
else
|
|
203
|
+
|
|
204
|
+
# ── Security preamble ────────────────────────────────────────────────────────
|
|
205
|
+
echo -e " ${YELLOW}${BOLD}Security note:${NC}"
|
|
206
|
+
echo -e " ${DIM}Tokens you enter will be stored in ${TARGET}/.claude/settings.json.${NC}"
|
|
207
|
+
echo -e " ${DIM}That file has been added to .gitignore — never commit it.${NC}"
|
|
208
|
+
echo -e " ${DIM}Prefer setting tokens as shell env vars instead:${NC}"
|
|
209
|
+
echo -e " ${DIM} export GITHUB_PERSONAL_ACCESS_TOKEN='ghp_...'${NC}"
|
|
210
|
+
echo -e " ${DIM} export LINEAR_API_KEY='lin_api_...'${NC}"
|
|
211
|
+
echo -e " ${DIM}Claude Code reads env vars automatically — no token in settings needed.${NC}"
|
|
212
|
+
echo ""
|
|
213
|
+
if ! ask_yn "Proceed with MCP token setup?"; then
|
|
214
|
+
info "Skipping MCP setup. Set env vars manually and re-run: bash $0 --mcp-only"
|
|
215
|
+
echo ""
|
|
216
|
+
else
|
|
217
|
+
|
|
218
|
+
# Ensure log exists for MCP-only runs
|
|
219
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
220
|
+
: >> "$LOG_FILE"
|
|
221
|
+
|
|
222
|
+
# ── 2a. Git Platform ────────────────────────────────────────────────────────
|
|
223
|
+
header "Git Platform"
|
|
224
|
+
menu GIT_PLATFORM "Which Git platform do you use?" \
|
|
225
|
+
"GitHub" \
|
|
226
|
+
"GitLab" \
|
|
227
|
+
"Bitbucket" \
|
|
228
|
+
"Azure DevOps" \
|
|
229
|
+
"None / Self-hosted"
|
|
230
|
+
|
|
231
|
+
case "$GIT_PLATFORM" in
|
|
232
|
+
"GitHub")
|
|
233
|
+
echo ""
|
|
234
|
+
info "Installing GitHub MCP..."
|
|
235
|
+
echo -e " ${DIM}Provides: issue/PR reading, repo search, file access via GitHub API${NC}"
|
|
236
|
+
echo -e " ${DIM}Or set GITHUB_PERSONAL_ACCESS_TOKEN as an env var to skip this prompt${NC}"
|
|
237
|
+
if [[ -n "${GITHUB_PERSONAL_ACCESS_TOKEN:-}" ]]; then
|
|
238
|
+
info "Using GITHUB_PERSONAL_ACCESS_TOKEN from environment"
|
|
239
|
+
GITHUB_TOKEN="$GITHUB_PERSONAL_ACCESS_TOKEN"
|
|
240
|
+
else
|
|
241
|
+
ask GITHUB_TOKEN "GitHub Personal Access Token (repo + read:org scopes)" ""
|
|
242
|
+
fi
|
|
243
|
+
if [[ -n "$GITHUB_TOKEN" ]]; then
|
|
244
|
+
mcp_add "GitHub" --scope project github \
|
|
245
|
+
npx -y @modelcontextprotocol/server-github \
|
|
246
|
+
--env GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_TOKEN"
|
|
247
|
+
else
|
|
248
|
+
warn "No token provided — skipping GitHub MCP (add later with: claude mcp add github)"
|
|
249
|
+
fi
|
|
250
|
+
;;
|
|
251
|
+
"GitLab")
|
|
252
|
+
echo ""
|
|
253
|
+
info "Installing GitLab MCP..."
|
|
254
|
+
if [[ -n "${GITLAB_PERSONAL_ACCESS_TOKEN:-}" ]]; then
|
|
255
|
+
info "Using GITLAB_PERSONAL_ACCESS_TOKEN from environment"
|
|
256
|
+
GITLAB_TOKEN="$GITLAB_PERSONAL_ACCESS_TOKEN"
|
|
257
|
+
else
|
|
258
|
+
ask GITLAB_TOKEN "GitLab Personal Access Token" ""
|
|
259
|
+
fi
|
|
260
|
+
ask GITLAB_URL "GitLab URL" "https://gitlab.com"
|
|
261
|
+
if [[ -n "$GITLAB_TOKEN" ]]; then
|
|
262
|
+
mcp_add "GitLab" --scope project gitlab \
|
|
263
|
+
npx -y @modelcontextprotocol/server-gitlab \
|
|
264
|
+
--env GITLAB_PERSONAL_ACCESS_TOKEN="$GITLAB_TOKEN" \
|
|
265
|
+
--env GITLAB_URL="$GITLAB_URL"
|
|
266
|
+
fi
|
|
267
|
+
;;
|
|
268
|
+
"None / Self-hosted")
|
|
269
|
+
info "Skipping Git platform MCP"
|
|
270
|
+
;;
|
|
271
|
+
*)
|
|
272
|
+
warn "No official MCP for $GIT_PLATFORM yet — check https://github.com/modelcontextprotocol/servers"
|
|
273
|
+
;;
|
|
274
|
+
esac
|
|
275
|
+
|
|
276
|
+
# ── 2b. Ticket / Project Management ─────────────────────────────────────────
|
|
277
|
+
echo ""
|
|
278
|
+
header "Ticket / Project Management"
|
|
279
|
+
menu TICKET_SYSTEM "Which ticket system do you use?" \
|
|
280
|
+
"GitHub Issues (uses GitHub MCP above)" \
|
|
281
|
+
"Linear" \
|
|
282
|
+
"Jira" \
|
|
283
|
+
"Notion" \
|
|
284
|
+
"Trello" \
|
|
285
|
+
"None"
|
|
286
|
+
|
|
287
|
+
case "$TICKET_SYSTEM" in
|
|
288
|
+
"Linear")
|
|
289
|
+
echo ""
|
|
290
|
+
info "Installing Linear MCP..."
|
|
291
|
+
echo -e " ${DIM}Provides: issue reading, project management, cycle tracking${NC}"
|
|
292
|
+
if [[ -n "${LINEAR_API_KEY:-}" ]]; then
|
|
293
|
+
info "Using LINEAR_API_KEY from environment"
|
|
294
|
+
LINEAR_KEY="$LINEAR_API_KEY"
|
|
295
|
+
else
|
|
296
|
+
ask LINEAR_KEY "Linear API Key (from Linear Settings → API)" ""
|
|
297
|
+
fi
|
|
298
|
+
if [[ -n "$LINEAR_KEY" ]]; then
|
|
299
|
+
mcp_add "Linear" --scope project linear \
|
|
300
|
+
npx -y @linear/mcp-server \
|
|
301
|
+
--env LINEAR_API_KEY="$LINEAR_KEY"
|
|
302
|
+
fi
|
|
303
|
+
;;
|
|
304
|
+
"Jira")
|
|
305
|
+
echo ""
|
|
306
|
+
info "Installing Jira MCP..."
|
|
307
|
+
ask JIRA_URL "Jira URL (e.g. https://yourorg.atlassian.net)" ""
|
|
308
|
+
ask JIRA_EMAIL "Jira account email" ""
|
|
309
|
+
if [[ -n "${JIRA_API_TOKEN:-}" ]]; then
|
|
310
|
+
info "Using JIRA_API_TOKEN from environment"
|
|
311
|
+
JIRA_TOKEN="$JIRA_API_TOKEN"
|
|
312
|
+
else
|
|
313
|
+
ask JIRA_TOKEN "Jira API Token (from id.atlassian.com/manage-profile/security/api-tokens)" ""
|
|
314
|
+
fi
|
|
315
|
+
if [[ -n "$JIRA_TOKEN" ]]; then
|
|
316
|
+
mcp_add "Jira" --scope project jira \
|
|
317
|
+
npx -y @modelcontextprotocol/server-jira \
|
|
318
|
+
--env JIRA_URL="$JIRA_URL" \
|
|
319
|
+
--env JIRA_EMAIL="$JIRA_EMAIL" \
|
|
320
|
+
--env JIRA_TOKEN="$JIRA_TOKEN"
|
|
321
|
+
fi
|
|
322
|
+
;;
|
|
323
|
+
"Notion")
|
|
324
|
+
echo ""
|
|
325
|
+
info "Installing Notion MCP..."
|
|
326
|
+
if [[ -n "${NOTION_API_KEY:-}" ]]; then
|
|
327
|
+
info "Using NOTION_API_KEY from environment"
|
|
328
|
+
NOTION_TOKEN="$NOTION_API_KEY"
|
|
329
|
+
else
|
|
330
|
+
ask NOTION_TOKEN "Notion Integration Token (from notion.so/my-integrations)" ""
|
|
331
|
+
fi
|
|
332
|
+
if [[ -n "$NOTION_TOKEN" ]]; then
|
|
333
|
+
mcp_add "Notion" --scope project notion \
|
|
334
|
+
npx -y @modelcontextprotocol/server-notion \
|
|
335
|
+
--env NOTION_API_KEY="$NOTION_TOKEN"
|
|
336
|
+
fi
|
|
337
|
+
;;
|
|
338
|
+
"None" | "GitHub Issues"*)
|
|
339
|
+
info "Skipping ticket system MCP"
|
|
340
|
+
;;
|
|
341
|
+
*)
|
|
342
|
+
warn "No official MCP for $TICKET_SYSTEM yet"
|
|
343
|
+
;;
|
|
344
|
+
esac
|
|
345
|
+
|
|
346
|
+
# ── 2c. Design Tools ─────────────────────────────────────────────────────────
|
|
347
|
+
echo ""
|
|
348
|
+
header "Design Tools"
|
|
349
|
+
multi_menu DESIGN_TOOLS "Which design tools do you use? (select all that apply)" \
|
|
350
|
+
"Figma" \
|
|
351
|
+
"Storybook (component library)" \
|
|
352
|
+
"None"
|
|
353
|
+
|
|
354
|
+
for tool in "${DESIGN_TOOLS[@]}"; do
|
|
355
|
+
case "$tool" in
|
|
356
|
+
"Figma")
|
|
357
|
+
echo ""
|
|
358
|
+
info "Installing Figma MCP..."
|
|
359
|
+
echo -e " ${DIM}Provides: read Figma files, inspect components, extract design tokens${NC}"
|
|
360
|
+
if [[ -n "${FIGMA_API_KEY:-}" ]]; then
|
|
361
|
+
info "Using FIGMA_API_KEY from environment"
|
|
362
|
+
FIGMA_TOKEN="$FIGMA_API_KEY"
|
|
363
|
+
else
|
|
364
|
+
ask FIGMA_TOKEN "Figma Personal Access Token (from figma.com/developers/apps)" ""
|
|
365
|
+
fi
|
|
366
|
+
if [[ -n "$FIGMA_TOKEN" ]]; then
|
|
367
|
+
mcp_add "Figma" --scope project figma \
|
|
368
|
+
npx -y figma-developer-mcp \
|
|
369
|
+
--env FIGMA_API_KEY="$FIGMA_TOKEN"
|
|
370
|
+
fi
|
|
371
|
+
;;
|
|
372
|
+
"Storybook"*)
|
|
373
|
+
info "Storybook: run 'storybook dev' and Claude can access it via browser tools"
|
|
374
|
+
;;
|
|
375
|
+
esac
|
|
376
|
+
done
|
|
377
|
+
|
|
378
|
+
# ── 2d. Always-On MCPs ────────────────────────────────────────────────────────
|
|
379
|
+
echo ""
|
|
380
|
+
header "Core MCPs (recommended for all projects)"
|
|
381
|
+
|
|
382
|
+
if ask_yn "Install Context7 MCP? (instant access to up-to-date library docs)"; then
|
|
383
|
+
mcp_add "Context7" --scope project context7 \
|
|
384
|
+
npx -y @upstash/context7-mcp
|
|
385
|
+
fi
|
|
386
|
+
|
|
387
|
+
if ask_yn "Install Sequential Thinking MCP? (improves multi-step reasoning)"; then
|
|
388
|
+
mcp_add "Sequential Thinking" --scope project sequential-thinking \
|
|
389
|
+
npx -y @modelcontextprotocol/server-sequential-thinking
|
|
390
|
+
fi
|
|
391
|
+
|
|
392
|
+
if ask_yn "Install Filesystem MCP? (direct file access without Claude Code file tools)"; then
|
|
393
|
+
mcp_add "Filesystem" --scope project filesystem \
|
|
394
|
+
npx -y @modelcontextprotocol/server-filesystem "$TARGET"
|
|
395
|
+
success "Filesystem MCP scoped to $TARGET"
|
|
396
|
+
fi
|
|
397
|
+
|
|
398
|
+
# ── 2e. Serena (code navigation) ─────────────────────────────────────────────
|
|
399
|
+
echo ""
|
|
400
|
+
if command -v uvx &>/dev/null || command -v uv &>/dev/null; then
|
|
401
|
+
if ask_yn "Install Serena MCP? (semantic code navigation — highly recommended for large codebases)"; then
|
|
402
|
+
mcp_add "Serena" --scope project serena \
|
|
403
|
+
uvx --from "serena[claude-code]" serena
|
|
404
|
+
fi
|
|
405
|
+
else
|
|
406
|
+
dim " Serena MCP skipped — requires Python/uv (install uv from https://astral.sh/uv)"
|
|
407
|
+
fi
|
|
408
|
+
|
|
409
|
+
fi # end "proceed with MCP token setup" block
|
|
410
|
+
fi # end claude CLI check
|
|
411
|
+
|
|
412
|
+
# ─── Phase 3: Summary ─────────────────────────────────────────────────────────
|
|
413
|
+
echo ""
|
|
414
|
+
header "Installation Complete 🎉"
|
|
415
|
+
echo ""
|
|
416
|
+
|
|
417
|
+
if [[ "$MCP_ONLY" == "false" ]]; then
|
|
418
|
+
echo -e " ${GREEN}✓${NC} .claude/ installed at $TARGET/.claude"
|
|
419
|
+
echo -e " ${GREEN}✓${NC} Hook dependencies installed"
|
|
420
|
+
echo -e " ${GREEN}✓${NC} .gitignore updated (settings.json excluded)"
|
|
421
|
+
fi
|
|
422
|
+
|
|
423
|
+
echo ""
|
|
424
|
+
echo -e " ${BOLD}Security reminder:${NC}"
|
|
425
|
+
echo -e " ${DIM}.claude/settings.json is in .gitignore — never force-add it.${NC}"
|
|
426
|
+
echo -e " ${DIM}Prefer env vars for tokens: export GITHUB_PERSONAL_ACCESS_TOKEN='...'${NC}"
|
|
427
|
+
echo ""
|
|
428
|
+
echo -e " ${BOLD}Next steps:${NC}"
|
|
429
|
+
echo ""
|
|
430
|
+
echo -e " 1. ${CYAN}cd $TARGET${NC}"
|
|
431
|
+
echo ""
|
|
432
|
+
echo -e " 2. ${CYAN}Update CLAUDE.md${NC} with your project's stack and conventions."
|
|
433
|
+
echo -e " ${DIM}(Or run /init in Claude Code to auto-generate it)${NC}"
|
|
434
|
+
echo ""
|
|
435
|
+
echo -e " 3. ${CYAN}Add tool permissions${NC} to .claude/settings.json for your build commands:"
|
|
436
|
+
echo -e ' ${DIM}e.g. "Bash(npm run:*)", "Bash(pytest:*)", "Bash(cargo:*)"${NC}'
|
|
437
|
+
echo ""
|
|
438
|
+
echo -e " 4. ${CYAN}Open Claude Code${NC} in your project and run:"
|
|
439
|
+
echo -e " ${BOLD}/init${NC} — auto-detect stack and configure agents"
|
|
440
|
+
echo -e " ${BOLD}/primer${NC} — prime Claude's project context"
|
|
441
|
+
echo -e " ${BOLD}/pm:groom${NC} — groom your GitHub/Linear issues"
|
|
442
|
+
echo -e " ${BOLD}/dev <issue>${NC} — implement your first feature autonomously"
|
|
443
|
+
echo ""
|
|
444
|
+
if [[ -s "$LOG_FILE" ]]; then
|
|
445
|
+
echo -e " ${DIM}Install log: $LOG_FILE${NC}"
|
|
446
|
+
fi
|
|
447
|
+
echo -e " ${DIM}Docs: https://github.com/$(git -C "$KIT_ROOT" config --get remote.origin.url 2>/dev/null | sed 's/.*github.com[:/]//' | sed 's/.git//')${NC}"
|
|
448
|
+
echo ""
|