Skip to content

dotfiles

Mathias Bynens's personal macOS shell config files and setup scripts, shared as a starting point.

Stars
31.5k
Forks
8.4k
Licence
MIT
Language
Shell
Last update
2.3 years ago
Type
Dev tool

No commits in over a year — check for forks or alternatives before adopting.

What it is

This is a collection of shell configuration files (dotfiles) that customize the terminal environment on macOS, plus a script called .macos that sets many system preferences. A bootstrap script copies these files into your home folder. People use it as a reference or starting point for setting up their own Mac and command line.

  • Copy the shell aliases and prompt setup into your own dotfiles
  • Run ./.macos on a new Mac to apply a set of system defaults
  • Use ~/.extra to keep private settings such as Git credentials out of the repository
  • Use ~/.path to add extra directories to your PATH

Great for

  • Developers on macOS who want to see how someone else sets up their shell
  • People setting up a new Mac who want a template to copy from and adapt
  • Anyone comfortable reading Bash and reviewing scripts before running them

Not ideal for

  • Non-technical users, because the scripts change system settings and shell behavior
  • People who want a turnkey tool without reviewing the code, since the author warns against using it blindly
  • Linux or Windows users, since the macOS defaults script is specific to macOS
Step-by-step guide: how to use dotfilesInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Git · Bash · macOS for the .macos and brew.sh scripts

    Clone the repository and run the bootstrap script

    git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && source bootstrap.sh
  2. 2

    Run it

    • Fork the repository and review the files before installing
    • Clone the repository and run source bootstrap.sh
    • Open a new terminal window to load the new settings
    • Optionally run ./.macos to apply macOS defaults
  3. 3

    Get the most out of it

    • Create a ~/.extra file for private settings such as Git identity
    • Create a ~/.path file to add directories to your PATH before feature checks
    • Run ./brew.sh to install the Homebrew formulae the dotfiles rely on
    • Fork the repository and remove the parts you do not want, as the README recommends

Downloads

Strengths

  • Clear structure, with separate files for aliases, paths, and macOS defaults
  • Supports local overrides through ~/.path and ~/.extra without forking
  • Long-running, widely starred project with an MIT license

Trade-offs

  • The author explicitly warns that settings are personal and should be reviewed and trimmed before use
  • Some features depend on Homebrew formulae, and the README says the dotfiles use a special Bash/Git completion version from Homebrew

How it compares

ProjectStarsTypeLevelUpdatedBest for
dotfiles (this)31.5kDev toolintermediate2.3 years agoDevelopers on macOS who want to see how someone else sets up their shell
chezmoi22.1kDev toolintermediate4 days agoPeople who use more than one computer and want their settings to match
inshellisense10.8kDev toolbeginner7 days agoDevelopers who spend a lot of time in the terminal and want suggestions for unfamiliar command options
autocomplete25.2kOtherintermediate1.5 years agomacOS developers who use zsh, bash or fish and want suggestions for common CLIs
zoxide40.4kDev toolbeginner4 days agoDevelopers who move between many project folders in a terminal
.tmux25.5kDev toolbeginner15 days agoDevelopers who already use tmux and want a better-looking, feature-rich starting config

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.