A modern, automation-first dotfiles repository that takes the pain out of development environment setup. Built for macOS with comprehensive testing, analytics, and zero-maintenance updates. Whether you're setting up a new machine or keeping your existing setup optimized, this repository handles the heavy lifting so you can focus on what matters: building great software.
# Clone the repository
git clone https://github.com/simeg/dotfiles.git dotfiles
cd dotfiles
# Run the complete setup
make setup
# Verify everything is working
make validate
- Zsh Configuration - Modern shell setup with znap plugin manager
- Neovim Setup - Modern Neovim configuration with Lazy.nvim
- Git Configuration - Optimized Git settings and aliases
- Starship Prompt - Fast and customizable shell prompt
- Custom Scripts - Useful bin scripts for development workflow
- Homebrew Integration - Automated package management
make setup # Complete dotfiles setup (symlinks, packages, validation)
make update # Update all components (git, packages, plugins)
make validate # Verify all configurations are working correctly
make test # Run complete test suite
make packages # Install and sync packages from Brewfile
make health # System diagnostics and health checks
make clean # Remove broken symlinks and temporary files
make deps # Check all dependencies are installed
make lint # Run shellcheck on all shell scripts
make help # Show all available commands
# Test variants
make test-quick # Quick validation tests only
make test-advanced # Advanced tests (performance + security)
make test-ci # CI-compatible tests (no symlink dependencies)
# Health diagnostics
make health-monitor # Real-time system monitoring dashboard
make health-analytics # Package usage and performance analytics
make health-profile # Shell startup performance profiling
make snapshot # Take system metrics snapshot
# Setup variants
make setup-minimal # Essential setup only (faster)
make install # β make packages
make symlink # Create symlinks only
make analytics # β make health-analytics
make profile # β make health-profile
βββ .config/ # Configuration files (mirrors ~/.config structure)
β βββ zsh/ # Zsh configuration files (moved to .config/zsh/)
β β βββ .zshrc # Main Zsh configuration
β β βββ .znap-plugins.zsh # Plugin definitions
β β βββ aliases.zsh # Command aliases
β β βββ exports.zsh # Environment variables
β β βββ functions.zsh # Custom functions
β β βββ misc.zsh # Miscellaneous config
β β βββ path.zsh # PATH modifications
β β βββ completions.zsh # Tab completion setup
β β βββ lazy-loading.zsh # Plugin lazy loading
β β βββ completions/ # Tab completion scripts
β βββ nvim/ # Neovim configuration with Lazy.nvim (moved to .config/nvim/)
β βββ starship/ # Starship prompt themes (moved to .config/starship/)
β β βββ themes/ # Available starship themes
β βββ atuin/ # Shell history sync configuration (moved to .config/atuin/)
βββ bin/ # Custom utility scripts
βββ git/ # Git configuration files
βββ install/ # Package installation files
β βββ Brewfile # Core Homebrew packages
β βββ Brewfile.mas # Mac App Store apps (auto-included, skipped in CI)
β βββ Brewfile.ci-minimal # Minimal packages for CI
β βββ macOS/ # macOS-specific configurations
βββ scripts/ # Management and setup scripts
β βββ install/ # Installation scripts
β β βββ brew.sh # Homebrew installer
β β βββ rust.sh # Rust toolchain installer
β β βββ zsh.sh # Zsh setup
β βββ setup.sh # Main setup script
β βββ update.sh # Update script
β βββ validate.sh # Configuration validator
β βββ symlink.sh # Symlink creator
Located in bin/
directory, these scripts enhance your development workflow:
backup
- Backup utilitycpwd
- Copy current working directory to clipboardfixup
- Interactive Git fixup commitsgcl
- Git clone utilitygforbm
- Git fetch and rebase from main branchgit-show
- Enhanced git show with formattingperf-dashboard
- Performance monitoring dashboardrssh
- Remote SSH utilitiessmart-cat
- Smartcat
that usesglow
for markdown filesspuri
- Python script for special URI handlingsquash
- Interactive Git commit squashingstarship-theme
- Easy starship theme switchersuper-amend
- Enhanced Git amend workflowsystem-monitor
- Real-time system monitoringuse-private-git
- Private Git configuration utility
For detailed information about all available commands and targets, see the Make Targets Documentation.
- Syntax highlighting - Real-time command syntax highlighting
- Auto-suggestions - Fish-like command suggestions from history
- History search - Enhanced history search with substring matching
- History sync - Cross-machine history sync with Atuin
- Node.js management - NVM with lazy loading for performance
- Fast and lightweight prompt with multiple themes
- Git status integration and detailed information
- Directory context and navigation indicators
- Performance metrics and command duration
- Easy theme switching with
starship-theme
command
This repository includes multiple starship themes and a convenient theme switcher:
See theme folder.
starship-theme list # List all available themes
starship-theme current # Show current active theme
starship-theme set minimal # Switch to minimal theme
starship-theme preview enhanced # Preview theme configuration
starship-theme backup # Backup current configuration
starship-theme restore # Restore from backup
# Add a new theme from an existing .toml file
starship-theme add mytheme ~/path/to/my-starship.toml
# Or manually copy to themes directory
cp my-theme.toml .config/starship/themes/
starship-theme set my-theme
Themes are stored in .config/starship/themes/
as .toml
files. Each theme
file should:
- Start with a descriptive comment (e.g.,
# π Minimal Theme
) - Be a valid starship configuration
- Include appropriate module settings
This dotfiles repository includes a comprehensive testing framework to ensure configuration integrity, performance monitoring, and security compliance.
# Run essential validation tests (recommended for development)
make test-quick
# Pre-commit validation (syntax + configuration checks)
make lint
# Full test suite (basic + CI + advanced tests)
make test
The advanced testing system provides three categories of validation:
π§ Configuration Validation
- Zsh modular configuration structure and syntax
- Neovim Lua configuration validation
- Git security settings and credential configuration
- Starship prompt theme validation
- Package management (Brewfile) validation
β‘ Performance Regression Testing
- Shell startup time monitoring with baseline tracking
- Memory usage regression detection
- Plugin load time analysis
- Automatic performance baseline creation
π Security Compliance Checks
- Intelligent secrets scanning (avoids false positives)
- File permissions security validation
- Shell security configuration audit
- Git security protocol verification
- Dependency source security analysis
# Individual test categories
make test-advanced # Run all advanced tests
./scripts/tests/test_advanced.sh config # Configuration validation only
./scripts/tests/test_advanced.sh performance # Performance regression tests
./scripts/tests/test_advanced.sh security # Security compliance checks
# Create performance baselines for future regression testing
./scripts/tests/test_advanced.sh baseline
The original validate.sh
script provides basic checks:
- β All symlinks are correctly created
- β Required tools are installed
- β Zsh plugins are loaded
- β Git configuration is set
- β Neovim configuration is working
- β PATH includes custom bin directory
Symlinks not working?
./scripts/symlink.sh # Recreate symlinks
Plugins not loading?
./scripts/update.sh --zsh-only # Update Zsh plugins
source ~/.zshrc # Reload configuration
Homebrew packages missing?
./scripts/update.sh --brew-only # Update packages
Neovim plugins not working?
./scripts/update.sh --nvim-only # Update Neovim plugins
This project is licensed under the MIT License - see the LICENSE file for details.
For sensitive environment variables (API keys, project IDs, etc.), use the private config file:
# Create private config file (not tracked by git)
touch ~/.config/zsh/private.zsh
chmod 600 ~/.config/zsh/private.zsh
# Add sensitive variables
echo 'export ANTHROPIC_VERTEX_PROJECT_ID="your-project-id"' >> ~/.config/zsh/private.zsh
echo 'export API_KEY="your-api-key"' >> ~/.config/zsh/private.zsh
The .zshrc
automatically sources ~/.config/zsh/private.zsh
if it exists.
This file should:
- Never be committed to version control
- Contain only sensitive environment variables
- Be created manually on each new machine during setup
- Be secured with proper file permissions:
chmod 600 ~/.config/zsh/private.zsh
- Private files are stored locally: All sensitive configs live in
~/.config/zsh/
on your machine - Automatic exclusion: A
.gitignore
file in~/.config/zsh/
prevents accidental commits - Machine-specific setup: You must create
private.zsh
on each new computer - No cloud sync: These files should NOT be synced to cloud storage or shared
# ~/.config/zsh/private.zsh - Examples of what belongs here:
export ANTHROPIC_VERTEX_PROJECT_ID="your-project-id"
export OPENAI_API_KEY="your-api-key"
export AWS_ACCESS_KEY_ID="your-aws-key"
export GITHUB_TOKEN="your-github-token"
export DATABASE_URL="your-db-connection-string"
# Work-specific configurations
export WORK_EMAIL="your.work@company.com"
export COMPANY_VPN_CONFIG="/path/to/company/vpn"
# Personal API keys and tokens
export PERSONAL_GITHUB_TOKEN="your-personal-token"
export HOMEBREW_GITHUB_API_TOKEN="your-brew-token"
When you set up dotfiles on a new computer, remember to:
-
Create the private config file:
touch ~/.config/zsh/private.zsh chmod 600 ~/.config/zsh/private.zsh
-
Add your sensitive variables:
echo 'export YOUR_API_KEY="your-actual-key"' >> ~/.config/zsh/private.zsh
-
Verify it's working:
source ~/.zshrc echo $YOUR_API_KEY # Should show your key
-
Confirm it's excluded from git:
git status # private.zsh should NOT appear in untracked files