-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.conf.yaml
More file actions
366 lines (324 loc) · 15.1 KB
/
install.conf.yaml
File metadata and controls
366 lines (324 loc) · 15.1 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# =============================================================================
# Dotbot Configuration - Dotfiles Installation
# =============================================================================
# Usage: ./install
# Dotbot docs: https://github.com/anishathalye/dotbot
#
# Structure:
# Phase 1 — Local operations (no network required, always succeeds)
# Phase 2 — Network-dependent operations (with timeouts, non-blocking)
# =============================================================================
# ===========================================================================
# Phase 1: Local Operations (no network required)
# ===========================================================================
# ---------------------------------------------------------------------------
# Defaults
# ---------------------------------------------------------------------------
- defaults:
link:
create: true
relink: true
# ---------------------------------------------------------------------------
# Clean broken symlinks
# ---------------------------------------------------------------------------
- clean: ["~"]
# ---------------------------------------------------------------------------
# Create directories
# ---------------------------------------------------------------------------
- create:
- ~/.vim/undo-history
- ~/.wastebasket
- ~/.config/karabiner
- ~/.codex
- ~/.gemini
# ---------------------------------------------------------------------------
# Git submodules (local if already initialized)
# ---------------------------------------------------------------------------
- shell:
- [git submodule update --init --recursive, Installing submodules]
# ---------------------------------------------------------------------------
# Platform-specific directory setup
# ---------------------------------------------------------------------------
- shell:
- [
test "$(uname)" = "Darwin" && mkdir -p ~/Library/Application\ Support/Cursor/User || true,
Creating Cursor config directory on macOS,
]
- [
test "$(uname)" = "Darwin" && mkdir -p ~/.config/iterm2 || true,
Creating iTerm2 config directory,
]
- [
mkdir -p ~/.config/ghostty || true,
Creating Ghostty config directory,
]
# ---------------------------------------------------------------------------
# Backup existing configs before symlinking
# ---------------------------------------------------------------------------
- shell:
- [
"test -f ~/.bashrc && ! test -L ~/.bashrc && ! test -f ~/.bashrc_bk && mv ~/.bashrc ~/.bashrc_bk && echo 'Moved existing ~/.bashrc to ~/.bashrc_bk' || true",
Backing up existing ~/.bashrc to ~/.bashrc_bk,
]
- [
"test -f ~/.zshrc && ! test -L ~/.zshrc && ! test -f ~/.zshrc_bk && mv ~/.zshrc ~/.zshrc_bk && echo 'Moved existing ~/.zshrc to ~/.zshrc_bk' || true",
Backing up existing ~/.zshrc to ~/.zshrc_bk,
]
# ---------------------------------------------------------------------------
# Symlinks
# ---------------------------------------------------------------------------
- link:
# ---- Shell ----
~/.zshrc: oh-my-zsh/zshrc
~/.bashrc: bash/bashrc
~/.common_shell_setup.sh: common_shell_setup.sh
# ---- Git ----
~/.gitconfig: git/gitconfig
# ---- Terminal multiplexer ----
~/.tmux.conf: tmux.conf
# ---- Editors ----
~/.vimrc: vim/vimrc/vimrc
~/.vim_runtime: vim/vimrc
~/.ideavimrc: ideavimrc
~/.config/nvim: neovim/nvim-basic-ide
# ---- File manager ----
~/.config/ranger: ranger
~/.config/joshuto: joshuto
~/.config/yazi: yazi
# ---- CLI tools ----
~/.config/lsd: lsd
~/.config/starship.toml: starship/starship.toml
~/.config/bat/config: bat/config
# ---- Fish shell ----
~/.config/fish: fish
# ---- Debugger ----
~/.gdb: gdb
~/.gdbinit: gdb/gdbinit
# ---- Package managers (with CN mirrors) ----
~/.condarc: condarc
~/.mambarc: mambarc
~/.npmrc: npmrc
~/.config/pip/pip.conf: pip.conf
~/.cargo/config.toml: cargo/config.toml
# ---- Language config ----
~/.Rprofile: Rprofile
# ---- macOS window management ----
~/.yabairc: yabairc
~/.skhdrc: skhdrc
~/.skhd: skhd
~/.config/karabiner/karabiner.json: karabiner/karabiner.json
~/.config/karabiner/assets: karabiner/assets
# ---- IDE / Editor config ----
~/.vscoderc: vscode/vscoderc
~/Library/Application Support/Cursor/User/keybindings.json: cursor_config/keybindings.json
~/Library/Application Support/Cursor/User/settings.json: cursor_config/settings.json
~/Library/Application Support/Antigravity/User/keybindings.json: antigravity_config/keybindings.json
~/Library/Application Support/Antigravity/User/settings.json: antigravity_config/settings.json
# ---- AI tools ----
~/.claude/settings.json: claude/settings.json
~/.claude/config.json: claude/config.json
~/.claude/skills: claude/skills
~/.claude/agents: claude/agents
~/.claude/commands: claude/commands
~/.claude/hooks: claude/hooks
~/.claude/rules: claude/rules
~/.claude/scripts: claude/scripts
~/.codex/config.json: codex/config.json
~/.codex/settings.json: codex/settings.json
~/.codex/codex_env.sh: codex/codex_env.sh
~/.codex/skills: claude/skills
~/.gemini/settings.json: gemini/settings.json
~/.gemini/skills: claude/skills
~/.chatgpt.sh: chatgpt
~/.config/opencode/opencode.json: opencode/opencode.json
~/.config/opencode/package.json: opencode/package.json
~/.local/bin/yolo: scripts/yolo-generic.sh
# ---- Cursor skills ----
~/.cursor/skills: claude/skills
# ---- iTerm2 ----
~/.config/iterm2/com.googlecode.iterm2.plist: iterm2/com.googlecode.iterm2.plist
# ---- Ghostty ----
~/.config/ghostty/config: ghostty/config
# ---------------------------------------------------------------------------
# Sync vim plugins to local disk for faster startup on network filesystems
# ---------------------------------------------------------------------------
- create:
- ~/.vim_plugins
- shell:
- [
"rsync -a --delete vim/vimrc/sources_non_forked/ ~/.vim_plugins/sources_non_forked/ && rsync -a --delete vim/vimrc/sources_forked/ ~/.vim_plugins/sources_forked/",
Syncing vim plugins to local disk,
]
# ---------------------------------------------------------------------------
# Local post-link setup
# ---------------------------------------------------------------------------
- shell:
- [
chmod +x ~/.claude/hooks/check-expert-update.sh 2>/dev/null || true,
Setting execute permission for Claude hooks,
]
- [
chmod +x ~/.claude/hooks/rtk-rewrite.sh 2>/dev/null || true,
Setting execute permission for RTK hook,
]
# ===========================================================================
# Phase 2: Network-Dependent Operations
# ===========================================================================
# All commands below use --connect-timeout / || true to avoid blocking
# when network is unavailable.
# ---------------------------------------------------------------------------
# Platform-specific packages
# ---------------------------------------------------------------------------
- shell:
- [bash install-scripts/linux/install-packages.sh || true, Installing Linux system packages (apt/conda/mamba)]
- [bash install-scripts/mac/install-brew.sh || true, Installing Homebrew on macOS]
- [bash install-scripts/mac/install-packages.sh || true, Installing macOS packages with Homebrew]
# ---------------------------------------------------------------------------
# oh-my-zsh
# ---------------------------------------------------------------------------
- shell:
- [
"test ! -d ~/.oh-my-zsh && sh -c \"$(curl --connect-timeout 10 -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\" || true",
Installing oh-my-zsh,
]
# ---------------------------------------------------------------------------
# oh-my-zsh plugins
# ---------------------------------------------------------------------------
- git:
"~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting":
url: "https://github.com/zsh-users/zsh-syntax-highlighting.git"
description: "zsh plugin: zsh-syntax-highlighting"
"~/.oh-my-zsh/custom/plugins/zsh-autosuggestions":
url: "https://github.com/zsh-users/zsh-autosuggestions"
description: "zsh plugin: zsh-autosuggestions"
"~/.oh-my-zsh/custom/plugins/zsh-wakatime":
url: "https://github.com/wbinglee/zsh-wakatime.git"
description: "zsh plugin: zsh-wakatime"
"~/.oh-my-zsh/custom/plugins/autojump":
url: "https://github.com/wting/autojump.git"
description: "zsh plugin: autojump"
"~/.oh-my-zsh/custom/plugins/zsh-vi-mode":
url: "https://github.com/jeffreytse/zsh-vi-mode.git"
description: "zsh plugin: zsh-vi-mode"
- shell:
- [
"test -d ~/.oh-my-zsh/custom/plugins/autojump && cd ~/.oh-my-zsh/custom/plugins/autojump && ./install.py || true",
Installing autojump,
]
# ---------------------------------------------------------------------------
# fzf
# ---------------------------------------------------------------------------
- git:
"~/.fzf":
url: "https://github.com/junegunn/fzf.git"
description: "fzf - fuzzy finder"
- shell:
- [test -d ~/.fzf && ~/.fzf/install --all || true, Installing fzf]
# ---------------------------------------------------------------------------
# Fish shell plugins (Fisher)
# ---------------------------------------------------------------------------
- shell:
- [
"command -v fish >/dev/null && fish -c 'curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher' || true",
Installing Fisher plugin manager for fish,
]
- [
"command -v fish >/dev/null && test -f ~/.config/fish/fish_plugins && fish -c 'fisher update' || true",
Installing fish plugins via Fisher,
]
# ---------------------------------------------------------------------------
# Node.js (prerequisite for AI coding tools)
# ---------------------------------------------------------------------------
- shell:
- [
"(export NVM_DIR=\"$HOME/.nvm\" && (test -d \"$NVM_DIR\" || curl --connect-timeout 10 -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash) && . \"$NVM_DIR/nvm.sh\" && nvm install --lts) || true",
Installing nvm and Node.js LTS,
]
# ---------------------------------------------------------------------------
# GitHub CLI
# ---------------------------------------------------------------------------
- shell:
- [bash install-scripts/linux/install-gh.sh || true, Installing GitHub CLI on Linux]
- [bash install-scripts/mac/install-gh.sh || true, Installing GitHub CLI on macOS]
# ---------------------------------------------------------------------------
# AI Coding Tools
# ---------------------------------------------------------------------------
# Note: Claude Code now uses npm (was official install script)
# Manual install references:
# Claude Code: npm install -g @anthropic-ai/claude-code
# OpenAI Codex: npm install -g @openai/codex
# Gemini CLI: npm install -g @google/gemini-cli
# Opencode: curl -fsSL https://opencode.ai/install | bash
- shell:
- [
"export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; command -v claude >/dev/null || npm install -g @anthropic-ai/claude-code || true",
Installing Claude Code CLI via npm,
]
- [
"export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; command -v codex >/dev/null || npm install -g @openai/codex || true",
Installing OpenAI Codex CLI,
]
- [
"export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; command -v gemini >/dev/null || npm install -g @google/gemini-cli || true",
Installing Google Gemini CLI,
]
- [
"command -v opencode >/dev/null || curl --connect-timeout 10 -fsSL https://opencode.ai/install | bash || true",
Installing Opencode CLI,
]
# ---------------------------------------------------------------------------
# WeChat Reminder
# ---------------------------------------------------------------------------
- shell:
- [
"echo y | bash <(curl --connect-timeout 10 -s https://gitee.com/magic3007/wechat-reminder/raw/master/install-gitee.sh) || true",
Installing wechat-reminder,
]
- [
"test -d $HOME/.wechat-reminder && cp wechat-reminder/wechat-reminder $HOME/.wechat-reminder/wechat-reminder && cp wechat-reminder/wechat-reminder_main.py $HOME/.wechat-reminder/wechat-reminder_main.py && chmod +x $HOME/.wechat-reminder/wechat-reminder $HOME/.wechat-reminder/wechat-reminder_main.py || true",
Patching wechat-reminder with venv and Feishu card support,
]
- [
"test -d $HOME/.wechat-reminder && python3 -m venv $HOME/.wechat-reminder/.venv && $HOME/.wechat-reminder/.venv/bin/pip install -q -r $HOME/.wechat-reminder/requirements.txt || true",
Setting up wechat-reminder venv,
]
# ---------------------------------------------------------------------------
# uv - Python package manager
# ---------------------------------------------------------------------------
- shell:
- [
"command -v uv >/dev/null || curl --connect-timeout 30 -LsSf https://astral.sh/uv/install.sh | sh || true",
Installing uv Python package manager,
]
- [
"command -v uv >/dev/null && uv python install 3.12 3.11 3.10 || true",
Installing Python versions via uv,
]
- [
"command -v uv >/dev/null && uv venv --python 3.12 --prompt base --seed ~/.venv || true",
Creating global Python venv at ~/.venv with pip,
]
# ---------------------------------------------------------------------------
# iTerm2 configuration
# ---------------------------------------------------------------------------
- shell:
- [
test "$(uname)" = "Darwin" && defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/.config/iterm2" && defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true || true,
Configuring iTerm2 to load preferences from ~/.config/iterm2,
]
# ---------------------------------------------------------------------------
# CC Gateway - Claude Code reverse proxy
# ---------------------------------------------------------------------------
- shell:
- [
bash ~/.claude/cc-gateway/install.sh || true,
Installing CC Gateway for Claude Code,
]
# ---------------------------------------------------------------------------
# Offer to change default shell (last step)
# ---------------------------------------------------------------------------
- shell:
- [
bash install-scripts/change-default-shell.sh || true,
Offering to change default shell,
]