Skip to content
 
 

Repository files navigation

alfasin dotfiles

Personal macOS dev environment — zsh config, git aliases, and a Mac bootstrap script.

What's in here

File Purpose
.zsh_extras.sh Shell prompt, aliases, and utility functions — source this from ~/.zshrc
.gitconfig Git aliases, colors, and URL shorthands
.gitignore Global gitignore
.gitattributes Global gitattributes
.inputrc Readline settings (case-insensitive completion, smart history search)
.vimrc / .vim/ Vim config
.wgetrc wget defaults
.hushlogin Suppress the "Last login" message in new terminal tabs
setup.sh Full Mac dev environment bootstrap (see below)

Setup on a new Mac

git clone https://github.com/alfasin/dotfiles.git ~/dev/dotfiles

Shell config

Add to the bottom of ~/.zshrc:

[ -f "$HOME/dev/dotfiles/.zsh_extras.sh" ] && source "$HOME/dev/dotfiles/.zsh_extras.sh"

This gives you:

  • A clean prompt showing current directory and git branch (with * when there are uncommitted changes)
  • Navigation aliases (.., ..., ....)
  • ll, la, lsd — ls shortcuts
  • c — pipe anything into it to strip trailing newline and copy to clipboard
  • mkdmkdir + cd in one step
  • calc — terminal calculator (calc 3.14 * 2)
  • digga — all DNS records for a domain
  • getcertnames / opensslcheckexpiration — TLS cert inspection
  • diff — uses git's color-word diff instead of plain diff
  • And more — see the file for the full list

Git config

Copy or symlink .gitconfig to ~/.gitconfig. Notable aliases:

Alias What it does
git l Pretty graph log (last 20 commits)
git go <branch> Create or switch to branch
git reb 3 Interactive rebase last N commits
git fb <sha> Find branches containing a commit
git fc <string> Find commits that added/removed a string
git fm <text> Find commits by message
git di 2 Diff against N revisions back

URL shorthand — clone with gh: instead of the full GitHub URL:

git clone gh:alfasin/dotfiles

Bootstrap a new Mac from scratch

setup.sh is an idempotent bootstrap for a fresh Mac. It installs everything needed to get a dev environment running. Safe to re-run — each step checks before acting. A failed item is recorded and skipped without stopping the rest.

cd ~/dev/dotfiles && zsh setup.sh

What it installs:

  • Xcode Command Line Tools
  • Homebrew
  • CLI tools: git, gh, awscli, nvm, uv, ripgrep, fd
  • GUI apps: Warp, VS Code, OrbStack, Bitwarden, pgAdmin 4, Alfred, SizeUp
  • Node LTS (via nvm)
  • Claude Code + plugins (superpowers, feature-dev, code-review, code-simplifier, typescript-lsp)

After it finishes, a few manual steps remain (printed at the end):

  • Restart the terminal
  • Open OrbStack once to finish VM backend setup
  • gh auth login
  • Sign into Bitwarden
  • Copy over ~/.claude/ memory from old machine if migrating

Original credit

Forked from jsjeannotte/dotfiles, itself forked from the legendary mathiasbynens/dotfiles.

About

.files, including ~/.osx — sensible hacker defaults for OS X

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages