My personal dotfiles for macOS, featuring a modern development environment with Neovim, custom shell configurations, and automated setup.
For a brand new Mac:
# 1. Clone this repository
git clone <your-repo-url> ~/.dotfiles
# 2. Navigate to the directory
cd ~/.dotfiles
# 3. Run the complete setup (this does everything!)
./setup.sh
# 4. Restart your terminal (or restart your Mac)
# 5. Setup Neovim plugins:
# a) Edit init.lua and comment out everything after 'require plugins'
# b) Open plugins.lua to trigger plugin installation:
nvim ~/.config/nvim/lua/plugins.lua
# c) Wait for plugins to install, then quit
# d) Uncomment the lines in init.lua
# e) Restart NeovimThat's it! Your development environment is ready.
- Prerequisites
- What's Included
- Installation
- What the Setup Does
- Available Commands
- Post-Installation
- Customization
- Troubleshooting
- Directory Structure
- macOS (this setup is designed for macOS)
- Stock zsh shell (default on new Macs)
- Internet connection (for downloading dependencies)
- Admin/sudo access (for changing default shell)
This dotfiles repository includes:
- Shell Configuration: Custom bash setup with aliases, functions, and enhanced CLI tools
- Neovim: Fully configured modern text editor with LSP, debugging, and plugins (installed from binary)
- Ghostty Terminal: Modern GPU-accelerated terminal emulator
- FZF: Fast fuzzy finder for command-line (installed from binary)
- Starship Prompt: Fast, customizable shell prompt
- Git Tools: Custom git scripts and configurations
- Homebrew Packages: Curated lists of CLI tools, applications, and utilities
- macOS Defaults: Sensible macOS system preferences
- GNU Tools: Modern versions of core utilities (grep, sed, ls, etc.)
From your home directory, clone this repository:
cd ~
git clone <your-repo-url> ~/.dotfiles
cd ~/.dotfilesNote: The repository MUST be cloned to ~/.dotfiles for the stow symlinks to work correctly.
The easiest way to set up everything:
./setup.shWhat this does:
- ✅ Installs
uv(required for the justfile to work) - ✅ Runs
./justfile setupwhich installs everything:- Homebrew
- Core tools (stow, coreutils, grep, gnu-sed)
- Fonts (Fira Code Nerd Font)
- Ghostty terminal
- Neovim
- NPM language servers
- Deploys dotfiles with stow
- Sets up shell
- Installs FZF
- Applies macOS defaults
This is a single command that handles the entire setup from start to finish!
If you prefer to run steps individually or need to resume from a specific point:
# First, install uv (required for justfile to work)
curl -LsSf https://astral.sh/uv/0.9.4/install.sh | env UV_NO_MODIFY_PATH=1 sh
sudo ln -sf "$HOME/.local/bin/uv" /usr/local/bin/uv
# See all available commands
./justfile --list
# See what the setup will do (dry run)
./justfile dry-run
# Run full setup (all steps)
./justfile setup
# Or run individual steps as needed
./justfile install-brew
./justfile install-fonts
./justfile install-ghostty
./justfile install-neovim
./justfile deploy-dotfiles
./justfile install-brewfile-home # Non-interactive home setup
./justfile install-brewfile-work # Non-interactive work setupBenefits of manual setup:
- ✅ Run individual steps independently
- ✅ Resume from where you left off if interrupted
- ✅ Clear documentation of what each step does
- ✅ Skip steps you don't need
- ✅ Non-interactive options available
After the setup completes:
- Close your terminal completely
- Optionally restart your Mac for all changes to take effect
- Open a new terminal (it should now be using bash instead of zsh)
The Neovim plugins require a special initialization process:
# 1. Open init.lua and comment out everything after 'require("plugins")'
nvim ~/.config/nvim/init.lua
# Add -- before each line after the plugins require statement
# 2. Open plugins.lua to trigger the plugin manager installation
nvim ~/.config/nvim/lua/plugins.lua
# Save the file (:w) and let the plugins install
# You'll see package manager activity in the background
# Wait for installation to complete, then quit (:q)
# 3. Re-open init.lua and uncomment the lines you commented in step 1
nvim ~/.config/nvim/init.lua
# 4. Restart Neovim - everything should now work!
nvimThe setup.sh script automates the entire setup process by first installing uv, then running ./justfile setup to complete all remaining steps. Here's a detailed breakdown:
The setup.sh script starts by installing uv:
- Installs
uv(Python package manager) to your system uvis required because the justfile usesuvxin its shebang- Symlinks
uvto/usr/local/bin/uvfor global access - Enables running the justfile directly with
./justfile(no need to installjustseparately) - Then automatically runs
./justfile setupto complete the installation
- Checks if FiraCode Nerd Font is already installed
- Downloads FiraCode Nerd Font v2.1.0 from GitHub
- Installs fonts to
~/Library/Fonts/ - Cleans up temporary files
- Checks if Homebrew is installed
- Installs Homebrew if not present
- Configures appropriate paths for Intel (x86_64) or Apple Silicon (arm64) Macs
Installs critical utilities needed for the bootstrap process:
stow- Symlink manager for dotfilescoreutils- GNU core utilities (better ls, cp, etc.)grep- GNU grep (more features than BSD grep)gnu-sed- GNU sed (different syntax than BSD sed)
- Scans each directory in the dotfiles repo
- WARNING: Removes existing files/directories that would conflict with stow
- Uses GNU Stow to create symlinks from ~/.dotfiles/* to ~/
- Files go directly to home directory
- Subdirectories (like
.config) are preserved in structure - This step is destructive - backup your existing dotfiles first!
- Creates
~/.config/alacritty/themes/directory - Downloads Gruvbox dark and light themes
- Prompts you to select home or work Brewfile
- Installs all packages, apps, and tools defined in the selected Brewfile
- This includes: CLI tools, GUI applications, fonts, VS Code extensions, etc.
- Runs
brew cleanupto remove old versions
- Adds Homebrew's bash to
/etc/shells(requires sudo) - Changes your default shell from zsh to bash
- Uses the modern Homebrew-installed bash (not the old macOS system bash)
- Parses your Neovim LSP config
- Extracts npm-based language server requirements
- Installs them globally via npm
- Provides LSP support for TypeScript, JavaScript, etc.
- Downloads Ghostty v1.2.2 from official releases
- Installs to
/Applications - Creates symlink to
/usr/local/bin/ghosttyfor CLI access
- Downloads Neovim v0.10.3 from GitHub releases
- Detects your Mac architecture (Apple Silicon or Intel)
- Installs to
/usr/local/nvim - Creates symlink to
/usr/local/bin/nvim - Removes quarantine attributes to avoid "unknown developer" warnings
- Downloads FZF v0.66.0 binary from GitHub releases
- Installs to
~/.local/bin/fzf - Creates symlink to
/usr/local/bin/fzf - Note: Shell keybindings need to be configured separately in your shell config
- Runs
osxdefaults.shscript - Sets sensible macOS system preferences
- Customizes Finder, Dock, and other system behaviors
The justfile provides these individual commands:
./justfile # Show all available commands
./justfile --list # Same as above
./justfile dry-run # See what the setup will do without running it
# Setup Commands
./justfile setup # Run complete setup (all steps)
./justfile install-brew # Install Homebrew only
./justfile install-brewfile # Install brewfile (interactive prompt)
./justfile install-brewfile-home # Install home brewfile (non-interactive)
./justfile install-brewfile-work # Install work brewfile (non-interactive)
./justfile install-core-tools # Install stow, coreutils, grep, gnu-sed
./justfile install-fonts # Install Fira Code Nerd Font
./justfile install-ghostty # Install Ghostty terminal
./justfile install-neovim # Install Neovim from binary
./justfile install-npm-lsp-servers # Install NPM language servers for Neovim
./justfile deploy-dotfiles # Deploy dotfiles with stow (⚠️ removes existing files)
./justfile setup-shell # Set Homebrew bash as default shell
./justfile setup-fzf # Install FZF binary
./justfile macos-defaults # Apply macOS system defaults
# Maintenance Commands
./justfile update-brew # Update all Homebrew packages
./justfile check-brewfile # Check brewfile status without installing
./justfile clean # Clean up downloaded files and brew cache
./justfile unstow-dotfiles # Remove all stow symlinks (reverse deployment)Common Workflows:
# New machine setup (one command does everything!)
./setup.sh
# Update dotfiles on existing machine
./justfile deploy-dotfiles
# Add new packages to brewfile, then install them
./justfile install-brewfile-home
# Update all packages
./justfile update-brew
# Remove dotfiles before switching to different config
./justfile unstow-dotfilesAfter completing the installation and restarting:
# Check that bash is your default shell
echo $SHELL
# Should output: /opt/homebrew/bin/bash (or /usr/local/bin/bash on Intel)
# Check that stow worked
ls -la ~ | grep -E "\.bashrc|\.aliases"
# You should see symlinks pointing to ~/.dotfiles/
# Test Neovim
nvim --version
# Should show Neovim version infoDon't forget to set up your Git identity:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"- Shell: Your terminal now uses bash with custom aliases and functions
- Aliases: Type
aliasto see all custom shortcuts defined inshell/.aliases - Neovim: Launch with
nvim- explore the leader key mappings (likely<space>) - Starship: Your prompt is now powered by Starship with rich Git info
- FZF: Press
Ctrl+Rfor fuzzy command history search
Since all dotfiles are symlinked, you can edit them in place:
# Edit shell aliases
nvim ~/.aliases # Actually editing ~/.dotfiles/shell/.aliases
# Edit Neovim config
nvim ~/.config/nvim/init.lua # Actually editing ~/.dotfiles/nvim/.config/nvim/init.luaChanges are automatically reflected in the git repository!
To add new Homebrew packages:
# Edit the appropriate Brewfile
nvim ~/.dotfiles/brewfiles/home_brewfile # or work_brewfile
# Add packages under the appropriate section:
# brew "package-name" # for CLI tools
# cask "app-name" # for GUI applications
# mas "App Name", id: 123 # for Mac App Store apps
# Install the new packages
brew bundle --file=~/home_brewfileTo add a new directory to your dotfiles:
cd ~/.dotfiles
mkdir new-tool
# Add your config files to new-tool/
# Run bootstrap.sh again, or manually stow:
stow new-toolProblem: Script exits with errors
Solutions:
-
Ensure you have an internet connection
-
Check you have enough disk space
-
Make sure you have admin privileges (sudo access)
-
Try running individual commands to isolate the issue:
./justfile install-brew ./justfile install-core-tools # etc... -
If
setup.shfails during the uv installation, you may need to manually installuvfirst
Problem: "WARNING: in stow directory, stow conflicts with existing target"
Solution:
# Manually remove the conflicting file
rm ~/.conflicting-file
# Run deploy again
./justfile deploy-dotfilesProblem: Permission denied errors during brew install
Solutions:
# Fix Homebrew permissions
sudo chown -R $(whoami) $(brew --prefix)/*Problem: Neovim opens but plugins don't work
Solutions:
-
Make sure you followed the Neovim plugin setup steps exactly
-
Try manually installing the plugin manager:
# For lazy.nvim (most common) git clone https://github.com/folke/lazy.nvim.git \ ~/.local/share/nvim/lazy/lazy.nvim
-
Open Neovim and check for errors:
:checkhealth -
Reinstall plugins:
:Lazy sync
Problem: Terminal still opens with zsh after restart
Solutions:
-
Manually change shell:
chsh -s $(brew --prefix)/bin/bash -
Restart terminal completely (not just new tab)
-
Check System Preferences → Users & Groups → Advanced Options
Problem: Neovim LSP features not working
Solutions:
# Reinstall npm language servers
cd ~/.dotfiles
grep -E "npm" nvim/.config/nvim/lua/config/nvim-lspconfig.lua | \
sed 's/-- npm i -g //g' | \
xargs npm i -g
# Check LSP status in Neovim
:LspInfo~/.dotfiles/
├── setup.sh # Complete setup script (run this!)
├── justfile # Modern task runner with all setup commands
├── osxdefaults.sh # macOS system preferences
├── README.md # This file
├── bootstrap.sh # [DEPRECATED] Legacy installation script
├── brewfiles/ # Homebrew package definitions
│ ├── home_brewfile # Personal machine packages
│ └── work_brewfile # Work machine packages
├── git/ # Git configurations and scripts
│ └── better-branch.sh # Custom git utilities
├── nvim/ # Neovim configuration
│ └── .config/nvim/
│ ├── init.lua # Main Neovim config
│ └── lua/ # Lua modules and plugins
├── scripts/ # Custom utility scripts
├── sesh/ # Session management configs
├── shell/ # Shell configurations
│ ├── .aliases # Command aliases
│ ├── .bashrc # Bash configuration
│ └── .config/ # Shell-related configs
├── starship/ # Starship prompt config
└── vim/ # Vim configuration (if used)
This is a personal dotfiles repository, but feel free to:
- Fork it and adapt it to your needs
- Submit issues if you find bugs
- Suggest improvements via pull requests
- One Command Setup: Simply run
./setup.shfor complete installation - it handles everything including uv installation and running the justfile - No Just Installation Needed: The justfile uses
uvxin its shebang to automatically fetch and runjust, so you don't need to install it separately - Backup First: If you have existing dotfiles, back them up before running setup - the deploy step removes conflicting files!
- Review Brewfiles: Check the Brewfile contents before installation - they install a lot of software
- Internet Required: Initial setup downloads several GB of tools and applications
- Time Required: First-time setup takes 30-60 minutes depending on your internet speed
- Shell Change: The setup changes your shell to bash - if you prefer zsh, skip that step or use individual justfile commands instead of setup.sh
- Bootstrap.sh Deprecated: The original
bootstrap.shscript is deprecated in favor of the streamlinedsetup.shworkflow
Last Updated: October 2025