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 and lazy loading
- Zed Editor: Complete settings with AI agent profiles and custom formatters
- AI CLI Profiles: Per-profile configuration for Codex, Claude Code, and OpenCode
- 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
β βββ codex/ # Codex CLI profile configs
β βββ claude/ # Claude Code profile configs
β βββ opencode/ # OpenCode profile configs
βββ 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, AI CLI profiles)
- 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)
- π 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:
# Codex
codex -u personal
codex -u work
# Claude Code
claude -u personal
claude -u work
# OpenCode
opencode -u personal
opencode -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, opencode)
- π» 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- π€ AI Agent Integration: Codex agent server support
- π¨ Custom Formatters: Prettier for JavaScript, TypeScript, and TSX
- π 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 pullThe dotfiles are symlinked to your home directory, so changes made in ~/.zshrc or ~/.config/zed/ are automatically reflected in the repository. Just commit and push:
cd ~/git/dotfiles
git add -A && git commit -m "Update dotfiles"
git pushBefore 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 codex # Should show path to codex
which claude # Should show path to claude
which opencode # Should show path to opencodeIf not found, install:
# Codex
npm install -g @openai/codex
# Claude Code
curl -fsSL https://claude.ai/install.sh | bash
# OpenCode
brew install anomalyco/tap/opencodeRebuild 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
β οΈ 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.