configs-all 1.0.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.
Files changed (227) hide show
  1. package/.claude/settings.local.json +3 -0
  2. package/CLAUDE.md +94 -0
  3. package/README.md +424 -0
  4. package/TERMINAL_SHORTCUTS.md +96 -0
  5. package/WINDOWS_COMPATIBILITY.md +85 -0
  6. package/WINDOWS_MCP_SETUP.md +133 -0
  7. package/apps/RectangleConfig.plist +0 -0
  8. package/apps/Synergy +84 -0
  9. package/apps/iStat Menus Settings.ismp7 +0 -0
  10. package/claude/CLAUDE.md +228 -0
  11. package/claude/commands/changelog.md +36 -0
  12. package/claude/commands/commit.md +29 -0
  13. package/claude/commands/context.md +112 -0
  14. package/claude/commands/dash.md +37 -0
  15. package/claude/commands/deploy-check.md +37 -0
  16. package/claude/commands/deps.md +26 -0
  17. package/claude/commands/duplo.md +56 -0
  18. package/claude/commands/explain.md +43 -0
  19. package/claude/commands/fix-and-test.md +46 -0
  20. package/claude/commands/game-debug.md +66 -0
  21. package/claude/commands/games.md +53 -0
  22. package/claude/commands/go.md +147 -0
  23. package/claude/commands/guard.md +102 -0
  24. package/claude/commands/handoff.md +66 -0
  25. package/claude/commands/incident.md +144 -0
  26. package/claude/commands/init.md +78 -0
  27. package/claude/commands/k8s-debug.md +31 -0
  28. package/claude/commands/lint.md +27 -0
  29. package/claude/commands/merge-all.md +115 -0
  30. package/claude/commands/merge.md +129 -0
  31. package/claude/commands/mikpc.md +54 -0
  32. package/claude/commands/morning.md +72 -0
  33. package/claude/commands/partymode.md +105 -0
  34. package/claude/commands/plans.md +88 -0
  35. package/claude/commands/pr.md +41 -0
  36. package/claude/commands/prep.md +132 -0
  37. package/claude/commands/push-sync.md +82 -0
  38. package/claude/commands/push.md +34 -0
  39. package/claude/commands/research.md +73 -0
  40. package/claude/commands/retro.md +95 -0
  41. package/claude/commands/review-pr.md +96 -0
  42. package/claude/commands/review.md +41 -0
  43. package/claude/commands/scaffold-agent.md +45 -0
  44. package/claude/commands/setup.md +92 -0
  45. package/claude/commands/ship-prod.md +97 -0
  46. package/claude/commands/ship.md +82 -0
  47. package/claude/commands/simplify.md +42 -0
  48. package/claude/commands/spike.md +110 -0
  49. package/claude/commands/status.md +37 -0
  50. package/claude/commands/sync.md +72 -0
  51. package/claude/commands/test.md +29 -0
  52. package/claude/commands/triage.md +72 -0
  53. package/claude/desktop/claude_desktop_config.json +9 -0
  54. package/claude/hooks.json +15 -0
  55. package/claude/mcp-servers.duplo.json +8 -0
  56. package/claude/mcp-servers.json +62 -0
  57. package/claude/scripts/psdebug.ps1 +7 -0
  58. package/claude/settings.json +38 -0
  59. package/claude/settings.local.json +4 -0
  60. package/claude/statusline-command.sh +94 -0
  61. package/claude/templates/CLAUDE-k8s-devops.md +58 -0
  62. package/claude/templates/CLAUDE-python-agent.md +47 -0
  63. package/claude/templates/CLAUDE-typescript-frontend.md +50 -0
  64. package/docker/ai-stack/docker-compose.yml +76 -0
  65. package/docker/ai-stack/searxng/limiter.toml +3 -0
  66. package/docker/ai-stack/searxng/settings.yml +39 -0
  67. package/docker/cli/config.json.template +15 -0
  68. package/docker/cli/daemon.json +9 -0
  69. package/docker/cli/features.json +3 -0
  70. package/docker/mcp/catalog.json +9 -0
  71. package/docker/mcp/catalogs/docker-mcp.yaml +15107 -0
  72. package/docker/mcp/config.yaml +0 -0
  73. package/docker/mcp/registry.yaml +37 -0
  74. package/docker/mcp/tools.yaml +0 -0
  75. package/docs/context/.gitkeep +0 -0
  76. package/docs/context/2026-03-02-configs.md +142 -0
  77. package/docs/handoff/.gitkeep +0 -0
  78. package/docs/incidents/.gitkeep +0 -0
  79. package/docs/plans/2026-02-28-autonomous-command-suite-design.md +250 -0
  80. package/docs/plans/2026-02-28-autonomous-command-suite.md +682 -0
  81. package/docs/plans/2026-03-01-ai-stack-split-architecture.md +72 -0
  82. package/docs/plans/2026-03-02-ai-stack-expansion.md +33 -0
  83. package/docs/plans/2026-03-02-merge-commands-design.md +58 -0
  84. package/docs/plans/2026-03-02-merge-commands.md +354 -0
  85. package/docs/research/.gitkeep +0 -0
  86. package/docs/research/2026-03-02-configs-repo-architecture.md +152 -0
  87. package/docs/retros/.gitkeep +0 -0
  88. package/docs/retros/2026-03-01-ai-stack-split-architecture.md +38 -0
  89. package/docs/spikes/.gitkeep +0 -0
  90. package/gh/config.yml +16 -0
  91. package/gh/hosts.yml +5 -0
  92. package/gh/main.json +103 -0
  93. package/ghostty/config +90 -0
  94. package/git/config/base.gitconfig +46 -0
  95. package/git/config/chiefmikey.gitconfig +11 -0
  96. package/git/config/personal.gitconfig +10 -0
  97. package/git/config/work.gitconfig +14 -0
  98. package/ide/cursor/extensions.txt +111 -0
  99. package/ide/cursor/keybindings.json +307 -0
  100. package/ide/cursor/mcp.json +92 -0
  101. package/ide/cursor/settings.json +544 -0
  102. package/ide/vscode/extensions.txt +120 -0
  103. package/ide/vscode/insiders/extensions.txt +119 -0
  104. package/ide/vscode/insiders/keybindings.json +294 -0
  105. package/ide/vscode/insiders/settings.json +518 -0
  106. package/ide/vscode/keybindings.json +294 -0
  107. package/ide/vscode/settings.json +526 -0
  108. package/ide/vscode/vscode/extensions.txt +43 -0
  109. package/iterm/Mikey Pro.json +951 -0
  110. package/iterm/com.googlecode.iterm2.plist +5549 -0
  111. package/iterm/font/MesloLGS NF Bold Italic.ttf +0 -0
  112. package/iterm/font/MesloLGS NF Bold.ttf +0 -0
  113. package/iterm/font/MesloLGS NF Italic.ttf +0 -0
  114. package/iterm/font/MesloLGS NF Regular.ttf +0 -0
  115. package/package.json +15 -0
  116. package/scripts/ai/deploy-ai-stack.sh +119 -0
  117. package/scripts/ai/fix-ai-proxy.service +12 -0
  118. package/scripts/ai/fix-ai-proxy.sh +25 -0
  119. package/scripts/brew/search/brew-search-results.sh +19 -0
  120. package/scripts/brew/search/brew-search.sh +34 -0
  121. package/scripts/brew/upgrade/brew-upgrade-autoupdate.sh +5 -0
  122. package/scripts/brew/upgrade/brew-upgrade-full-auto.sh +89 -0
  123. package/scripts/brew/upgrade/brew-upgrade-full.sh +159 -0
  124. package/scripts/docker/cleanup/docker-cleanup-manage.sh +163 -0
  125. package/scripts/docker/cleanup/docker-cleanup.cron +12 -0
  126. package/scripts/docker/cleanup/docker-cleanup.sh +280 -0
  127. package/scripts/docker/install/README.md +23 -0
  128. package/scripts/docker/install/docker-al2.sh +7 -0
  129. package/scripts/docker/install/docker-compose-al2.sh +15 -0
  130. package/scripts/gh/auth/auth.sh +12 -0
  131. package/scripts/gh/config/gh-config.sh +3 -0
  132. package/scripts/gh/gist/gh-gist-create.sh +29 -0
  133. package/scripts/gh/gist/gh-gist-delete.sh +1 -0
  134. package/scripts/gh/gist/gh-gist-edit.sh +8 -0
  135. package/scripts/gh/gpg-key/gh-gpg-key-add.sh +3 -0
  136. package/scripts/gh/install/install.sh +7 -0
  137. package/scripts/gh/label/gh-label-clone.sh +0 -0
  138. package/scripts/gh/label/gh-label-create.sh +0 -0
  139. package/scripts/gh/label/gh-label-delete.sh +0 -0
  140. package/scripts/gh/label/gh-label-edit.sh +0 -0
  141. package/scripts/gh/label/gh-label-list.sh +0 -0
  142. package/scripts/gh/secret/gh-secret-delete.sh +24 -0
  143. package/scripts/gh/secret/gh-secret-set.sh +70 -0
  144. package/scripts/gh/ssh-key/gh-ssh-key-add.sh +8 -0
  145. package/scripts/git/add/git-add.sh +3 -0
  146. package/scripts/git/auth/README.md +11 -0
  147. package/scripts/git/auth/https.sh +20 -0
  148. package/scripts/git/auth/ssh-mac.sh +41 -0
  149. package/scripts/git/branch-delete/git-branch-delete.sh +16 -0
  150. package/scripts/git/checkout/git-checkout-stash.sh +32 -0
  151. package/scripts/git/temp/git-temp-pull.sh +6 -0
  152. package/scripts/git/temp/git-temp-push.sh +5 -0
  153. package/scripts/install/fresh.zsh +34 -0
  154. package/scripts/install/full-install.zsh +193 -0
  155. package/scripts/linux/codedeploy/README.md +19 -0
  156. package/scripts/linux/codedeploy/linux-codedeploy-al2.sh +13 -0
  157. package/scripts/linux/codedeploy/linux-codedeploy-index.sh +16 -0
  158. package/scripts/linux/codedeploy/linux-codedeploy-ubuntu.sh +14 -0
  159. package/scripts/linux/coredns/README.md +17 -0
  160. package/scripts/linux/coredns/linux-coredns-al2.sh +29 -0
  161. package/scripts/linux/wifi/01-netconf.yaml +21 -0
  162. package/scripts/linux/wifi/wifi-ubuntu.sh +17 -0
  163. package/scripts/mac/dock-sort/mac-dock-sort.sh +87 -0
  164. package/scripts/mac/dropbox-ignore/mac-dropbox-ignore.sh +12 -0
  165. package/scripts/mac/sudo-askpass/mac-sudo-askpass.sh +50 -0
  166. package/scripts/mac/sudo-askpass/setup-sudo-password.sh +49 -0
  167. package/scripts/mac/upgrade/mac-upgrade.sh +21 -0
  168. package/scripts/mac/vpn/mac-vpn.sh +4 -0
  169. package/scripts/mcp/aws-mcp-wrapper.ps1 +97 -0
  170. package/scripts/mcp/aws-mcp-wrapper.sh +53 -0
  171. package/scripts/mcp/duplo-mcp-wrapper.sh +31 -0
  172. package/scripts/mcp/filesystem-mcp-wrapper.ps1 +43 -0
  173. package/scripts/mcp/filesystem-mcp-wrapper.sh +34 -0
  174. package/scripts/mcp/git-mcp-wrapper.ps1 +42 -0
  175. package/scripts/mcp/git-mcp-wrapper.sh +33 -0
  176. package/scripts/mcp/github-mcp-wrapper.ps1 +43 -0
  177. package/scripts/mcp/github-mcp-wrapper.sh +19 -0
  178. package/scripts/mcp/kubernetes-mcp-wrapper.ps1 +22 -0
  179. package/scripts/mcp/kubernetes-mcp-wrapper.sh +16 -0
  180. package/scripts/mcp/mcp-launcher.ps1 +56 -0
  181. package/scripts/mcp/mcp-launcher.sh +71 -0
  182. package/scripts/mcp/mongodb-mcp-wrapper.ps1 +26 -0
  183. package/scripts/mcp/mongodb-mcp-wrapper.sh +17 -0
  184. package/scripts/mcp/notion-mcp-wrapper.ps1 +23 -0
  185. package/scripts/mcp/notion-mcp-wrapper.sh +14 -0
  186. package/scripts/mcp/postgres-mcp-wrapper.ps1 +23 -0
  187. package/scripts/mcp/postgres-mcp-wrapper.sh +16 -0
  188. package/scripts/npm/ncu/npm-ncu.sh +24 -0
  189. package/scripts/npm/upgrade/npm-upgrade.sh +51 -0
  190. package/scripts/qmk/build_reviung41.sh +28 -0
  191. package/scripts/qmk/sync_unicorne.sh +44 -0
  192. package/scripts/sync/README.md +64 -0
  193. package/scripts/sync/config-common.zsh +882 -0
  194. package/scripts/sync/pull-configs.ps1 +33 -0
  195. package/scripts/sync/pull-configs.zsh +278 -0
  196. package/scripts/sync/push-configs.ps1 +91 -0
  197. package/scripts/sync/push-configs.zsh +384 -0
  198. package/shell/alias/alias-d.zsh +333 -0
  199. package/shell/alias/alias.zsh +36 -0
  200. package/shell/alias/categories/development.zsh +157 -0
  201. package/shell/alias/categories/environment.zsh +13 -0
  202. package/shell/alias/categories/git.zsh +40 -0
  203. package/shell/alias/categories/github-functions.zsh +459 -0
  204. package/shell/alias/categories/network.zsh +46 -0
  205. package/shell/alias/categories/path.zsh +46 -0
  206. package/shell/alias/categories/system.zsh +78 -0
  207. package/shell/alias/categories/wolfe-server.zsh +11 -0
  208. package/shell/powershell/Microsoft.PowerShell_profile.ps1 +208 -0
  209. package/shell/zsh/.p10k.zsh +1832 -0
  210. package/shell/zsh/.zshrc +87 -0
  211. package/shell/zsh/config/completion.zsh +31 -0
  212. package/shell/zsh/config/functions.zsh +31 -0
  213. package/shell/zsh/config/keybindings.zsh +13 -0
  214. package/shell/zsh/config/options.zsh +56 -0
  215. package/shell/zsh/config/plugins.zsh +83 -0
  216. package/shell/zsh/config/variables.zsh +191 -0
  217. package/shell/zsh/powerlevel10k.zsh-theme +83 -0
  218. package/shell/zsh/zsh-autosuggestions.zsh +871 -0
  219. package/ssh/config +46 -0
  220. package/ssh/config.duplo +21 -0
  221. package/ssh/config.mikpc +35 -0
  222. package/ssh/personal_signing.pub +1 -0
  223. package/templates/.envrc.example +34 -0
  224. package/templates/.envrc.quickstart +17 -0
  225. package/wezterm/wezterm.lua +249 -0
  226. package/wsl/.wslconfig +3 -0
  227. package/wsl/wsl.conf +18 -0
