Brewfile: stripped to essential tools (~600MB freed), removed boost, cmake, aerc, newsboat, fontforge, starship, and 24 auto-dependencies. Added caffeine, ollama, fastfetch, ocrmypdf, tea, sshpass, vitetris. Dropped 1password, iterm2, github-desktop, hazel, swiftbar, oversight. Shell: fixed all stale references (fzf, zoxide, starship, old paths, Homebrew node aliases). Updated project paths to ~/_Dev/. Added CapableMind aliases (cm, bmf, bmf-health, bmf-status, bmf-logs). Configs: removed iterm2, neofetch, swiftbar configs. Added capablemind (launchd plists, MCP example, bmf-start script). Updated SSH config with git.skemantix.com. Added CLAUDE.md to dotfiles. Scripts: consolidated 3 backup scripts into 1 (backup-all-secrets.sh), added pass store backup. Added setup-capablemind.sh for full environment reconstruction. Updated symlinks.sh for new config structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
# ░█▀█░█░█░█▄█
|
|
# ░█░█░▀▄▀░█░█
|
|
# ░▀░▀░░▀░░▀░▀
|
|
# Node Version Manager configuration - Simplified & Robust
|
|
|
|
# NVM directory
|
|
export NVM_DIR="${HOME}/.nvm"
|
|
|
|
# Add claude-code's specific Node version to PATH
|
|
# This ensures claude-code always works without complexity
|
|
if [[ -d "$HOME/.nvm/versions/node/v22.16.0/bin" ]]; then
|
|
export PATH="$HOME/.nvm/versions/node/v22.16.0/bin:$PATH"
|
|
fi
|
|
|
|
# Lazy load nvm for better shell startup performance
|
|
nvm() {
|
|
# Remove this function
|
|
unset -f nvm
|
|
|
|
# Load the real nvm
|
|
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
|
[ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion"
|
|
|
|
# Call nvm with the original arguments
|
|
nvm "$@"
|
|
}
|
|
|
|
# Aliases for when you need to use nvm
|
|
alias nvm-load='unset -f nvm; [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"'
|
|
alias nvm-claude='nvm use 22.16.0'
|
|
|
|
# Quick check if we're in a project with .nvmrc
|
|
check_nvmrc() {
|
|
if [[ -f .nvmrc ]] && [[ -z "${NVM_BIN}" ]]; then
|
|
echo "📦 .nvmrc detected. Run 'nvm-load && nvm use' to switch Node version"
|
|
fi
|
|
}
|
|
|
|
# Hook to check for .nvmrc on directory change
|
|
if [[ -n "$ZSH_VERSION" ]]; then
|
|
autoload -U add-zsh-hook
|
|
add-zsh-hook chpwd check_nvmrc
|
|
# Check current directory on shell start
|
|
check_nvmrc
|
|
fi |