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.
- package/.claude/settings.local.json +3 -0
- package/CLAUDE.md +94 -0
- package/README.md +424 -0
- package/TERMINAL_SHORTCUTS.md +96 -0
- package/WINDOWS_COMPATIBILITY.md +85 -0
- package/WINDOWS_MCP_SETUP.md +133 -0
- package/apps/RectangleConfig.plist +0 -0
- package/apps/Synergy +84 -0
- package/apps/iStat Menus Settings.ismp7 +0 -0
- package/claude/CLAUDE.md +228 -0
- package/claude/commands/changelog.md +36 -0
- package/claude/commands/commit.md +29 -0
- package/claude/commands/context.md +112 -0
- package/claude/commands/dash.md +37 -0
- package/claude/commands/deploy-check.md +37 -0
- package/claude/commands/deps.md +26 -0
- package/claude/commands/duplo.md +56 -0
- package/claude/commands/explain.md +43 -0
- package/claude/commands/fix-and-test.md +46 -0
- package/claude/commands/game-debug.md +66 -0
- package/claude/commands/games.md +53 -0
- package/claude/commands/go.md +147 -0
- package/claude/commands/guard.md +102 -0
- package/claude/commands/handoff.md +66 -0
- package/claude/commands/incident.md +144 -0
- package/claude/commands/init.md +78 -0
- package/claude/commands/k8s-debug.md +31 -0
- package/claude/commands/lint.md +27 -0
- package/claude/commands/merge-all.md +115 -0
- package/claude/commands/merge.md +129 -0
- package/claude/commands/mikpc.md +54 -0
- package/claude/commands/morning.md +72 -0
- package/claude/commands/partymode.md +105 -0
- package/claude/commands/plans.md +88 -0
- package/claude/commands/pr.md +41 -0
- package/claude/commands/prep.md +132 -0
- package/claude/commands/push-sync.md +82 -0
- package/claude/commands/push.md +34 -0
- package/claude/commands/research.md +73 -0
- package/claude/commands/retro.md +95 -0
- package/claude/commands/review-pr.md +96 -0
- package/claude/commands/review.md +41 -0
- package/claude/commands/scaffold-agent.md +45 -0
- package/claude/commands/setup.md +92 -0
- package/claude/commands/ship-prod.md +97 -0
- package/claude/commands/ship.md +82 -0
- package/claude/commands/simplify.md +42 -0
- package/claude/commands/spike.md +110 -0
- package/claude/commands/status.md +37 -0
- package/claude/commands/sync.md +72 -0
- package/claude/commands/test.md +29 -0
- package/claude/commands/triage.md +72 -0
- package/claude/desktop/claude_desktop_config.json +9 -0
- package/claude/hooks.json +15 -0
- package/claude/mcp-servers.duplo.json +8 -0
- package/claude/mcp-servers.json +62 -0
- package/claude/scripts/psdebug.ps1 +7 -0
- package/claude/settings.json +38 -0
- package/claude/settings.local.json +4 -0
- package/claude/statusline-command.sh +94 -0
- package/claude/templates/CLAUDE-k8s-devops.md +58 -0
- package/claude/templates/CLAUDE-python-agent.md +47 -0
- package/claude/templates/CLAUDE-typescript-frontend.md +50 -0
- package/docker/ai-stack/docker-compose.yml +76 -0
- package/docker/ai-stack/searxng/limiter.toml +3 -0
- package/docker/ai-stack/searxng/settings.yml +39 -0
- package/docker/cli/config.json.template +15 -0
- package/docker/cli/daemon.json +9 -0
- package/docker/cli/features.json +3 -0
- package/docker/mcp/catalog.json +9 -0
- package/docker/mcp/catalogs/docker-mcp.yaml +15107 -0
- package/docker/mcp/config.yaml +0 -0
- package/docker/mcp/registry.yaml +37 -0
- package/docker/mcp/tools.yaml +0 -0
- package/docs/context/.gitkeep +0 -0
- package/docs/context/2026-03-02-configs.md +142 -0
- package/docs/handoff/.gitkeep +0 -0
- package/docs/incidents/.gitkeep +0 -0
- package/docs/plans/2026-02-28-autonomous-command-suite-design.md +250 -0
- package/docs/plans/2026-02-28-autonomous-command-suite.md +682 -0
- package/docs/plans/2026-03-01-ai-stack-split-architecture.md +72 -0
- package/docs/plans/2026-03-02-ai-stack-expansion.md +33 -0
- package/docs/plans/2026-03-02-merge-commands-design.md +58 -0
- package/docs/plans/2026-03-02-merge-commands.md +354 -0
- package/docs/research/.gitkeep +0 -0
- package/docs/research/2026-03-02-configs-repo-architecture.md +152 -0
- package/docs/retros/.gitkeep +0 -0
- package/docs/retros/2026-03-01-ai-stack-split-architecture.md +38 -0
- package/docs/spikes/.gitkeep +0 -0
- package/gh/config.yml +16 -0
- package/gh/hosts.yml +5 -0
- package/gh/main.json +103 -0
- package/ghostty/config +90 -0
- package/git/config/base.gitconfig +46 -0
- package/git/config/chiefmikey.gitconfig +11 -0
- package/git/config/personal.gitconfig +10 -0
- package/git/config/work.gitconfig +14 -0
- package/ide/cursor/extensions.txt +111 -0
- package/ide/cursor/keybindings.json +307 -0
- package/ide/cursor/mcp.json +92 -0
- package/ide/cursor/settings.json +544 -0
- package/ide/vscode/extensions.txt +120 -0
- package/ide/vscode/insiders/extensions.txt +119 -0
- package/ide/vscode/insiders/keybindings.json +294 -0
- package/ide/vscode/insiders/settings.json +518 -0
- package/ide/vscode/keybindings.json +294 -0
- package/ide/vscode/settings.json +526 -0
- package/ide/vscode/vscode/extensions.txt +43 -0
- package/iterm/Mikey Pro.json +951 -0
- package/iterm/com.googlecode.iterm2.plist +5549 -0
- package/iterm/font/MesloLGS NF Bold Italic.ttf +0 -0
- package/iterm/font/MesloLGS NF Bold.ttf +0 -0
- package/iterm/font/MesloLGS NF Italic.ttf +0 -0
- package/iterm/font/MesloLGS NF Regular.ttf +0 -0
- package/package.json +15 -0
- package/scripts/ai/deploy-ai-stack.sh +119 -0
- package/scripts/ai/fix-ai-proxy.service +12 -0
- package/scripts/ai/fix-ai-proxy.sh +25 -0
- package/scripts/brew/search/brew-search-results.sh +19 -0
- package/scripts/brew/search/brew-search.sh +34 -0
- package/scripts/brew/upgrade/brew-upgrade-autoupdate.sh +5 -0
- package/scripts/brew/upgrade/brew-upgrade-full-auto.sh +89 -0
- package/scripts/brew/upgrade/brew-upgrade-full.sh +159 -0
- package/scripts/docker/cleanup/docker-cleanup-manage.sh +163 -0
- package/scripts/docker/cleanup/docker-cleanup.cron +12 -0
- package/scripts/docker/cleanup/docker-cleanup.sh +280 -0
- package/scripts/docker/install/README.md +23 -0
- package/scripts/docker/install/docker-al2.sh +7 -0
- package/scripts/docker/install/docker-compose-al2.sh +15 -0
- package/scripts/gh/auth/auth.sh +12 -0
- package/scripts/gh/config/gh-config.sh +3 -0
- package/scripts/gh/gist/gh-gist-create.sh +29 -0
- package/scripts/gh/gist/gh-gist-delete.sh +1 -0
- package/scripts/gh/gist/gh-gist-edit.sh +8 -0
- package/scripts/gh/gpg-key/gh-gpg-key-add.sh +3 -0
- package/scripts/gh/install/install.sh +7 -0
- package/scripts/gh/label/gh-label-clone.sh +0 -0
- package/scripts/gh/label/gh-label-create.sh +0 -0
- package/scripts/gh/label/gh-label-delete.sh +0 -0
- package/scripts/gh/label/gh-label-edit.sh +0 -0
- package/scripts/gh/label/gh-label-list.sh +0 -0
- package/scripts/gh/secret/gh-secret-delete.sh +24 -0
- package/scripts/gh/secret/gh-secret-set.sh +70 -0
- package/scripts/gh/ssh-key/gh-ssh-key-add.sh +8 -0
- package/scripts/git/add/git-add.sh +3 -0
- package/scripts/git/auth/README.md +11 -0
- package/scripts/git/auth/https.sh +20 -0
- package/scripts/git/auth/ssh-mac.sh +41 -0
- package/scripts/git/branch-delete/git-branch-delete.sh +16 -0
- package/scripts/git/checkout/git-checkout-stash.sh +32 -0
- package/scripts/git/temp/git-temp-pull.sh +6 -0
- package/scripts/git/temp/git-temp-push.sh +5 -0
- package/scripts/install/fresh.zsh +34 -0
- package/scripts/install/full-install.zsh +193 -0
- package/scripts/linux/codedeploy/README.md +19 -0
- package/scripts/linux/codedeploy/linux-codedeploy-al2.sh +13 -0
- package/scripts/linux/codedeploy/linux-codedeploy-index.sh +16 -0
- package/scripts/linux/codedeploy/linux-codedeploy-ubuntu.sh +14 -0
- package/scripts/linux/coredns/README.md +17 -0
- package/scripts/linux/coredns/linux-coredns-al2.sh +29 -0
- package/scripts/linux/wifi/01-netconf.yaml +21 -0
- package/scripts/linux/wifi/wifi-ubuntu.sh +17 -0
- package/scripts/mac/dock-sort/mac-dock-sort.sh +87 -0
- package/scripts/mac/dropbox-ignore/mac-dropbox-ignore.sh +12 -0
- package/scripts/mac/sudo-askpass/mac-sudo-askpass.sh +50 -0
- package/scripts/mac/sudo-askpass/setup-sudo-password.sh +49 -0
- package/scripts/mac/upgrade/mac-upgrade.sh +21 -0
- package/scripts/mac/vpn/mac-vpn.sh +4 -0
- package/scripts/mcp/aws-mcp-wrapper.ps1 +97 -0
- package/scripts/mcp/aws-mcp-wrapper.sh +53 -0
- package/scripts/mcp/duplo-mcp-wrapper.sh +31 -0
- package/scripts/mcp/filesystem-mcp-wrapper.ps1 +43 -0
- package/scripts/mcp/filesystem-mcp-wrapper.sh +34 -0
- package/scripts/mcp/git-mcp-wrapper.ps1 +42 -0
- package/scripts/mcp/git-mcp-wrapper.sh +33 -0
- package/scripts/mcp/github-mcp-wrapper.ps1 +43 -0
- package/scripts/mcp/github-mcp-wrapper.sh +19 -0
- package/scripts/mcp/kubernetes-mcp-wrapper.ps1 +22 -0
- package/scripts/mcp/kubernetes-mcp-wrapper.sh +16 -0
- package/scripts/mcp/mcp-launcher.ps1 +56 -0
- package/scripts/mcp/mcp-launcher.sh +71 -0
- package/scripts/mcp/mongodb-mcp-wrapper.ps1 +26 -0
- package/scripts/mcp/mongodb-mcp-wrapper.sh +17 -0
- package/scripts/mcp/notion-mcp-wrapper.ps1 +23 -0
- package/scripts/mcp/notion-mcp-wrapper.sh +14 -0
- package/scripts/mcp/postgres-mcp-wrapper.ps1 +23 -0
- package/scripts/mcp/postgres-mcp-wrapper.sh +16 -0
- package/scripts/npm/ncu/npm-ncu.sh +24 -0
- package/scripts/npm/upgrade/npm-upgrade.sh +51 -0
- package/scripts/qmk/build_reviung41.sh +28 -0
- package/scripts/qmk/sync_unicorne.sh +44 -0
- package/scripts/sync/README.md +64 -0
- package/scripts/sync/config-common.zsh +882 -0
- package/scripts/sync/pull-configs.ps1 +33 -0
- package/scripts/sync/pull-configs.zsh +278 -0
- package/scripts/sync/push-configs.ps1 +91 -0
- package/scripts/sync/push-configs.zsh +384 -0
- package/shell/alias/alias-d.zsh +333 -0
- package/shell/alias/alias.zsh +36 -0
- package/shell/alias/categories/development.zsh +157 -0
- package/shell/alias/categories/environment.zsh +13 -0
- package/shell/alias/categories/git.zsh +40 -0
- package/shell/alias/categories/github-functions.zsh +459 -0
- package/shell/alias/categories/network.zsh +46 -0
- package/shell/alias/categories/path.zsh +46 -0
- package/shell/alias/categories/system.zsh +78 -0
- package/shell/alias/categories/wolfe-server.zsh +11 -0
- package/shell/powershell/Microsoft.PowerShell_profile.ps1 +208 -0
- package/shell/zsh/.p10k.zsh +1832 -0
- package/shell/zsh/.zshrc +87 -0
- package/shell/zsh/config/completion.zsh +31 -0
- package/shell/zsh/config/functions.zsh +31 -0
- package/shell/zsh/config/keybindings.zsh +13 -0
- package/shell/zsh/config/options.zsh +56 -0
- package/shell/zsh/config/plugins.zsh +83 -0
- package/shell/zsh/config/variables.zsh +191 -0
- package/shell/zsh/powerlevel10k.zsh-theme +83 -0
- package/shell/zsh/zsh-autosuggestions.zsh +871 -0
- package/ssh/config +46 -0
- package/ssh/config.duplo +21 -0
- package/ssh/config.mikpc +35 -0
- package/ssh/personal_signing.pub +1 -0
- package/templates/.envrc.example +34 -0
- package/templates/.envrc.quickstart +17 -0
- package/wezterm/wezterm.lua +249 -0
- package/wsl/.wslconfig +3 -0
- 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
|