My personal collection of configuration files and development environment setup.
This repository contains my carefully curated dotfiles, focusing on a modern, fast, and productive development environment with consistent coding styles and comprehensive tooling.
- Fast shell startup with lazy loading
- Optimized completion system
- Smart alias reminder system
- UV-based Python environment management
- Automatic environment activation - Intelligent system that reads
pyproject.toml
and auto-creates/activates venv with correct Python version - Pre-commit compatibility - Ensures correct Python version for hooks
- Team consistency - Same Python version across all developers
- Quick project setup functions
- Modern package management aliases
- Comprehensive git aliases
- Conventional commit helpers
- Advanced git functions
- Support for npm, yarn, and pnpm
- Lazy-loaded NVM for performance
- Common development task aliases
- eza - Better
ls
replacement - zoxide - Smart
cd
command - ripgrep - Fast text search
- fzf - Fuzzy finder integration
- starship - Modern prompt
- ZSH built-in correction - Command typo correction (setopt CORRECT)
- EditorConfig - Consistent coding styles across editors
- Enhanced readline - Better shell input handling
- Global Git ignore - Project-agnostic ignore patterns
- Brewfile - Reproducible package installations
- Update scripts - Automated maintenance utilities
After installation, you'll have:
- Colorful prompt with git status, language versions, and icons
- Syntax highlighting in terminal commands
- Icons in file listings (with eza)
- Fast shell startup (~50-100ms)
- Smart directory jumping with
z
command - Intelligent tab completion
z <directory>
- Jump to frequently used directoriesfcd
- Fuzzy find and cd to directoryweather
- Get weather informationserve
- Start local HTTP serverbackup <file>
- Create timestamped backupsextract <archive>
- Universal archive extractor
- Auto-environment activation when entering Python projects
pyrun <command>
- Smart uv run/uvx wrapperpynew <project>
- Create new Python project
- Short aliases:
gs
,ga
,gc
,gp
- Conventional commit helpers
- Better diff and log output
Note: Secrets management is completely optional. The dotfiles work perfectly without any secrets configuration.
Secure SOPS + age encryption with automatic shell integration for storing API keys, tokens, etc.
secrets edit
- Securely edit secrets (auto-encrypts on save).secrets show
- Display decrypted secrets in the current terminal.refresh-secrets
- Force-updates the secrets cache across all terminals. (Useful if yousecrets edit
in one window and want to use the new values in another immediately).
- Generate age key:
age-keygen -o ~/.config/sops/age/keys.txt
- Store the key safely (password manager recommended)
- Secrets auto-decrypt on shell startup (5-7ms overhead)
- If no secrets file exists, this feature is automatically skipped
- Version controlled - Scripts in
bin/
directory tracked with dotfiles - Global availability - Automatically added to PATH
- Team sharing - Custom tools shared across team members
- Complete settings tracking - Both main and local Claude Code configuration
- Hooks management - Notification scripts and custom integrations
- Permissions tracking - Tool permissions version controlled
- Team consistency - Shared Claude configuration across developers
- Automatic setup - All settings configured on new machines
- Docker and docker-compose aliases
- Container management shortcuts
- System monitoring tools
Before installing these dotfiles, ensure you have:
- macOS (tested on macOS 12+)
- Terminal access (Terminal.app, iTerm2, Warp, etc.)
- Admin privileges (for installing development tools)
- Git (usually pre-installed; verify with
git --version
)
- Nerd Font for full icon support (automatically installed via setup script)
- iTerm2 or modern terminal for best experience
If you're not already using zsh (default on macOS 10.15+):
# Check current shell
echo $SHELL
# Switch to zsh if needed (usually not required on modern macOS)
chsh -s /bin/zsh
-
Clone this repository:
git clone https://github.com/ashwch/dotfiles ~/dotfiles cd ~/dotfiles
-
Make the setup script executable and run it:
chmod +x setup.sh ./setup.sh
This single script will:
- Install Command Line Tools (if needed)
- Install Homebrew (if needed)
- Install all required dependencies
- Create symlinks for your dotfiles
- Set up development tools
Note: If Command Line Tools aren't installed, the script will prompt you to install them first, then re-run the script.
-
Restart your terminal and enjoy!
After installation, verify everything is working correctly:
echo $SHELL
# Should output: /bin/zsh
Your terminal should now show a colorful prompt with:
- Current directory
- Git branch (when in a git repository)
- Language versions (Python, Node.js, etc.)
- Command execution time
# Git aliases
gs # Should run 'git status'
ga . # Should run 'git add .'
# Navigation
ll # Should show detailed file listing with icons
z # Should show zoxide help (smart cd)
# Python (if you have Python projects)
cd /path/to/python/project
# Should auto-activate Python environment if pyproject.toml exists
# Test shell startup time (should be under 100ms)
time zsh -i -c exit
# Check modern CLI tools
eza --version # Better ls
zoxide --version # Smart cd
fzf --version # Fuzzy finder
rg --version # ripgrep
If you already have the dependencies and want to just symlink the dotfiles:
# Backup existing configs
cp ~/.zshrc ~/.zshrc.backup
cp ~/.gitconfig ~/.gitconfig.backup
# Create symlinks
ln -sf ~/dotfiles/.zshrc ~/.zshrc
ln -sf ~/dotfiles/.gitconfig ~/.gitconfig
ln -sf ~/dotfiles/.fzf.zsh ~/.fzf.zsh
ln -sf ~/dotfiles/.editorconfig ~/.editorconfig
ln -sf ~/dotfiles/.inputrc ~/.inputrc
# Config directory files
mkdir -p ~/.config/git
ln -sf ~/dotfiles/.config/starship.toml ~/.config/starship.toml
ln -sf ~/dotfiles/.config/git/ignore ~/.config/git/ignore
# Install packages from Brewfile
brew bundle --file=~/dotfiles/Brewfile
# Reload shell
source ~/.zshrc
z <dir>
- Smart cd (zoxide)..
,...
- Navigate up directoriesfcd
- Fuzzy find directory
pyrun
- Smart uv run/uvxpynew
- Create new Python projectactivate
- Activate virtual environment
The shell automatically manages Python environments using auto-uv-env:
- Detects Python projects via
pyproject.toml
- Extracts required Python version from project config
- Creates virtual environments with correct Python version
- Activates on directory entry, deactivates on exit
- Optimized for performance (~0ms for non-Python directories)
gs
- git statusga
- git addgc
- git commitgp
- git pushgconv
- Conventional commits
ni
- npm installnr
- npm runnd
- npm run dev
serve
- Quick HTTP serverweather
- Get weather infobackup
- Backup files with timestampextract
- Universal archive extractor
Custom scripts are stored in bin/
and automatically available:
- Add your own scripts to
~/dotfiles/bin/
for version control
The configuration includes an intelligent reminder system that suggests shorter aliases when you use longer commands:
$ git status
💡 Tip: You can use 'gs' instead of 'git status'
show_aliases
- Display all available aliasesadd_alias
- Add new aliases with auto-remindersvalidate_aliases
- Check alias functionality
- Environment & Path - XDG directories, language settings
- ZSH Options - History, completion, navigation settings
- Tool Configurations - Python, Node.js, Git setups
- Aliases & Functions - Productivity shortcuts
- Modern Tools - Integration with CLI utilities
- Key Bindings - Custom keyboard shortcuts
The scripts/
directory contains helpful maintenance utilities:
- update-dotfiles - Updates packages, Brewfile, and pulls latest dotfiles
./scripts/update-dotfiles
Add machine-specific settings to:
~/.zshrc.work
- Work-specific configuration (non-secrets)
add_alias <name> <command>
- zsh - Shell
- starship - Prompt
- uv - Python package manager
- eza - Better ls
- zoxide - Smart cd
- fzf - Fuzzy finder
- ripgrep - Fast search
- fd - Better find
- bat - Better cat
- ZSH built-in correction - Command typo correction (setopt CORRECT)
brew install eza zoxide fzf ripgrep fd bat starship
brew install --cask font-fira-code-nerd-font
# If you get permission denied
chmod +x setup.sh
./setup.sh
# Manually install Xcode Command Line Tools
xcode-select --install
# Then re-run setup
./setup.sh
# If brew command not found after installation
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Check if starship is installed
starship --version
# If not installed
brew install starship
# Restart terminal
- Install a Nerd Font (setup script does this automatically)
- Configure your terminal to use the Nerd Font
- For iTerm2: Preferences → Profiles → Text → Font
# Check startup time
time zsh -i -c exit
# If over 200ms, check for conflicting configurations
mv ~/.zshrc.local ~/.zshrc.local.backup # If it exists
# Check if auto-uv-env is installed
auto-uv-env --version
# Verify pyproject.toml has requires-python
cat pyproject.toml | grep requires-python
- Check the alias reminder system: Type long commands and look for suggestions
- Review available aliases: Run
show_aliases
- Check tool versions: Use
tool --version
for specific tools - Reset to defaults: See uninstall instructions below
To remove these dotfiles and restore your previous configuration:
# The setup script creates backups with timestamps
ls ~/dotfiles-backup-*
# Restore from most recent backup
cp ~/dotfiles-backup-YYYYMMDD-HHMMSS/.zshrc ~/.zshrc
cp ~/dotfiles-backup-YYYYMMDD-HHMMSS/.gitconfig ~/.gitconfig
# ... restore other files as needed
# Remove dotfile symlinks
rm ~/.zshrc ~/.gitconfig ~/.fzf.zsh ~/.editorconfig ~/.inputrc
rm ~/.config/starship.toml ~/.config/git/ignore
# Remove Claude Code settings (if you don't want to keep them)
rm -rf ~/.claude
# Remove Homebrew packages (only if you don't need them for other projects)
brew uninstall eza zoxide fzf ripgrep fd bat starship uv
brew uninstall --cask font-fira-code-nerd-font
# Switch back to default shell if needed
chsh -s /bin/bash
# Or keep zsh but with minimal configuration
echo "# Minimal zsh config" > ~/.zshrc
MIT License - Feel free to use and modify as needed.