@@ -0,0 +1,33 @@
1
+ # PowerShell wrapper for pull-configs.zsh (Windows)
2
+ # Runs the zsh pull script via WSL and filters noisy WSL mount warnings.
3
+ #
4
+ # Mac remains the source of truth for Cursor settings/MCP; the zsh script
5
+ # skips pulling those on Windows.
6
+
7
+ $ErrorActionPreference = "SilentlyContinue"
8
+
9
+ $configPath = "/mnt/c/Users/wolfe/Dropbox/mikpc/dev/configs"
10
+
11
+ $job = Start-Job -ScriptBlock {
12
+ param($path)
13
+ wsl bash -lc "export HOME=/mnt/c/Users/wolfe; cd $path && zsh scripts/sync/pull-configs.zsh" 2>&1
14
+ } -ArgumentList $configPath
15
+
16
+ $job | Wait-Job | Out-Null
17
+ $output = $job | Receive-Job
18
+ Remove-Job $job
19
+
20
+ $hasOutput = $false
21
+ foreach ($line in $output) {
22
+ if ($line -and ($line.ToString() -notmatch "Failed to mount") -and ($line.ToString() -notmatch "^wsl:")) {
23
+ Write-Host $line
24
+ $hasOutput = $true
25
+ }
26
+ }
27
+
28
+ if (-not $hasOutput) {
29
+ Write-Host "[INFO] Pull configs script completed (no output)"
30
+ }
31
+
32
+ exit 0
33
+
@@ -0,0 +1,278 @@
1
+ #!/bin/zsh
2
+
3
+ # Unified Configuration Pull Script
4
+ # Pulls configurations from system locations to repo with validation
5
+
6
+ # set -euo pipefail
7
+
8
+ # Source common functions
9
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
10
+ source "${SCRIPT_DIR}/config-common.zsh"
11
+
12
+ # Additional pull-specific functions
13
+ pull_zsh_theme() {
14
+ # Only pull theme on Mac (Homebrew) or if powerlevel10k is installed elsewhere
15
+ if [[ "$IS_MAC" == "true" ]] && command -v brew >/dev/null 2>&1; then
16
+ local theme_src
17
+ theme_src="$(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme"
18
+ local theme_dest="${CONFIG_DIR}/shell/zsh/powerlevel10k.zsh-theme"
19
+
20
+ copy_if_exists "$theme_src" "$theme_dest" ""
21
+ elif [[ -f "${HOME}/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme" ]]; then
22
+ # Try Oh My Zsh location
23
+ local theme_src="${HOME}/.oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme"
24
+ local theme_dest="${CONFIG_DIR}/shell/zsh/powerlevel10k.zsh-theme"
25
+ copy_if_exists "$theme_src" "$theme_dest" ""
26
+ else
27
+ warn "powerlevel10k theme not found; skipping theme pull"
28
+ fi
29
+ }
30
+
31
+ pull_extensions() {
32
+ local editor="$1"
33
+ local editor_dir
34
+ local extensions_file
35
+
36
+ case "$editor" in
37
+ "cursor")
38
+ editor_dir="${CONFIG_DIR}/ide/cursor"
39
+ extensions_file="${editor_dir}/extensions.txt"
40
+ ;;
41
+ "vscode"|"insiders")
42
+ editor_dir="${CONFIG_DIR}/ide/vscode/${editor}"
43
+ extensions_file="${editor_dir}/extensions.txt"
44
+ ;;
45
+ *)
46
+ editor_dir="${CONFIG_DIR}/ide/vscode/${editor}"
47
+ extensions_file="${editor_dir}/extensions.txt"
48
+ ;;
49
+ esac
50
+
51
+ ensure_dir "$editor_dir"
52
+
53
+ case "$editor" in
54
+ "vscode")
55
+ if command -v code >/dev/null 2>&1; then
56
+ if code --list-extensions > "$extensions_file" 2>/dev/null; then
57
+ success "Pulled VS Code extensions → $extensions_file"
58
+ else
59
+ warn "Failed to list VS Code extensions"
60
+ fi
61
+ else
62
+ warn "'code' CLI not found; skipping VS Code extensions list"
63
+ fi
64
+ ;;
65
+ "insiders")
66
+ if command -v code-insiders >/dev/null 2>&1; then
67
+ if code-insiders --list-extensions > "$extensions_file" 2>/dev/null; then
68
+ success "Pulled VS Code Insiders extensions → $extensions_file"
69
+ else
70
+ warn "Failed to list VS Code Insiders extensions"
71
+ fi
72
+ else
73
+ warn "'code-insiders' CLI not found; skipping VS Code Insiders extensions list"
74
+ fi
75
+ ;;
76
+ "cursor")
77
+ # Prefer Cursor CLI if available (returns canonical extension IDs)
78
+ if command -v cursor >/dev/null 2>&1; then
79
+ if cursor --list-extensions 2>/dev/null | sed -E 's/^trimmed=//' | sed '/^[[:space:]]*$/d' | sort -u > "$extensions_file"; then
80
+ success "Pulled Cursor extensions → $extensions_file"
81
+ return 0
82
+ fi
83
+ warn "Failed to list Cursor extensions via CLI; falling back to filesystem scan"
84
+ fi
85
+
86
+ # Handle Cursor extensions (robust method)
87
+ # Try different paths based on platform
88
+ local cursor_ext_dir=""
89
+ if [[ "$IS_WINDOWS" == "true" ]] && [[ -d "/mnt/c/Users/${WINDOWS_USER:-$USER}/.cursor/extensions" ]]; then
90
+ cursor_ext_dir="/mnt/c/Users/${WINDOWS_USER:-$USER}/.cursor/extensions"
91
+ elif [[ -d "${HOME}/.cursor/extensions" ]]; then
92
+ cursor_ext_dir="${HOME}/.cursor/extensions"
93
+ elif [[ "$IS_MAC" == "true" ]] && [[ -d "${HOME}/Library/Application Support/Cursor/User/extensions" ]]; then
94
+ cursor_ext_dir="${HOME}/Library/Application Support/Cursor/User/extensions"
95
+ fi
96
+
97
+ if [[ -n "$cursor_ext_dir" ]] && [[ -d "$cursor_ext_dir" ]]; then
98
+ local tmpfile
99
+ tmpfile="$(mktemp)"
100
+ {
101
+ for d in "${cursor_ext_dir}"/*; do
102
+ [[ -d "$d" ]] || continue
103
+ local name="${d##*/}"
104
+ [[ "$name" == ".obsolete" || "$name" == "extensions.json" ]] && continue
105
+ # Trim trailing version/platform suffixes from folder names
106
+ local trimmed
107
+ trimmed="$(printf '%s' "$name" | sed -E 's/^-?trimmed=//; s/-[0-9][0-9.]*.*$//')"
108
+ printf '%s\n' "$trimmed"
109
+ done
110
+ } | sort -u > "$tmpfile"
111
+ mv "$tmpfile" "$extensions_file"
112
+ success "Pulled Cursor extensions → $extensions_file"
113
+ else
114
+ warn "Cursor extensions directory not found; skipping list"
115
+ fi
116
+ ;;
117
+ esac
118
+ }
119
+
120
+ pull_mcp_servers() {
121
+ # Extract mcpServers from ~/.claude.json back to repo
122
+ local source="${HOME}/.claude.json"
123
+ local dest="${CONFIG_DIR}/claude/mcp-servers.json"
124
+
125
+ if [[ ! -f "$source" ]]; then
126
+ warn "~/.claude.json not found; skipping MCP servers pull"
127
+ return
128
+ fi
129
+ if ! command -v jq >/dev/null 2>&1; then
130
+ warn "jq not available; skipping MCP servers pull"
131
+ return
132
+ fi
133
+
134
+ # Extract mcpServers key
135
+ local servers
136
+ servers=$(jq '.mcpServers // empty' "$source" 2>/dev/null)
137
+ if [[ -z "$servers" ]] || [[ "$servers" == "null" ]]; then
138
+ warn "No mcpServers found in ~/.claude.json; skipping pull"
139
+ return
140
+ fi
141
+
142
+ # Replace CONFIG_DIR with __CONFIG_DIR__ placeholder for portability
143
+ servers=$(echo "$servers" | sed "s|${CONFIG_DIR}|__CONFIG_DIR__|g")
144
+
145
+ # If a host-specific MCP file exists, split those servers out
146
+ local host_mcp_dest="${CONFIG_DIR}/claude/mcp-servers.${HOST}.json"
147
+ if [[ -f "$host_mcp_dest" ]]; then
148
+ local host_keys
149
+ host_keys=$(jq -r 'keys[]' "$host_mcp_dest" 2>/dev/null)
150
+ if [[ -n "$host_keys" ]]; then
151
+ # Extract host-specific servers and update host file
152
+ local host_servers
153
+ host_servers=$(echo "$servers" | jq --argjson keys "$(echo "$host_keys" | jq -R -s 'split("\n") | map(select(. != ""))')" '[.] | .[0] | to_entries | map(select(.key as $k | $keys | index($k))) | from_entries')
154
+ if [[ -n "$host_servers" ]] && [[ "$host_servers" != "{}" ]]; then
155
+ echo "$host_servers" | jq '.' > "$host_mcp_dest"
156
+ info "Pulled host-specific MCP servers → mcp-servers.${HOST}.json"
157
+ fi
158
+ # Remove host-specific servers from shared file
159
+ servers=$(echo "$servers" | jq --argjson keys "$(echo "$host_keys" | jq -R -s 'split("\n") | map(select(. != ""))')" 'to_entries | map(select(.key as $k | $keys | index($k) | not)) | from_entries')
160
+ fi
161
+ fi
162
+
163
+ ensure_dir "$(dirname "$dest")"
164
+ echo "$servers" | jq '.' > "$dest"
165
+ success "Pulled MCP servers: ~/.claude.json → $dest"
166
+ }
167
+
168
+ pull_claude_dirs() {
169
+ # Sync Claude Code commands, templates, and scripts directories (system → repo)
170
+ local claude_dirs=("commands" "templates" "scripts")
171
+ for dir_name in "${claude_dirs[@]}"; do
172
+ local src_dir="${HOME}/.claude/${dir_name}"
173
+ local dest_dir="${CONFIG_DIR}/claude/${dir_name}"
174
+ if [[ -d "$src_dir" ]]; then
175
+ ensure_dir "$dest_dir"
176
+ # Sync all files from system to repo (md, ps1, sh, etc.)
177
+ for src_file in "${src_dir}"/*(N.); do
178
+ local basename="${src_file##*/}"
179
+ cp "$src_file" "${dest_dir}/${basename}"
180
+ done
181
+ success "Pulled Claude ${dir_name}: ${src_dir} → ${dest_dir}"
182
+ else
183
+ warn "Claude ${dir_name} directory not found on system: ${src_dir}"
184
+ fi
185
+ done
186
+ }
187
+
188
+ main() {
189
+ info "Pulling configs into: ${CONFIG_DIR} (host: ${HOST})"
190
+
191
+ # Process all configuration files
192
+ while IFS= read -r config_file; do
193
+ local dest_path
194
+ local validation_func
195
+
196
+ dest_path="$(get_dest_path "$config_file")"
197
+ validation_func="$(get_validation_func "$config_file")"
198
+
199
+ # Skip if destination path is empty (e.g., Mac-only configs on Windows)
200
+ if [[ -z "$dest_path" ]]; then
201
+ continue
202
+ fi
203
+
204
+ # Windows: skip pulling transformed configs that are push-only
205
+ # (Cursor mcp.json gets transformed Mac→Windows on push, pulling it back would overwrite the Mac format)
206
+ if [[ "$IS_WINDOWS" == "true" ]]; then
207
+ case "$config_file" in
208
+ "ide/cursor/mcp.json")
209
+ info "Skipping pull for $config_file on Windows (transformed on push, pull would lose Mac format)"
210
+ continue
211
+ ;;
212
+ esac
213
+ fi
214
+
215
+ # Special handling for git config
216
+ if [[ "$config_file" == "git/config/$(get_git_config)" ]]; then
217
+ # Ensure git config directory exists
218
+ ensure_dir "${CONFIG_DIR}/git/config"
219
+ copy_if_exists "$dest_path" "${CONFIG_DIR}/${config_file}" "$validation_func"
220
+ # Special handling for MCP config (transform on Windows)
221
+ elif [[ "$config_file" == "ide/cursor/mcp.json" ]]; then
222
+ ensure_dir "${CONFIG_DIR}/ide/cursor"
223
+ if [[ "$IS_WINDOWS" == "true" ]] && [[ -n "$dest_path" ]] && [[ -f "$dest_path" ]]; then
224
+ # Transform Windows format back to Mac format
225
+ local temp_file
226
+ temp_file="$(mktemp)"
227
+ transform_mcp_windows_to_mac "$dest_path" "$temp_file"
228
+ if [[ -n "$validation_func" ]] && ! "$validation_func" "$temp_file"; then
229
+ error "Validation failed for transformed MCP config, skipping copy"
230
+ rm -f "$temp_file"
231
+ else
232
+ cp "$temp_file" "${CONFIG_DIR}/${config_file}"
233
+ rm -f "$temp_file"
234
+ success "Pulled (transformed): $dest_path → ${config_file}"
235
+ fi
236
+ elif [[ "$IS_MAC" == "true" ]] && [[ -n "$dest_path" ]]; then
237
+ # On Mac, copy directly
238
+ copy_if_exists "$dest_path" "${CONFIG_DIR}/${config_file}" "$validation_func"
239
+ fi
240
+ # Special handling for Docker MCP configs
241
+ elif [[ "$config_file" == docker/mcp/* ]]; then
242
+ # Ensure docker/mcp directory structure exists in repo
243
+ ensure_dir "${CONFIG_DIR}/docker/mcp/catalogs"
244
+ copy_if_exists "$dest_path" "${CONFIG_DIR}/${config_file}" "$validation_func"
245
+ # Special handling for Docker CLI configs
246
+ elif [[ "$config_file" == docker/cli/* ]]; then
247
+ # Ensure docker/cli directory exists in repo
248
+ ensure_dir "${CONFIG_DIR}/docker/cli"
249
+ copy_if_exists "$dest_path" "${CONFIG_DIR}/${config_file}" "$validation_func"
250
+ # Special handling for Claude Code configs
251
+ elif [[ "$config_file" == claude/* ]]; then
252
+ ensure_dir "$(dirname "${CONFIG_DIR}/${config_file}")"
253
+ copy_if_exists "$dest_path" "${CONFIG_DIR}/${config_file}" "$validation_func"
254
+ else
255
+ copy_if_exists "$dest_path" "${CONFIG_DIR}/${config_file}" "$validation_func"
256
+ fi
257
+ done < <(get_all_configs)
258
+
259
+ # Handle Claude Code directory-based configs (commands/ and templates/)
260
+ pull_claude_dirs
261
+
262
+ # Sync MCP server definitions from ~/.claude.json to repo
263
+ pull_mcp_servers
264
+
265
+ # Handle special cases
266
+ pull_zsh_theme
267
+
268
+ # Handle extensions lists
269
+ pull_extensions "vscode"
270
+ pull_extensions "insiders"
271
+ pull_extensions "cursor"
272
+
273
+ success "Configuration pull completed successfully!"
274
+ info "Host: $HOST | Git config: $(get_git_config)"
275
+ }
276
+
277
+ # Run main function
278
+ main "$@"
@@ -0,0 +1,91 @@
1
+ # PowerShell wrapper for push-configs.zsh
2
+ # Suppresses WSL T: drive mount warning
3
+
4
+ $ErrorActionPreference = "SilentlyContinue"
5
+ $configPath = "/mnt/c/Users/wolfe/Dropbox/mikpc/dev/configs"
6
+
7
+ # Run the script and capture all output
8
+ $allOutput = @()
9
+ $job = Start-Job -ScriptBlock {
10
+ param($path)
11
+ wsl bash -c "export HOME=/mnt/c/Users/wolfe; cd $path && zsh scripts/sync/push-configs.zsh" 2>&1
12
+ } -ArgumentList $configPath
13
+
14
+ $job | Wait-Job | Out-Null
15
+ $output = $job | Receive-Job
16
+ Remove-Job $job
17
+
18
+ # Filter out mount warnings and display output
19
+ $hasOutput = $false
20
+ foreach ($line in $output) {
21
+ if ($line -and $line.ToString() -notmatch "Failed to mount" -and $line.ToString() -notmatch "^wsl:") {
22
+ Write-Host $line
23
+ $hasOutput = $true
24
+ }
25
+ }
26
+
27
+ if (-not $hasOutput) {
28
+ Write-Host "[INFO] Push configs script completed (no output - configs may already be up to date)"
29
+ }
30
+
31
+ # Sync Cursor extensions on Windows to match repo list (Mac is source of truth)
32
+ try {
33
+ $repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\\..") | Select-Object -ExpandProperty Path
34
+ $extFile = Join-Path $repoRoot "ide\\cursor\\extensions.txt"
35
+ if (Test-Path $extFile) {
36
+ $desiredRaw = Get-Content $extFile | ForEach-Object { $_.Trim() } | Where-Object { $_ -and ($_ -notmatch '^#') }
37
+
38
+ # Normalize IDs:
39
+ # - strip "trimmed=" prefix from old lists
40
+ # - strip any "-<version>..." suffix from folder-derived entries (e.g. -2.0.12-universal, -2026.34.0-darwin-arm64)
41
+ $desired = $desiredRaw | ForEach-Object {
42
+ $ext = $_ -replace '^trimmed=', ''
43
+ $ext = $ext -replace '-\d.*$', ''
44
+ if ($ext) { $ext }
45
+ } | Sort-Object -Unique
46
+
47
+ $installed = @()
48
+ try { $installed = cursor --list-extensions 2>$null } catch {}
49
+
50
+ $installedCount = 0
51
+ $skippedCount = 0
52
+ $failed = @()
53
+
54
+ foreach ($ext in $desired) {
55
+ if ($installed -contains $ext) { $skippedCount++; continue }
56
+ cursor --install-extension $ext 2>$null | Out-Null
57
+ if ($LASTEXITCODE -ne 0) {
58
+ $failed += $ext
59
+ continue
60
+ }
61
+ $installedCount++
62
+ }
63
+
64
+ # Recompute what's still missing after attempted installs
65
+ $installed = @()
66
+ try { $installed = cursor --list-extensions 2>$null } catch {}
67
+ $missing = @($desired | Where-Object { $installed -notcontains $_ })
68
+
69
+ if ($failed.Count -gt 0) {
70
+ Write-Host "[WARN] Cursor extensions failed to install: $($failed.Count)"
71
+ if ($failed.Count -le 20) {
72
+ $failed | ForEach-Object { Write-Host ("[WARN] - " + $_) }
73
+ }
74
+ }
75
+ Write-Host "[INFO] Cursor extensions sync completed (installed=$installedCount, already=$skippedCount, missing=$($missing.Count))"
76
+ } else {
77
+ Write-Host "[WARN] Cursor extensions list not found: $extFile"
78
+ }
79
+ } catch {
80
+ Write-Host "[WARN] Cursor extensions sync failed: $_"
81
+ }
82
+
83
+ # Script completed - mount warning is suppressed
84
+ # Exit code handling: if script produced output, assume success unless error messages present
85
+ if ($hasOutput) {
86
+ $hasErrors = $output | Where-Object { $_ -match "\[ERROR\]" }
87
+ if ($hasErrors) {
88
+ exit 1
89
+ }
90
+ }
91
+ exit 0