Personalized shell environment, forked from Zach Holman's dotfiles.
This setup focuses on performance and maintainability while leveraging the best parts of the Oh-My-Zsh ecosystem.
- Static File Sourcing (
zsh-rebuild): Instead of dynamically globbing for.zshfiles on every startup, azsh-rebuildscript generates a static index (~/.zsh_index.zsh), drastically reducing I/O overhead. - Antidote for Plugins: Replaced the full Oh-My-Zsh framework with Antidote. This allows loading only necessary OMZ plugins (like
git,docker, etc.) without the overhead of the entire framework. Plugins are statically compiled into~/.zsh_plugins.zshfor near-instant startup. - Optimized Autocompletion (
compinit): We usecompinit -Cfor rapid startup, only performing a full security and timestamp check (compinit) once every 24 hours in the background. - Mise for Tooling: Replaced
nvmwith Mise. Mise is written in Rust and handles tool versions (Node, Python, Go) without slowing down every shell session. - Homebrew Prefix Caching: The Homebrew installation path is cached in
$BREW_PREFIXonce during startup, avoiding expensive subshell calls like$(brew --prefix)throughout the configuration. - Optimized Loading Order: Shell initialization is carefully sequenced: Environment -> PATH ->
compinit-> Plugins -> Aliases. Initializingcompinitbefore plugins ensures thatcompdefis always available when plugins need it.
-
Prompt: Uses Pure for a minimal, fast, and informative prompt.
-
Package Management: Three
Brewfiles at the root track Homebrew formulas and casks:Brewfile— baseline packages installed on every MacBrewfile.personal— packages for the personal Mac onlyBrewfile.work— packages for the work Mac only
The context is detected automatically: if
$USER == "fran", the personal profile is applied; otherwise the work profile is used. -
Automatic Caching: Dynamic completions (for tools like
fzfordocker) are cached locally to minimize startup lag.
git clone https://github.com/francoiskha/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
script/bootstrapThe bootstrap script will link your configuration files and sync all dependencies via brew bundle.
Add any Zsh plugin (from GitHub or Oh-My-Zsh) to zsh/plugins.txt and run zsh-rebuild to regenerate the static plugin bundle.
When adding new .zsh files (aliases, paths, completions) to the .dotfiles directory, run zsh-rebuild to update the static source index.
Add new Homebrew packages or Mac apps to the appropriate Brewfile:
Brewfilefor packages needed on every MacBrewfile.personalfor packages specific to the personal MacBrewfile.workfor packages specific to the work Mac
You can then sync your system by running:
dotfilesdot(This is an alias for bin/dotfilesdot which updates Brew and runs brew bundle).
Put your sensitive environment variables (API keys, private tokens) in ~/.localrc. This file is sourced by Zsh but is not tracked by Git.
If you see errors related to completions, ensure $ZSH_CACHE_DIR (defined in zshrc.symlink) is writable. The system automatically creates this in your home cache directory.
Based on Holman's dotfiles. Theme: Pure. Plugin Manager: Antidote. Version Manager: Mise.