Personal macOS configuration files and development environment setup.
git clone https://github.com/andreivcodes/dotfiles.git ~/git/dotfiles
cd ~/git/dotfiles
./setup.sh- Brewfile: Declarative package management for Homebrew (CLI tools & applications)
- Shell Configuration: Performance-optimized .zshrc with Oh My Zsh, lazy loading, and AI CLI wrappers
- Zed Editor: Complete settings with AI agent profiles and custom formatters
- Development Environment: Node.js (via NVM), Rust, essential CLI tools
- Installation Scripts: Automated setup and symlink management
dotfiles/
├── README.md # This file
├── Brewfile # Homebrew package declarations (organized by category)
├── setup.sh # Main entry point for full setup
├── .gitignore # Files to exclude from git
├── installers/ # Setup scripts
│ ├── all.sh # Orchestrates all installation steps
│ ├── brew.sh # Installs Homebrew packages
│ ├── dev.sh # Sets up development environment (Node.js, Rust)
│ ├── dock.sh # Configures macOS Dock layout
│ └── timemachine-exclude.sh # Excludes dev directories from Time Machine
├── dotfiles/ # Configuration files
│ ├── dotfiles.sh # Creates symlinks for config files
│ ├── .zshrc # Zsh configuration (performance-optimized)
│ └── zed/
│ └── settings.json # Zed editor settings
├── preferences/ # macOS system preferences scripts
│ └── system.sh # Configures Finder, Dock, Trackpad, etc.
└── lib/ # Shared utility functions
└── utils.sh # Logging, progress tracking, error handling
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlightingThe setup.sh script provides a complete, automated installation:
# Clone and run full setup
git clone https://github.com/andreivcodes/dotfiles.git ~/git/dotfiles
cd ~/git/dotfiles
./setup.shThis will:
- Install all Homebrew packages and applications
- Set up Node.js (via NVM) and Rust development environments
- Configure macOS system preferences (Finder, Dock, Trackpad, etc.)
- Create symlinks for dotfiles (.zshrc, Zed config)
- Configure Dock layout with your applications
- Set up Time Machine exclusions for development directories
You can also run individual setup scripts:
# Install packages only
bash installers/brew.sh
# Set up development environment only
bash installers/dev.sh
# Configure system preferences only
bash preferences/system.sh
# Create dotfile symlinks only
bash dotfiles/dotfiles.sh
# Configure Dock layout only
bash installers/dock.sh
# Configure Time Machine exclusions only
bash installers/timemachine-exclude.sh- ⚡ Performance Optimized: Lazy loading for nvm, cargo, and rust (dramatically faster shell startup)
- 🤖 AI CLI Wrappers: Profile-based wrappers for Claude, Codex, and Gemini CLIs
- 📚 History Management: 100k command history with deduplication and sharing across sessions
- ⌨️ Git Aliases: Quick shortcuts for common git operations (gs, gc, gp, etc.)
- 🚀 Completion Caching: Daily completion cache refresh for faster shell startup
- 🎨 Oh My Zsh Integration: With carefully selected plugins for minimal performance impact
Use different profiles for personal and work contexts:
# Claude Code with different profiles
claude -u personal
claude -u work
# Codex with profiles
codex -u personal
codex -u work
# Gemini with profiles
gemini -u personal
gemini -u workEach profile maintains separate:
- Configuration directories
- API keys and credentials
- Chat history and context
Organized package declarations across categories:
- 📦 CLI tools and utilities (wget, ansible, act, etc.)
- 🤖 AI/ML CLIs (codex, gemini-cli)
- 💻 Development tools (nixpacks, orbstack, zed)
- 💬 Communication apps (Discord, Slack, WhatsApp, Signal, Telegram)
- 🔒 Security and VPN tools (1Password, Tailscale, Mullvad)
- 🎯 Productivity utilities (Rectangle, CleanShot, TablePlus)
Usage:
The Brewfile stays in the repository (not symlinked to home directory). Use it with:
# From the dotfiles directory
cd ~/git/dotfiles
brew bundle install # Install all packages
brew bundle check # Check what's not installed
brew bundle cleanup # Remove packages not in Brewfile
# Or from anywhere with --file flag
brew bundle install --file ~/git/dotfiles/Brewfile
brew bundle check --file ~/git/dotfiles/Brewfile
# Update Brewfile with current installations
cd ~/git/dotfiles
brew bundle dump --force- 🤖 Multiple AI Agent Profiles: Claude personal/work, Gemini personal/work
- 🎨 Custom Formatters: Prettier for JavaScript, TypeScript, and TSX
- 🏠 Ollama Integration: Local LLM support
- 📝 Git Integration: Git gutter and inline blame
- ⚙️ Terminal Settings: Integrated zsh terminal
- 🎨 Theme: System-aware theme switching (One Light/One Dark)
# Quick test
/usr/bin/time zsh -i -c exitExpected result with optimizations: ~0.05-0.15 seconds (vs 0.5-1.5s without lazy loading)
# Add this to the top of ~/.zshrc temporarily:
zmodload zsh/zprof
# Reload shell and check profile:
exec zsh
# Then run:
zprof# Update Homebrew and packages
brew update && brew upgrade
# Update Oh My Zsh
omz update
# Update Oh My Zsh plugins
cd ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && git pull
cd ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git pullAfter modifying files in your home directory, copy them back:
cp ~/.zshrc ~/git/dotfiles/dotfiles/.zshrc
cp ~/.config/zed/settings.json ~/git/dotfiles/dotfiles/zed/settings.json
# Then commit and push changesBefore making changes, back up your current dotfiles:
cp ~/.zshrc ~/.zshrc.backup.$(date +%Y%m%d)- Profile your shell to identify bottlenecks (see Performance Testing above)
- Check if nvm/cargo are truly lazy-loaded:
type nvmshould show a function, not a path - Consider removing unused Oh My Zsh plugins from the plugins array
- Run
brew doctorto check for Homebrew issues
Ensure the CLI tools are installed:
which claude # Should show /Users/yourusername/.local/bin/claude
which codex # Should show path to codex
which gemini # Should show path to geminiIf not found, reinstall via Homebrew:
brew install claude-code codex gemini-cliRebuild the completion cache:
rm -f ~/.zcompdump
exec zsh# Run diagnostics
brew doctor
# Fix common issues
brew cleanup
brew update
brew upgrade- 🔒 The
.gitignorefile prevents sensitive files from being committed - 🔐 AI CLI wrappers create separate profile directories to isolate credentials
- 🌐 Zed config uses HTTP for Ollama on local network - consider HTTPS for production
⚠️ always_allow_tool_actionsin Zed bypasses security prompts - adjust if needed- 🛡️ Profile wrappers ensure work and personal contexts remain separate
- Brewfile Best Practices
- Zsh Performance Optimization
- Oh My Zsh Performance Tips
- Shell Function Wrappers
- Zsh Best Practices
This is a personal dotfiles repository, but feel free to fork and adapt for your own use. If you find bugs or have suggestions, please open an issue.
MIT License - Feel free to use and modify as needed.
Note: This configuration is optimized for macOS. Some features may require adjustment for other operating systems.