-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·94 lines (80 loc) · 2.88 KB
/
bootstrap.sh
File metadata and controls
executable file
·94 lines (80 loc) · 2.88 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
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io
# https://kvz.io/blog/bash-best-practices.html
set -o errexit
set -o pipefail
# set -o nounset
# set -o xtrace
# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Install Homebrew if not already installed
if ! command -v brew >/dev/null 2>&1; then
NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
if command -v /opt/homebrew/bin/brew >/dev/null 2>&1; then
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}"
elif command -v /home/linuxbrew/.linuxbrew/bin/brew >/dev/null 2>&1; then
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}"
fi
eval "$(brew shellenv)"
brew update
# Install packages that may pull in util-linux first
brew install gcc git
# Unlink util-linux on Linux (conflicts with bash-completion)
if [[ "$(uname)" == "Linux" ]]; then
brew unlink util-linux 2>/dev/null || true
fi
# Install remaining packages (including bash-completion which conflicts with util-linux)
brew install \
anomalyco/tap/opencode \
bash \
bash-completion \
frpc \
frps \
fzf \
gh \
glab \
lazygit \
libnotify \
luarocks \
neovim \
node \
oven-sh/bun/bun \
ripgrep \
screen \
starship \
tmux \
unzip \
vim
# Setup homeshick (clone only if missing)
if [[ ! -d "$HOME/.homesick/repos/homeshick" ]]; then
git clone https://github.com/andsens/homeshick.git "$HOME/.homesick/repos/homeshick"
else
git -C "$HOME/.homesick/repos/homeshick" pull
fi
# Link dotfiles via homeshick (symlink if missing or different target)
if [[ ! -L "$HOME/.homesick/repos/dotfiles" ]] || [[ "$(readlink "$HOME/.homesick/repos/dotfiles")" != "$__dir" ]]; then
rm -rf "$HOME/.homesick/repos/dotfiles"
ln -sf "$__dir" "$HOME/.homesick/repos/dotfiles"
fi
"$HOME/.homesick/repos/homeshick/bin/homeshick" link dotfiles --force
# Setup directories
mkdir -p "$HOME/.ssh"
# Clone/update nvim config
if [[ ! -d "$HOME/.config/nvim" ]]; then
git clone https://github.com/rodrigorm/nvim.git "$HOME/.config/nvim"
else
git -C "$HOME/.config/nvim" pull origin main
fi
# Agent Browser
bun install -g agent-browser
# Fix permissions for the installed binary
chmod +x "$HOME/.bun/install/global/node_modules/agent-browser/bin/"* 2>/dev/null || true
bun install -g @fission-ai/openspec@latest
# Skills.sh
rm -rf "$HOME/.agents/skills/*"
bunx skills add brianlovin/claude-config --skill simplify --agent opencode --global -y
bunx skills add softaworks/agent-toolkit --skill writing-clearly-and-concisely --agent opencode --global -y
bunx skills add vercel-labs/agent-browser --skill agent-browser --global -y
bunx skills add vercel-labs/skills --skill find-skills --agent opencode --global -y
bunx skills add mattpocock/skills --agent opencode --global -y