Repository navigation
Expand file tree
/
Copy pathsetup.sh
More file actions
44 lines (37 loc) · 1.58 KB
/
Copy pathsetup.sh
File metadata and controls
44 lines (37 loc) · 1.58 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
#!/usr/bin/env bash
# setup.sh — Deploy starter Claude Code configuration to a project
#
# Usage: ./setup.sh [target-directory]
# target-directory: Path to the project to configure (default: current directory)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TARGET="${1:-.}"
TARGET="$(cd "$TARGET" 2>/dev/null && pwd)" || { echo "Error: Directory '$1' does not exist."; exit 1; }
echo "=== Claude Code Bootstrap — Starter Setup ==="
echo "Target: $TARGET"
echo ""
# Create .claude directory
mkdir -p "$TARGET/.claude"
# Copy CLAUDE.md template (don't overwrite existing)
if [ -f "$TARGET/CLAUDE.md" ]; then
echo "SKIP CLAUDE.md (already exists)"
echo " To overwrite, remove it first and re-run this script."
else
cp "$SCRIPT_DIR/CLAUDE.md.template" "$TARGET/CLAUDE.md"
echo "ADDED CLAUDE.md — edit the [BRACKETED] placeholders with your project details"
fi
# Copy settings (don't overwrite existing)
if [ -f "$TARGET/.claude/settings.local.json" ]; then
echo "SKIP .claude/settings.local.json (already exists)"
else
cp "$SCRIPT_DIR/.claude/settings.local.json" "$TARGET/.claude/settings.local.json"
echo "ADDED .claude/settings.local.json — adjust allow/deny lists for your toolchain"
fi
echo ""
echo "=== Setup Complete ==="
echo ""
echo "Next steps:"
echo " 1. Edit CLAUDE.md — replace [BRACKETED] placeholders with your project details"
echo " 2. Edit .claude/settings.local.json — adjust permissions for your toolchain"
echo " 3. Start Claude Code: claude"
echo " 4. Try: 'Read CLAUDE.md and confirm you understand the project.'"