-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·66 lines (57 loc) · 2.15 KB
/
bootstrap.sh
File metadata and controls
executable file
·66 lines (57 loc) · 2.15 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
#!/bin/sh
DOTFILES="$HOME/dotfiles"
# Helper: create symlink unconditionally (force-replaces files and broken symlinks)
link() {
src="$DOTFILES/$1"
dst="$2"
mkdir -p "$(dirname "$dst")"
ln -nfs "$src" "$dst"
echo " $dst -> $src"
}
# Symlinks (run before Homebrew — safe over SSH without Homebrew)
echo "Linking dotfiles..."
link .zshrc "$HOME/.zshrc"
link .zshenv "$HOME/.zshenv"
link .gitconfig "$HOME/.gitconfig"
link .gitignore "$HOME/.gitignore"
link .wezterm.lua "$HOME/.wezterm.lua"
link .hammerspoon "$HOME/.hammerspoon"
link starship.toml "$HOME/.config/starship.toml"
link nvim "$HOME/.config/nvim"
link gh-dash "$HOME/.config/gh-dash"
link zed/keymap.json "$HOME/.config/zed/keymap.json"
link zed/settings.json "$HOME/.config/zed/settings.json"
link karabiner/karabiner.json "$HOME/.config/karabiner/karabiner.json"
link zellij/config.kdl "$HOME/.config/zellij/config.kdl"
link scripts/pbcopy "$HOME/.local/bin/pbcopy"
echo "Linking Claude Code settings..."
mkdir -p "$HOME/.claude"
link claude/settings.json "$HOME/.claude/settings.json"
link claude/CLAUDE.md "$HOME/.claude/CLAUDE.md"
link claude/agents "$HOME/.claude/agents"
link claude/commands "$HOME/.claude/commands"
link claude/skills "$HOME/.claude/skills"
# Git filters (dotfiles repo)
echo "Configuring git filters..."
git -C "$DOTFILES" config filter.strip-claude-local.clean "jq 'del(.model, .effortLevel)'"
git -C "$DOTFILES" config filter.strip-claude-local.smudge "cat"
# Install packages
if ! command -v brew >/dev/null 2>&1; then
echo "Homebrew not found, please install it first"
exit 1
fi
brew update
brew bundle --file="$DOTFILES/Brewfile"
brew cleanup
# Install pipx packages
if command -v pipx >/dev/null 2>&1; then
while read package; do
[ -n "$package" ] && pipx install "$package"
done < "$DOTFILES/requirements-pipx.txt"
fi
# Install gh extensions
if command -v gh >/dev/null 2>&1; then
while read ext; do
[ -n "$ext" ] && gh extension install "$ext" 2>/dev/null || true
done < "$DOTFILES/gh-extensions.txt"
fi