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,333 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
|
|
3
|
+
# git
|
|
4
|
+
export GIT_SIGN_CHIEF="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGEDLKukaKrIbAJTyyVNMfHsEzn5AHBxlAiA5wqI9k75"
|
|
5
|
+
export GIT_SIGN_DUPLO="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIgpIcLuet6LaYXPj7vVjoKSAAVYHRY/Ogi09723Yxh7"
|
|
6
|
+
alias chief-sign='git config user.name "Mikl Wolfe" && git config user.email "wolfemikl@gmail.com" && git config user.signingkey "$GIT_SIGN_CHIEF"'
|
|
7
|
+
alias duplo-sign='git config user.name "Mikl Wolfe" && git config user.email "wolfemikl+mikl@gmail.com" && git config user.signingkey "$GIT_SIGN_DUPLO"'
|
|
8
|
+
|
|
9
|
+
# jit aws
|
|
10
|
+
jaws() {
|
|
11
|
+
if [ "$1" = "prod" ]; then
|
|
12
|
+
DUPLO_HOST="https://prod.duplocloud.net"
|
|
13
|
+
DUPLO_TOKEN="AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAWQwdj647BUeIXQoezFqq3wAAAAACAAAAAAAQZgAAAAEAACAAAAATBvtO55IahcFmFL0vJ9zfbOgc4GrD4DGGRuGWBcxMlAAAAAAOgAAAAAIAACAAAABEfPXfaVYRqai78jTGjfvlnTaiLRKb2vtF4uLC7GKOgZAAAADNGoV00Da0upli0ntNG13C3iB8An2Yf_SXKI2uwfFoNXm7NeNmgxr1yMLu76EoZ4YraKjSDHGPTtsWakOZcPqeF5Y_YVcYp0lPF8D6OTllS5O5rRsmce-I9oqAKT-ICrgPqC2z1bHojeD1H72rJo7AEUvx4cLVVqamHkVc_9qI9_TGnm3O4wYTb-QIJMsuFyxAAAAAjVIOakBrtv9OJUi-XMgFV2OOwoT4oW8nVmZWsIsay65Um8NP9dyoPEcdzE62Fld07ZsL39r79t5OBwe90QD7Xw"
|
|
14
|
+
DUPLO_TENANT="default"
|
|
15
|
+
elif [ "$1" = "test10" ]; then
|
|
16
|
+
DUPLO_HOST="https://test10.duplocloud.net"
|
|
17
|
+
DUPLO_TOKEN="AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAuQFtxQiLd0CWhiDvU2AKZAAAAAACAAAAAAAQZgAAAAEAACAAAAD6la_KRMJzsor3cQdEfFgl-xtzpai5Po6Bw5FB-VjuvQAAAAAOgAAAAAIAACAAAADjd-CoO4tdoDrX_3X1H8mtWn_R4piXmNi-Q3bBRyOQHZAAAACwsoAVxTt5g3kjxFS6lQICEwvXwn1KMc6zwnMzfUO56fVxSEVWm2Ob9WzGJhHmsecIrGGUrhtIKI0OlYZkNT2GvP0HMl6O2-8F-3fT73EWAXagrPmLeJsUhYf1RznMpskJyWKQha5pEQt0WOj4PsPr_6hGiyvX6qZ-MP-brwvvQNGx0ZFECxcUixme7MkEc99AAAAAIFhYvm8VWMvh8ZvFN2NiZLhtU6ZDWGgW28jYXAH8CQorSKbXQErmCRCVFHzSicYNGLptm2sTf3IHSr3kAYxedg"
|
|
18
|
+
DUPLO_TENANT="default"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
echo DUPLO_HOST: "$DUPLO_HOST"
|
|
22
|
+
|
|
23
|
+
duploctl jit web -H "${DUPLO_HOST}" -t "${DUPLO_TOKEN}" -T "${DUPLO_TENANT}" --admin --browser "chrome" | jq -r '.message'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
# directories - use LOCAL_DEV (set in variables.zsh from HOST_MAPPINGS)
|
|
27
|
+
export DEVBOX="${LOCAL_DEV}"
|
|
28
|
+
export PROD="${DROPBOX}/${DEVBOX}/prod"
|
|
29
|
+
export MIKL="${DROPBOX}/${DEVBOX}/mikl"
|
|
30
|
+
export UI="${DROPBOX}/${DEVBOX}/prod/duplo-ui"
|
|
31
|
+
export AI="${DROPBOX}/${DEVBOX}/ai-ui"
|
|
32
|
+
export INFRA="${DROPBOX}/${DEVBOX}/duplo-infra"
|
|
33
|
+
export AUTOMATION="${INFRA}/automation"
|
|
34
|
+
|
|
35
|
+
export DEVOPS_MGR_API_KEY="b16cf87f-43ce-4ff5-b17d-41bfd8b6f45c"
|
|
36
|
+
export USER_EMAIL="mikl@duplocloud.net"
|
|
37
|
+
export SSL_CERT_FILE=$(python3 -c "import certifi; print(certifi.where())")
|
|
38
|
+
|
|
39
|
+
# Load API keys from secure location
|
|
40
|
+
if [[ -f "${HOME}/.secrets" ]]; then
|
|
41
|
+
source "${HOME}/.secrets"
|
|
42
|
+
else
|
|
43
|
+
echo "Warning: ~/.secrets file not found. Add DEVOPS_MGR_API_KEY to it."
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# aliases
|
|
47
|
+
alias devopsmgr='cd ${PROD}/devops-manager'
|
|
48
|
+
alias devopsm="devopsmgr && cd backend && (16 && y) && cd ../ui && (12 && n) && cd .. && exec zsh"
|
|
49
|
+
alias dui="devopsmgr && cd ui && 12"
|
|
50
|
+
alias dbe="devopsmgr && cd backend && 16"
|
|
51
|
+
alias allow="direnv allow"
|
|
52
|
+
alias reload="direnv reload"
|
|
53
|
+
alias prod="cd ${PROD}"
|
|
54
|
+
alias mikl="cd ${MIKL}"
|
|
55
|
+
alias ui="cd ${UI}"
|
|
56
|
+
alias ai="cd ${AI}"
|
|
57
|
+
alias infra="cd ${INFRA}"
|
|
58
|
+
alias automation="cd ${AUTOMATION}"
|
|
59
|
+
alias prod.="pushd ${PROD} && allow && popd"
|
|
60
|
+
alias mikl.="pushd ${MIKL} && allow && popd"
|
|
61
|
+
alias deploy="duplo-deploy"
|
|
62
|
+
|
|
63
|
+
# get duplo version
|
|
64
|
+
duplo-v() {
|
|
65
|
+
curl --location "https://${1}.duplocloud.net/build-metadata.json" \
|
|
66
|
+
--header 'Authorization: Bearer AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAP-7Lg4akeE-x4mfvqZkn0QAAAAACAAAAAAAQZgAAAAEAACAAAACNg4xgEhcUqefAFyO8doFgp7ndKM3mj5v9OAH-lRpxFQAAAAAOgAAAAAIAACAAAADHgv2GHsHGUrIxikXQCIvKUjNUFghZQRjt23p-bJCT6qAAAAB0NBqstb2w3YWKMYMdZUsQMOSz8EjURmEvdfzLY_nvsHP5E75fmaKzqUtRQFEutLbUexb7hdBnjFMe4M02TC3dvoJErFylNehvxkMHmeU0sHlmamB9IQkm4b4cjoRwIs-PUOV305UTnC0E-JJXAzYH9SLwFnPwF8kDfRtYLfcpm4-IJP9sxK-eLzWjeooJq29RHWRWVe9ZHzaJMF8DHbTmQAAAAOLc0cmMrgUMx3FcUj-p7JScBpghSEmKCLPovK0Wbnq576LvOJFS45oAlh_r2Bx8zxM5Cu4daX-ZxhujPt_Kyv8'
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
# get ui version
|
|
70
|
+
duplo-uiv() {
|
|
71
|
+
curl --location "https://${1}.duplocloud.net/frontdoor/build-metadata.json" \
|
|
72
|
+
--header 'Authorization: Bearer AQAAANCMnd8BFdERjHoAwE_Cl-sBAAAAP-7Lg4akeE-x4mfvqZkn0QAAAAACAAAAAAAQZgAAAAEAACAAAACNg4xgEhcUqefAFyO8doFgp7ndKM3mj5v9OAH-lRpxFQAAAAAOgAAAAAIAACAAAADHgv2GHsHGUrIxikXQCIvKUjNUFghZQRjt23p-bJCT6qAAAAB0NBqstb2w3YWKMYMdZUsQMOSz8EjURmEvdfzLY_nvsHP5E75fmaKzqUtRQFEutLbUexb7hdBnjFMe4M02TC3dvoJErFylNehvxkMHmeU0sHlmamB9IQkm4b4cjoRwIs-PUOV305UTnC0E-JJXAzYH9SLwFnPwF8kDfRtYLfcpm4-IJP9sxK-eLzWjeooJq29RHWRWVe9ZHzaJMF8DHbTmQAAAAOLc0cmMrgUMx3FcUj-p7JScBpghSEmKCLPovK0Wbnq576LvOJFS45oAlh_r2Bx8zxM5Cu4daX-ZxhujPt_Kyv8'
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
duplo-deploy() {
|
|
76
|
+
pushd "${AUTOMATION}" && AWS_PROFILE="$1" update-duplo && popd && duplo-v "$1" && duplo-uiv "$1"
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# test directory aliases
|
|
80
|
+
for i in {01..24}
|
|
81
|
+
do
|
|
82
|
+
export TEST"$i"="${DEVBOX}/test$i"
|
|
83
|
+
eval "test$i() { cd \"\${TEST$i}\"; }"
|
|
84
|
+
eval "test$i.() { pushd \"\${TEST$i}\" && allow && popd; }"
|
|
85
|
+
done
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# onboarding stuff
|
|
92
|
+
|
|
93
|
+
# [[ $- == *i* ]] && source ~/.local/share/blesh/ble.sh --noattach
|
|
94
|
+
|
|
95
|
+
# If not running interactively, don't do anything
|
|
96
|
+
case $- in
|
|
97
|
+
*i*) ;;
|
|
98
|
+
*) return;;
|
|
99
|
+
esac
|
|
100
|
+
|
|
101
|
+
# MYSQL_BIN - use HOMEBREW_PREFIX if available (set in variables.zsh)
|
|
102
|
+
if [[ -n "${HOMEBREW_PREFIX:-}" ]] && [[ -d "${HOMEBREW_PREFIX}/opt/mysql-client/bin" ]]; then
|
|
103
|
+
MYSQL_BIN="${HOMEBREW_PREFIX}/opt/mysql-client/bin"
|
|
104
|
+
elif [[ -d "/usr/local/opt/mysql-client/bin" ]]; then
|
|
105
|
+
MYSQL_BIN="/usr/local/opt/mysql-client/bin"
|
|
106
|
+
else
|
|
107
|
+
MYSQL_BIN=""
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
if [[ -n "${MYSQL_BIN}" ]]; then
|
|
111
|
+
export PATH="${MYSQL_BIN}:${HOME}/.krew/bin:${PATH}"
|
|
112
|
+
else
|
|
113
|
+
export PATH="${HOME}/.krew/bin:${PATH}"
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
export GCL_NEEDS=true
|
|
117
|
+
JAVA_HOME="$(/usr/libexec/java_home -v 21)"
|
|
118
|
+
export JAVA_HOME
|
|
119
|
+
export OP_ACCOUNT='duplocloudinc.1password.com'
|
|
120
|
+
export TERM=xterm-256color
|
|
121
|
+
export XDG_CONFIG_HOME="${HOME}"
|
|
122
|
+
export WORKSPACE_HOME="${DEVBOX}"
|
|
123
|
+
|
|
124
|
+
# for direnv editor
|
|
125
|
+
export EDITOR="code --wait"
|
|
126
|
+
export VSCODE_GIT_ASKPASS_NODE="/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper"
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
alias k="kubectl"
|
|
130
|
+
# alias tf="terraform"
|
|
131
|
+
alias gcl="${HOME}/.nvm/versions/node/v19.3.0/bin/gitlab-ci-local"
|
|
132
|
+
alias kui="/Applications/Kui.app/Contents/MacOS/kui"
|
|
133
|
+
|
|
134
|
+
# Load zsh-specific addons
|
|
135
|
+
eval "$(direnv hook zsh)"
|
|
136
|
+
source "${HOME}/scripts/helpers.sh"
|
|
137
|
+
source "${HOME}/scripts/act.sh"
|
|
138
|
+
# source "${HOME}/scripts/theme.sh"
|
|
139
|
+
|
|
140
|
+
# gcloud config
|
|
141
|
+
export GCP_SDK="${HOME}/google-cloud-sdk"
|
|
142
|
+
if [ -f "${GCP_SDK}/path.zsh.inc" ]; then . "${GCP_SDK}/path.zsh.inc"; fi
|
|
143
|
+
if [ -f "${GCP_SDK}/completion.zsh.inc" ]; then . "${GCP_SDK}/completion.zsh.inc"; fi
|
|
144
|
+
|
|
145
|
+
flushdns() {
|
|
146
|
+
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
|
|
147
|
+
}
|
|
148
|
+
jit() {
|
|
149
|
+
duplo-jit aws --admin --no-cache --host "https://$1.duplocloud.net" --token "$2" | jq -r .ConsoleUrl | pbcopy
|
|
150
|
+
}
|
|
151
|
+
jitenv() {
|
|
152
|
+
duplo-jit aws \
|
|
153
|
+
--admin --host "https://$1.duplocloud.net" \
|
|
154
|
+
--no-cache \
|
|
155
|
+
--token "$2"
|
|
156
|
+
}
|
|
157
|
+
jitnow() {
|
|
158
|
+
duplo-jit aws --admin --no-cache --host "https://$1.duplocloud.net" --interactive | jq -r .ConsoleUrl | pbcopy
|
|
159
|
+
}
|
|
160
|
+
duplo-rdp-master() {
|
|
161
|
+
local profile="${1:-${AWS_PROFILE}}" instance_id
|
|
162
|
+
[ -z "$profile" ] && echo "missing AWS profile" && return 1
|
|
163
|
+
|
|
164
|
+
echo -n "$profile: duplo-master: searching .. "
|
|
165
|
+
instance_id="$(
|
|
166
|
+
aws --profile="$1" ec2 describe-instances --filters "Name=tag:Name,Values=Duplo-Master" \
|
|
167
|
+
--output=json | jq -r '.Reservations[].Instances[].InstanceId'
|
|
168
|
+
)"
|
|
169
|
+
[ -z "$instance_id" ] && echo NOT FOUND && return 1
|
|
170
|
+
echo "$instance_id"
|
|
171
|
+
|
|
172
|
+
echo -n "$profile: duplo-master: starting RDP session .. "
|
|
173
|
+
if aws --profile="$1" ssm start-session --target "$instance_id" --document-name AWS-StartPortForwardingSession --parameters portNumber=3389,localPortNumber=56789
|
|
174
|
+
then echo "done"
|
|
175
|
+
else echo FAILED ; return 1
|
|
176
|
+
fi
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
cmd-duplo-master() {
|
|
180
|
+
local profile="${1:-${AWS_PROFILE}}" instance_id
|
|
181
|
+
[ -z "$profile" ] && echo "missing AWS profile" && return 1
|
|
182
|
+
echo -n "$profile: duplo-master: searching .. "
|
|
183
|
+
instance_id="$(
|
|
184
|
+
aws --profile="$profile" ec2 describe-instances --filters "Name=tag:Name,Values=Duplo-Master" \
|
|
185
|
+
--output=json | jq -r '.Reservations[].Instances[].InstanceId'
|
|
186
|
+
)"
|
|
187
|
+
[ -z "$instance_id" ] && echo NOT FOUND && return 1
|
|
188
|
+
echo "$instance_id"
|
|
189
|
+
|
|
190
|
+
# Script to run PowerShell script on the Windows instance.
|
|
191
|
+
# started from https://devops.stackexchange.com/a/3390, but split the meat of it into 3 functions
|
|
192
|
+
# for better organization and maintainability
|
|
193
|
+
|
|
194
|
+
# Create an array with the commands
|
|
195
|
+
commands=("${@:2}")
|
|
196
|
+
|
|
197
|
+
# Convert the array to a JSON string
|
|
198
|
+
commands_json=$(printf '%s\n' "${commands[@]}" | jq -R . | jq -s .)
|
|
199
|
+
|
|
200
|
+
cmdId=$(aws --profile="$profile" ssm send-command --instance-ids "$instance_id" --document-name "AWS-RunPowerShellScript" --query "Command.CommandId" --output text --parameters commands="$commands_json")
|
|
201
|
+
echo -n "$profile: duplo-master: running command... $cmdId\n"
|
|
202
|
+
wait-while-cmd-executes "$profile" "$cmdId"
|
|
203
|
+
get-cmd-output "$profile" "$cmdId"
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
wait-while-cmd-executes() {
|
|
207
|
+
while [ true ];
|
|
208
|
+
do
|
|
209
|
+
cmdstatus=$(aws --profile="$1" ssm list-command-invocations --command-id "$2" --query "CommandInvocations[].Status" --output text)
|
|
210
|
+
echo "$cmdstatus"
|
|
211
|
+
if [ "$cmdstatus" != "InProgress" ]; then
|
|
212
|
+
#echo "not in progress"
|
|
213
|
+
break
|
|
214
|
+
fi
|
|
215
|
+
sleep 1;
|
|
216
|
+
done
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
get-cmd-output() {
|
|
220
|
+
aws --profile="$1" ssm list-command-invocations --command-id "$2" --details --query "CommandInvocations[*].CommandPlugins[*].Output[]" --output text --no-cli-pager
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
cmd-no-output-duplo-master() {
|
|
224
|
+
local profile="${1:-${AWS_PROFILE}}" instance_id
|
|
225
|
+
[ -z "$profile" ] && echo "missing AWS profile" && return 1
|
|
226
|
+
|
|
227
|
+
echo -n "$profile: duplo-master: searching .. "
|
|
228
|
+
instance_id="$(
|
|
229
|
+
aws --profile="$profile" ec2 describe-instances --filters "Name=tag:Name,Values=Duplo-Master" \
|
|
230
|
+
--output=json | jq -r '.Reservations[].Instances[].InstanceId'
|
|
231
|
+
)"
|
|
232
|
+
[ -z "$instance_id" ] && echo NOT FOUND && return 1
|
|
233
|
+
echo "$instance_id"
|
|
234
|
+
|
|
235
|
+
# Script to run PowerShell script on the Windows instance.
|
|
236
|
+
# started from https://devops.stackexchange.com/a/3390, but split the meat of it into 3 functions
|
|
237
|
+
# for better organization and maintainability
|
|
238
|
+
|
|
239
|
+
# Create an array with the commands
|
|
240
|
+
commands=("${@:2}")
|
|
241
|
+
|
|
242
|
+
# Convert the array to a JSON string
|
|
243
|
+
commands_json=$(printf '%s\n' "${commands[@]}" | jq -R . | jq -s .)
|
|
244
|
+
|
|
245
|
+
# Run the AWS CLI command
|
|
246
|
+
cmdId=$(aws --profile="$profile" ssm send-command --instance-ids "$instance_id" --document-name "AWS-RunPowerShellScript" --query "Command.CommandId" --output text --parameters commands="$commands_json")
|
|
247
|
+
|
|
248
|
+
# do not wait for command output
|
|
249
|
+
# just know the command tried to run
|
|
250
|
+
|
|
251
|
+
echo "$(date +%H:%M:%S)"
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
cmd-no-op() {
|
|
255
|
+
local profile="${1:-${AWS_PROFILE}}"
|
|
256
|
+
[ -z "$profile" ] && echo "missing AWS profile" && return 1
|
|
257
|
+
|
|
258
|
+
aws --profile="$profile" s3 ls > nul &
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
all-customers-getwurebootstatus() {
|
|
262
|
+
cat ~/customers.txt |
|
|
263
|
+
while read -r in; do
|
|
264
|
+
cmd-duplo-master "$in" "Get-WURebootStatus -Silent"
|
|
265
|
+
done
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
all-customers-rebootnow() {
|
|
269
|
+
cat ~/customers.txt |
|
|
270
|
+
while read -r in; do
|
|
271
|
+
cmd-no-output-duplo-master "$in" "Restart-Computer -Force"
|
|
272
|
+
done
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
all-customers-getwindowsupdate() {
|
|
276
|
+
cat ~/customers.txt |
|
|
277
|
+
while read -r in; do
|
|
278
|
+
cmd-duplo-master "$in" "get-windowsupdate | format-table KB, Size, RebootRequired, IsDownloaded, IsInstalled, Title ; get-wurebootstatus -silent"
|
|
279
|
+
done
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
all-customers-trigger-getwindowsupdate() {
|
|
283
|
+
cat ~/customers.txt |
|
|
284
|
+
while read -r in; do
|
|
285
|
+
cmd-no-output-duplo-master "$in" "Get-WindowsUpdate"
|
|
286
|
+
done
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
all-customers-installwindowsupdate() {
|
|
290
|
+
cat ~/customers.txt |
|
|
291
|
+
while read -r in; do
|
|
292
|
+
cmd-no-output-duplo-master "$in" "Install-WindowsUpdate -AcceptAll -AutoReboot"
|
|
293
|
+
done
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
all-customers-installwindowsupdatenoreboot() {
|
|
297
|
+
cat ~/customers.txt |
|
|
298
|
+
while read -r in; do
|
|
299
|
+
cmd-no-output-duplo-master "$in" "Install-WindowsUpdate -AcceptAll"
|
|
300
|
+
done
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
just-open-customer-tabs() {
|
|
304
|
+
cat ~/customers.txt |
|
|
305
|
+
while read -r in; do
|
|
306
|
+
cmd-no-op "$in"
|
|
307
|
+
done
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
all-customers-nuget-bar() {
|
|
311
|
+
cat ~/customers.txt |
|
|
312
|
+
while read -r in; do
|
|
313
|
+
cmd-duplo-master "$in" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope AllUsers"
|
|
314
|
+
done
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
all-customers-pswindowsupdate() {
|
|
318
|
+
cat ~/customers.txt |
|
|
319
|
+
while read -r in; do
|
|
320
|
+
cmd-duplo-master "$in" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"
|
|
321
|
+
cmd-duplo-master "$in" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Install-Module -Name PSWindowsUpdate"
|
|
322
|
+
cmd-duplo-master "$in" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Set-PSRepository -Name PSGallery -InstallationPolicy Untrusted"
|
|
323
|
+
done
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
specific-customer-pswindowsupdate() {
|
|
327
|
+
local profile="${1:-${AWS_PROFILE}}"
|
|
328
|
+
[ -z "$profile" ] && echo "missing AWS profile" && return 1
|
|
329
|
+
|
|
330
|
+
cmd-duplo-master "$profile" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Set-PSRepository -Name PSGallery -InstallationPolicy Trusted"
|
|
331
|
+
cmd-duplo-master "$profile" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Install-Module -Name PSWindowsUpdate"
|
|
332
|
+
cmd-duplo-master "$profile" "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;Set-PSRepository -Name PSGallery -InstallationPolicy Untrusted"
|
|
333
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
|
|
3
|
+
# Shell Alias Configuration - Main Entry Point
|
|
4
|
+
# This file loads all modular alias configurations
|
|
5
|
+
|
|
6
|
+
# Helper function to load alias files with error checking
|
|
7
|
+
load_alias_category() {
|
|
8
|
+
local alias_file="$1"
|
|
9
|
+
local category_name="$2"
|
|
10
|
+
|
|
11
|
+
if [[ -f "$alias_file" ]]; then
|
|
12
|
+
source "$alias_file"
|
|
13
|
+
else
|
|
14
|
+
echo "Warning: $category_name aliases not found at $alias_file"
|
|
15
|
+
fi
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
# Load environment variables first (other categories depend on these)
|
|
19
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/environment.zsh" "environment"
|
|
20
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/path.zsh" "PATH"
|
|
21
|
+
|
|
22
|
+
# Load host-specific configuration
|
|
23
|
+
if [ "${HOST}" = "duplo" ]; then
|
|
24
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/alias-d.zsh" "duplo-specific"
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Load all other alias categories
|
|
28
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/system.zsh" "system"
|
|
29
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/git.zsh" "git"
|
|
30
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/development.zsh" "development"
|
|
31
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/network.zsh" "network"
|
|
32
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/github-functions.zsh" "GitHub functions"
|
|
33
|
+
load_alias_category "${CONFIG_DIR}/shell/alias/categories/wolfe-server.zsh" "Wolfe server"
|
|
34
|
+
|
|
35
|
+
# iTerm2 shell integration
|
|
36
|
+
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
|
|
3
|
+
# Claude Code
|
|
4
|
+
alias c="claude"
|
|
5
|
+
alias cr="claude -c"
|
|
6
|
+
alias claude-resume="claude -c"
|
|
7
|
+
alias cs="claude --dangerously-skip-permissions"
|
|
8
|
+
alias claude-skip="claude --dangerously-skip-permissions"
|
|
9
|
+
|
|
10
|
+
# Development workflow aliases
|
|
11
|
+
alias n="npm i && dbi-current"
|
|
12
|
+
alias nl="npm i --legacy-peer-deps && dbi-current"
|
|
13
|
+
alias ncuu="ncu -u && n"
|
|
14
|
+
|
|
15
|
+
# Node.js version management
|
|
16
|
+
alias 12="nvm use 12"
|
|
17
|
+
alias 16="nvm use 16"
|
|
18
|
+
alias 18="nvm use 18"
|
|
19
|
+
|
|
20
|
+
# Python aliases
|
|
21
|
+
alias py="python3"
|
|
22
|
+
alias python="python3"
|
|
23
|
+
alias pip="pip3"
|
|
24
|
+
alias pipi="pip3 install"
|
|
25
|
+
alias pufreeze="pip freeze | cut -d = -f 1 > upgrades.txt"
|
|
26
|
+
alias pins="pyenv install --list"
|
|
27
|
+
alias plist="pyenv versions"
|
|
28
|
+
alias preq="pipi -m requirements.txt"
|
|
29
|
+
alias pupgrade="pipi -m requirements.txt"
|
|
30
|
+
|
|
31
|
+
# Python functions
|
|
32
|
+
pfreeze() {
|
|
33
|
+
pip freeze > "${1}.txt"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
envy() {
|
|
37
|
+
py -m venv "${1}" && source "${1}/bin/activate"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# Lazy load NVM for performance
|
|
41
|
+
run_nvm() {
|
|
42
|
+
# Check if NVM is already loaded
|
|
43
|
+
if command -v nvm >/dev/null 2>&1; then
|
|
44
|
+
nvm "$@"
|
|
45
|
+
return
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# Try Homebrew location first - HOMEBREW_PREFIX is set in variables.zsh
|
|
49
|
+
if [[ -n "${HOMEBREW_PREFIX:-}" ]] && [[ -s "${HOMEBREW_PREFIX}/opt/nvm/nvm.sh" ]]; then
|
|
50
|
+
. "${HOMEBREW_PREFIX}/opt/nvm/nvm.sh"
|
|
51
|
+
# Fallback to Intel Mac location
|
|
52
|
+
elif [[ -s "/usr/local/opt/nvm/nvm.sh" ]]; then
|
|
53
|
+
. "/usr/local/opt/nvm/nvm.sh"
|
|
54
|
+
else
|
|
55
|
+
echo "Error: nvm not found. Install with 'brew install nvm'"
|
|
56
|
+
return 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Load NVM completion (stored in bash_completion.d by NVM)
|
|
60
|
+
if [[ -z "${NVM_COMPLETION_LOADED}" ]]; then
|
|
61
|
+
if [[ -n "${HOMEBREW_PREFIX:-}" ]] && [[ -s "${HOMEBREW_PREFIX}/opt/nvm/etc/bash_completion.d/nvm" ]]; then
|
|
62
|
+
. "${HOMEBREW_PREFIX}/opt/nvm/etc/bash_completion.d/nvm"
|
|
63
|
+
elif [[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ]]; then
|
|
64
|
+
. "/usr/local/opt/nvm/etc/bash_completion.d/nvm"
|
|
65
|
+
fi
|
|
66
|
+
export NVM_COMPLETION_LOADED=1
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
nvm "$@"
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
nvm() {
|
|
73
|
+
run_nvm "$@"
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# Wishing Well
|
|
77
|
+
start-ww() {
|
|
78
|
+
local ww_dir="${HOME}/Dropbox/dev/ww"
|
|
79
|
+
echo "Starting Wishing Well..."
|
|
80
|
+
|
|
81
|
+
# Start postgres + redis via docker compose (just infra, not app services)
|
|
82
|
+
(cd "$ww_dir" && docker compose up -d postgres redis) || { echo "Failed to start infra"; return 1; }
|
|
83
|
+
|
|
84
|
+
# Wait for postgres to be ready
|
|
85
|
+
echo "Waiting for postgres..."
|
|
86
|
+
until docker exec wishing-well-postgres pg_isready -U wishing_well -d wishing_well >/dev/null 2>&1; do
|
|
87
|
+
sleep 1
|
|
88
|
+
done
|
|
89
|
+
echo "Postgres ready."
|
|
90
|
+
|
|
91
|
+
# Set env vars for native dev (localhost, not Docker hostnames)
|
|
92
|
+
export DATABASE_URL="postgresql://wishing_well:wishing_well_dev@localhost:5432/wishing_well"
|
|
93
|
+
export JWT_SECRET="dev-jwt-secret-local-only"
|
|
94
|
+
export NEXTAUTH_SECRET="dev-nextauth-secret-local-only"
|
|
95
|
+
export NEXTAUTH_URL="http://localhost:3100"
|
|
96
|
+
export NEXT_PUBLIC_API_URL="http://localhost:3101"
|
|
97
|
+
export WW_API_URL="http://localhost:3101"
|
|
98
|
+
|
|
99
|
+
# Run API + web concurrently (native, no Docker rebuild)
|
|
100
|
+
(cd "$ww_dir" && npm run dev)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
stop-ww() {
|
|
104
|
+
echo "Stopping Wishing Well..."
|
|
105
|
+
(cd "${HOME}/Dropbox/dev/ww" && docker compose down)
|
|
106
|
+
echo "Stopped."
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
# Unicorne aliases (QMK)
|
|
110
|
+
alias compile-unicorne='${SCRIPT_DIR}/qmk/sync_unicorne.sh && qmk compile -kb boardsource/unicorne -km chiefmikey'
|
|
111
|
+
alias flash-unicorne='${SCRIPT_DIR}/qmk/sync_unicorne.sh && qmk flash -kb boardsource/unicorne -km chiefmikey'
|
|
112
|
+
|
|
113
|
+
# Reviung41 aliases (ZMK)
|
|
114
|
+
alias build-reviung='${SCRIPT_DIR}/qmk/build_reviung41.sh'
|
|
115
|
+
|
|
116
|
+
# Ollama (local AI) — runs on mikpc, accessible locally or via Tailscale
|
|
117
|
+
# Uses native Ollama API (think:false for clean output) + glow for markdown rendering
|
|
118
|
+
if command -v ollama &>/dev/null; then
|
|
119
|
+
OLLAMA_URL="http://localhost:11434"
|
|
120
|
+
alias ail="ollama list"
|
|
121
|
+
alias ais="ollama ps"
|
|
122
|
+
else
|
|
123
|
+
OLLAMA_URL="http://100.89.204.71:11434"
|
|
124
|
+
alias ail="curl -s $OLLAMA_URL/api/tags | jq -r '.models[] | \"\\(.name)\\t\\(.details.parameter_size)\\t\\(.details.quantization_level)\"'"
|
|
125
|
+
alias ais="curl -s $OLLAMA_URL/api/ps | jq -r '.models[] | \"\\(.name)\\t\\(.size_vram / 1073741824 | floor)GB VRAM\"'"
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
_ollama_send() {
|
|
129
|
+
local response
|
|
130
|
+
response=$(curl -s "$OLLAMA_URL/api/chat" \
|
|
131
|
+
-d "{\"model\":\"$1\",\"messages\":[{\"role\":\"user\",\"content\":$(printf '%s' "$2" | jq -Rs .)}],\"think\":false,\"stream\":false}" \
|
|
132
|
+
2>/dev/null | jq -r '.message.content // empty')
|
|
133
|
+
if command -v glow &>/dev/null; then
|
|
134
|
+
printf '%s' "$response" | glow -
|
|
135
|
+
else
|
|
136
|
+
printf '%s\n' "$response"
|
|
137
|
+
fi
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
_ollama_chat() {
|
|
141
|
+
local model="$1"; shift
|
|
142
|
+
local prompt="$*"
|
|
143
|
+
echo "Ollama ($model). Ctrl+C to quit."
|
|
144
|
+
if [[ -n "$prompt" ]]; then
|
|
145
|
+
_ollama_send "$model" "$prompt"
|
|
146
|
+
fi
|
|
147
|
+
while printf "\n>>> " && IFS= read -r prompt; do
|
|
148
|
+
[[ -z "$prompt" ]] && continue
|
|
149
|
+
_ollama_send "$model" "$prompt"
|
|
150
|
+
done
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
alias ai="_ollama_chat qwen3:32b"
|
|
154
|
+
alias aif="_ollama_chat glm-4.7-flash"
|
|
155
|
+
alias aic="_ollama_chat qwen2.5-coder:32b"
|
|
156
|
+
alias air="_ollama_chat deepseek-r1:32b"
|
|
157
|
+
alias aib="_ollama_chat qwen2.5:72b"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
|
|
3
|
+
# Security & API keys - Load from secure location
|
|
4
|
+
# WARNING: Never commit API keys to version control!
|
|
5
|
+
if [[ -f "${HOME}/.secrets" ]]; then
|
|
6
|
+
source "${HOME}/.secrets"
|
|
7
|
+
else
|
|
8
|
+
echo "Warning: ~/.secrets file not found. Create it with your API keys."
|
|
9
|
+
echo "Example:"
|
|
10
|
+
echo "export OPENAI_API_KEY=\"your-key-here\""
|
|
11
|
+
echo "export NPM_TOKEN=\"your-token-here\""
|
|
12
|
+
fi
|
|
13
|
+
export ASKPASS="${SCRIPT_DIR}/mac/sudo-askpass/mac-sudo-askpass.sh"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/bin/zsh
|
|
2
|
+
|
|
3
|
+
# Git aliases and functions
|
|
4
|
+
alias gs="git status"
|
|
5
|
+
alias push='git push -u origin $(git rev-parse --abbrev-ref HEAD)'
|
|
6
|
+
alias goop="git pull ${*}"
|
|
7
|
+
alias tags="git push --tags"
|
|
8
|
+
alias mm="git pull --rebase=false --autostash --no-edit origin main"
|
|
9
|
+
alias mms="git pull --rebase=false --autostash --no-edit origin master"
|
|
10
|
+
alias md="git pull --rebase=false --autostash --no-edit origin develop"
|
|
11
|
+
alias rem="git pull --rebase=merges --autostash origin main"
|
|
12
|
+
alias rems="git pull --rebase=merges --autostash origin master"
|
|
13
|
+
alias pum="git pull upstream main"
|
|
14
|
+
alias pums="git pull upstream master"
|
|
15
|
+
alias gitignore='echo -e "node_modules\n.DS_Store\n.vscode\n.env\ndist" > .gitignore'
|
|
16
|
+
|
|
17
|
+
# Git workflow aliases
|
|
18
|
+
alias sync-apps="${SCRIPT_DIR}/git/sync-apps/git-sync-apps.sh"
|
|
19
|
+
alias temp-push="${SCRIPT_DIR}/git/temp/git-temp-push.sh"
|
|
20
|
+
alias temp-pull="${SCRIPT_DIR}/git/temp/git-temp-pull.sh"
|
|
21
|
+
alias nsync="pullr && rem && n"
|
|
22
|
+
alias msync="pullm && mms && y"
|
|
23
|
+
alias remote="${SCRIPT_DIR}/git/remote/git-remote-ssh.sh"
|
|
24
|
+
alias mkrepo="${SCRIPT_DIR}/gh/repo/gh-repo-create.sh"
|
|
25
|
+
|
|
26
|
+
# Git helper functions
|
|
27
|
+
pullr() {
|
|
28
|
+
# shellcheck disable=SC2086
|
|
29
|
+
git pull --rebase=merges --autostash ${1} ${2}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
pullm() {
|
|
33
|
+
# shellcheck disable=SC2086
|
|
34
|
+
git pull --rebase=false --autostash --no-edit ${1} ${2}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
pushf() {
|
|
38
|
+
# shellcheck disable=SC2086
|
|
39
|
+
git push --force-with-lease --force-if-includes ${1} ${2}
|
|
40
|
+
}
|