Dotfiles overhaul: infrastructure, tooling, performance, and modernization#2
Merged
STiXzoOR merged 15 commits intoFeb 25, 2026
Merged
Conversation
- Add missing bin scripts (is-executable, is-supported, plistbuddy) - Add missing runcom files (.hushlogin, .huskyrc, .profile, .vim/) - Expand config/ with all subdirectories (git, husky, prettier, starship, thefuck) - Document system/ shell configuration files (.alias, .bindings, .fnm, etc.) - Add completions/ and resources/ directories - Add vscode/ to apps section - Include unlink, open, and edit commands in development commands - Clarify SSH key type (ed25519) and Vim plugin manager (Vundle)
Major performance improvements:
- Remove double compinit call (Prezto handles it)
- Cache expensive eval outputs: fnm, zoxide, thefuck, fzf, brew shellenv, dircolors, npm completion
- Fix fpath order (must come before compinit)
- Remove redundant fzf sourcing from .completion and .bindings
- Remove redundant git completion (Prezto's git module handles it)
- Use zsh native $+commands instead of subprocess checks in aliases
- Use typeset -U for PATH deduplication (no awk subprocess)
- Fix bash-specific ${!1} syntax to zsh ${(P)1} in get() function
Caches auto-regenerate when source files/binaries change.
Run fnm_refresh to manually refresh fnm cache after node version changes.
New test script (bin/dotfiles-test) validates: - Syntax of all zsh/bash configuration files - Cache generation for fnm, zoxide, thefuck, fzf, brew, dircolors, npm - Core functions (prepend-path, get, dedup-pathvar) - Alias definitions (basic, global, suffix, conditional) - Environment variables (XDG dirs, EDITOR, LANG) - File structure (required dirs and files) - Prezto configuration - Shell startup time (with performance benchmarking) Usage: ./bin/dotfiles test # Run all tests ./bin/dotfiles test --verbose # Detailed output ./bin/dotfiles test --quick # Skip slow tests Integrated into main dotfiles command and documented in CLAUDE.md.
Major improvements to dotfiles infrastructure: Brewfile: - Consolidated all brew/cask/mas packages into single Brewfile - Use `brew bundle install` for installation - Legacy .list files still supported as fallback - Organized by category with comments CI/CD (GitHub Actions): - Shell syntax validation (bash + zsh) - Shellcheck linting - Test suite execution - Brewfile validation Doctor command: - Comprehensive health checks for dotfiles setup - Validates symlinks, submodules, shell config - Checks Homebrew, cache status, tools, Node.js - Auto-fix mode with --fix flag Machine Profiles: - Support for work/personal machine configurations - Profile loading: default.zsh -> profile.zsh -> local.zsh - DOTFILES_PROFILE env var or hostname-based detection - local.zsh gitignored for secrets Pre-commit hooks: - Bash/zsh syntax validation - Shellcheck linting - Secret detection - Install with: dotfiles hooks Documentation updated in CLAUDE.md.
New features: - Shell startup profiler (dotfiles profiler) with detailed breakdown - Aliases/functions cheatsheet generator (dotfiles cheatsheet) - Interactive setup wizard (dotfiles setup) with visual TUI - Secrets management using macOS Keychain (dotfiles secrets) - Modern Neovim configuration with lazy.nvim Neovim setup includes: - Catppuccin colorscheme with alternatives (Nord, TokyoNight) - Telescope fuzzy finder - nvim-tree file explorer - Treesitter syntax highlighting - LSP with Mason for server management - nvim-cmp autocompletion - Git integration (gitsigns, fugitive, lazygit) - Lualine statusline and bufferline Updated CLAUDE.md with documentation for all new features.
- Add macOS requirement check at script start - Remove IS_LINUX variable and related conditionals - Simplify detect_system() and check_prerequisites() - Update CLAUDE.md to reflect macOS-only support
Removed deprecated/legacy settings: - System Preferences → System Settings (macOS Ventura+ compatibility) - Sudden Motion Sensor (sms) - irrelevant for SSDs - Battery percentage menubar setting - now in Control Center - BezelServices keyboard backlight settings - deprecated - AppleFontSmoothing subpixel rendering - deprecated on Retina - QLEnableTextSelection - now default in Quick Look - EmptyTrashSecurely - removed in El Capitan, ineffective on SSDs Fixed performance issues: - Removed NSDisableAutomaticTermination (prevented RAM reclamation) - Removed contradictory IDEIndexDisable in Xcode defaults - Consolidated duplicate concurrent compile tasks setting All removed settings include explanatory comments for future reference.
- bin/dotfiles: Quote variables, use direct exit code checks - scripts/echos.sh: Fix argument quoting in echo statements - scripts/requirers.sh: Simplify PIPESTATUS patterns, use direct checks - macos/defaults.sh: Replace unicode curly quotes with ASCII quotes
- Add SC2119 to ignored warnings (ok function is designed for optional args) - Fix unicode quotes in macos/defaults-terminal.sh
In zsh, PATH is tied to the 'path' array. Use typeset -gU on the lowercase array version to properly deduplicate path-like variables.
In CI environments, brew shellenv may return empty output if HOMEBREW_PREFIX isn't properly set. Treat this as a skip rather than a failure since the actual dotfiles work on properly configured machines.
Audit and fix across 52 files covering security hardening, performance optimization, macOS defaults modernization, shell config cleanup, and Neovim/git configuration updates. **Shell & Performance:** - Replace subprocess checks with zsh $commands[] hash lookups - Cache brew shellenv, filter out path_helper subprocess - Fix variable quoting in all functions for injection safety - Restore Powerlevel10k as active prompt (keep Starship config dormant) - Restore homebrew Prezto module and .bindings sourcing - Fix LESS_TERMCAP_md undefined variable, curlhammer() undefined bot - Guard $HOME/.local/bin/env sourcing for fresh machines - Reduce syntax highlighters from 6 to 3 for faster startup **macOS Defaults (Sonoma/Sequoia research-backed):** - Remove broken: nvram boot sound, askForPassword, _FXShowPosixPathInTitle, expose-animation-duration, Simulator (Watch) symlink, Messages defaults - Migrate: wake-on-LAN to pmset, AppleKeyboardUIMode 3→2 - Version-guard spctl --master-disable for macOS 15+ - Add Safari Full Disk Access check (sandboxed since Catalina) - Remove deprecated: ConfigDataInstall, ShowSidebarInTopSites, IncludeInternalDebugMenu, DisableReplyAnimations - Fix missing ok calls in hot corners and Safari backspace setting - Suppress systemsetup stderr errors, add || true consistently - Update hot corners comment (remove Dashboard, add Quick Note) **Security:** - Fix unsafe git unstage alias (remove --hard) - Fix printf %q injection safety in dotfiles-secrets - Fix unsafe sh -c execution in dotfiles edit command - Replace curl+sudo get-pip.py with python3 -m ensurepip - Add SSH config backup, migrate ssh-add -K to --apple-use-keychain **Git & Neovim:** - Add zdiff3, histogram, autoSetupRemote, branch sort, column UI - Fix ksdiff to use PATH lookup, set autocorrect=20, add hooksPath - Migrate tsserver→ts_ls, vim.loop→vim.uv, which-key v3, trouble v3 - Remove duplicate Neovim options, update diagnostic.jump API **Repo Maintenance:** - Update Nord theme URLs from arcticicestudio to nordtheme - Update stevenblack-hosts submodule, remove zsh-autocomplete - Remove deprecated cask-fonts tap and duplicate Brewfile entries - Extend test suite to 113 tests (security, performance, modernization) - Harmonize shellcheck SC2119 exclusion across CI, hooks, and tests - Fix pre-commit hook: skip zsh scripts from bash checks, exclude self and test files from secrets check - Fix command dispatch for pass-through commands in bin/dotfiles - Pin Homebrew CI action to SHA, expand shellcheck coverage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename CLAUDE.md to AGENTS.md (symlink CLAUDE.md → AGENTS.md) and split the monolithic 477-line file into a 36-line root index with 8 topic files under docs/agents/. Resolves duplicate entries, contradictory package management guidance, and removes content the agent can discover itself. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f351150 to
20df065
Compare
- Replace &>> with >> 2>&1 in dotfiles-setup for bash compatibility (SC2004, SC2155, SC2024) - Fix unbalanced regex quotes in dotfiles-cheatsheet causing zsh parse error - Use full commit SHA for Homebrew/actions in CI workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete overhaul of the dotfiles repository adding development infrastructure, optimizing shell performance, modernizing macOS defaults for Sonoma/Sequoia, and performing a comprehensive audit across security, correctness, and maintainability.
71 files changed, 6039 insertions, 580 deletions across 12 commits.
New Infrastructure
Development Tooling
dotfiles test) — 113 tests covering syntax validation, cache generation, functions, aliases, environment, Prezto config, security fixes, performance optimizations, config modernization, and dead code cleanupdotfiles doctor) — Health checks for symlinks, submodules, shell config, Homebrew, caches, tools, Node.js, git, SSH; auto-fix with--fixdotfiles profiler) — Measures startup time, shows file-by-file breakdown, compares with/without cachesdotfiles cheatsheet) — Extracts and displays all aliases and functions with searchdotfiles secrets) — macOS Keychain-backed secret storage with export/importdotfiles setup) — Interactive TUI for bootstrapping new machinesbrew bundlemanifestCI/CD & Git Hooks
default.zsh→profile.zsh→local.zshloading orderNeovim Configuration
Shell Performance Optimization
Startup time reduced to 67ms (excellent):
compinitcall (Prezto handles it)path_helpersubprocess from brew shellenv cache$(command -v)subprocess checks with zsh$commands[]hash lookupstypeset -Ufor PATH deduplication (no awk subprocess)Security Hardening
unstagealias (removed--hardflag)printf %qinjection safety in dotfiles-secretssh -c "$DOTFILES_IDE"→ direct executioncurl+sudo get-pip.pywithpython3 -m ensurepipssh-add -K→--apple-use-keychainmacOS Defaults Modernization (Research-Backed)
All changes backed by deep research into Sonoma (14) and Sequoia (15) compatibility:
Removed (broken/obsolete)
nvram SystemAudioVolume/StartupMute— no-op on Apple SiliconaskForPassword/askForPasswordDelay— broken since macOS 10.13_FXShowPosixPathInTitle— broken on Sequoia (Finder title bar redesign)expose-animation-duration— unreliable since SierraSimulator (Watch).appsymlink — removed in Xcode 9defaults-messages.sh(entire file) —messageshelperdomain no longer honoredConfigDataInstall— deprecated since CatalinaShowSidebarInTopSites— Top Sites replaced by Start Page in Big SurIncludeInternalDebugMenu— non-functional since Safari 15+DisableReplyAnimations/DisableSendAnimations— broken since High Sierrasystemsetup -setwakeonmodem— obsolete (no modem hardware)Migrated
systemsetup→sudo pmset -a womp 0AppleKeyboardUIMode: value3→2(Sonoma/Sequoia)spctl --master-disable: version-guarded for macOS 15+ (requires manual confirmation on Sequoia)Added
2>/dev/null || trueonsystemsetupcommandsFixed
okcalls (3 in hot corners, 1 in Safari backspace setting)Git & Neovim Updates
Other Fixes
.bindingssourcing (keybindings were not loading)LESS_TERMCAP_mdundefined${yellow}variable → ANSI escapecurlhammer()calling undefinedbotfunction →echo$HOME/.local/bin/envsourcing for fresh machines.huskyrc(migrated to config/husky)bin/dotfilescommand dispatch for pass-through commandsfd()→finddir()to avoid shadowing fd binaryegrep→grep -E, backticks →$(),expr→ arithmeticTest Plan
./bin/dotfiles test --verbose)exec $SHELL./bin/dotfiles configure --defaultson a test machine to verify macOS defaults🤖 Generated with Claude Code