My macOS dotfiles for Zsh.
Note: Installation of Oh My Zsh is not optional. Everything else listed
below can be opted-out of.
- Installs Oh My Zsh with custom exports, aliases, and paths.
- Loads a selection of omz plugins and custom functions.
- Installs custom "dotfiles":
- Installs Homebrew, volta & latest version of node, composer & latest version of php
- Installs selection of brew formulae & node packages
- Runs
brew update,brew upgradeandbrew cleanup - Optionally set custom macOS defaults with
--configure-macosflag - Optionally install Applications via
brew caskwith--install-casksflag
This install is intended for macOS and requires the Xcode Command Line Tools.
It may overwrite existing dotfiles in $HOME (and potentially .vim-related files), so skim install.sh first if you have an existing setup.
curl https://raw.githubusercontent.com/codfish/dotfiles/main/install.sh | bashImportant
If you're provisioning a new machine, you can also apply my macOS defaults (see bin/macosdefaults) and install the optional GUI apps (see lib/brew):
curl https://raw.githubusercontent.com/codfish/dotfiles/main/install.sh | bash -s -- --configure-macos --install-casksIf you fork this repo and want the installer to pull from your fork:
DOTFILES_REPO=yourhandle/dotfiles curl https://raw.githubusercontent.com/codfish/dotfiles/main/install.sh | bashOr just update the default value of DOTFILES_REPO in your fork and install from your repo.
After running the installation script on a new machine, there are several manual steps to complete the setup. These are personal preferences and may differ for your setup.
- 1Password / SSH
- Login to 1Password
- Update 1Password settings & enable SSH key management (for git authentication)
- Create development directory & test 1Password SSH agent is working
mkdir ~/Sites git clone git@github.com:codfish/semantic-release-action.git ~/Sites/semantic-release-action
- Cloud sync + shell config
- Login to Dropbox
- Once Dropbox syncs, symlink your private zsh configuration:
ln -s ~/Dropbox/configfiles/zshrc ~/.zshrc.before exec zsh
- Login to Google Drive
- Open Alfred
- Activate Powerpack license
- Update settings sync to point to Dropbox
- Setup Code Editors
- Sign into VS Code and enable Settings Sync
- In Cursor, import settings & extensions from VS Code
- Todoist
- Sign into Todoist
- Update Desktop settings to change keyboard shortcuts as needed
- AI CLI logins
claude login codex gemini
Run the dotfiles command:
dotfilesYou should run the update when:
- You make a change to
~/.dotfiles/git/gitconfig(the only file that is copied rather than symlinked). - You want to pull changes from the remote repository.
- You want to update Homebrew formulae and Node packages.
Options:
-h, --help |
Help |
-l, --list |
List of additional applications to install |
--no-packages |
Skip package (brew/node/etc) updates |
--no-sync |
Skip pulling from the remote repository |
--configure-macos |
Configure macOS settings programatically |
--install-casks |
Install mac apps via brew cask (won't install/update if it's already present) |
These dotfiles essentially wrap Oh My Zsh. When you install the dotfiles, Oh My Zsh will also get installed for you directly into the ~/.dotfiles directory.
$ZSHwill be~/.dotfiles/oh-my-zsh$ZSH_CUSTOMwill be~/.dotfiles/oh-my-zsh-custom- Opinionated set of plugins are loaded
- Everything is configurable if you want to change things
- aws
- git
- iterm2
- history-substring-search
- z
- GNU core utilities
- ack
- awscli
- coreutils
- deno
- git
- go
- heroku
- jq
- MongoDB
- MySQL
- nginx
- nvm
- php
- python
- rbenv (and ruby-build)
- rsync (latest version, rather than the out-dated macOS installation)
- tmux
- wget
- Alfred 4
- AppCleaner
- Brave Browser
- CloudApp
- Docker Desktop
- Express VPN
- Google Chrome
- Google Drive
- iTerm2
- Notion
- Postman
- Slack
- Spotify
- Visual Studio Code
- zoom.us
Custom macOS settings can be applied during the dotfiles process. You'll be prompted before this happens so you can say no.
They can also be applied independently by running the following command:
macosdefaultsAny private and custom Bash commands and configuration should be placed in a
~/.zshrc.before or ~/.zshrc.after file. These files will not be under
version control or committed to a public repository. If either or both exists,
they will be sourced for inclusion in .zshrc.
~/.zshrc.before: Sourced beforeoh-my-zsh.shis loaded, therefore allowing you to effect what happens whenoh-my-zsh.shruns, without changing any tracked files. Some examples would be theZSH_THEMEor specific Oh My Zsh plugin configurations.~/.zshrc.after: Sourced afteroh-my-zsh.shis loaded. You can override anything that was set byoh-my-zsh.sh.
Here is an example ~/.zshrc.before:
# PATH exports
PATH=$PATH:~/.gem/ruby/1.8/bin
export PATH
# Git credentials
# Not under version control to prevent people from
# accidentally committing with your details
GIT_AUTHOR_NAME="Chris O'Donnell"
GIT_AUTHOR_EMAIL="chris@example.com"
# Set the credentials (modifies ~/.gitconfig)
git config --global user.name "$GIT_AUTHOR_NAME"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Work Machine Aliases
alias web="cd ~/Sites/company/web"
ZSH_THEME="amuse"Here is an example ~/.zshrc.after:
# override something
alias ll="ls -aGlFh"Note: Because the dotfiles/gitconfig file is copied to ~/.gitconfig, any private
git configuration specified in ~/.zshrc.before or ~/.zshrc.after will not be committed to
your dotfiles repository.
Inspiration and code was taken from many sources, including:
- @necolas (Nicolas Gallagher) [https://github.com/tejr/dotfiles] (https://github.com/necolas/dotfiles)
- @mathiasbynens (Mathias Bynens) https://github.com/mathiasbynens/dotfiles