Personal machine setup – idempotent, safe to re-run at any time.
git clone https://github.com/janmarkuslanger/dotfiles.git ~/dotfiles
cd ~/dotfiles
./setup.shThe script prompts interactively which steps to run:
| Step | What it does |
|---|---|
| 1. Homebrew | Installs Homebrew (if missing) + all packages from Brewfile |
| 2. Apps | Installs global npm tools (Claude Code) |
| 3. Copy | Copies dotfiles into $HOME, prompts on conflict |
dotfiles/
├── setup.sh # Entry point
├── Brewfile # All brew/cask packages
├── scripts/
│ ├── 01_homebrew.sh
│ ├── 02_apps.sh
│ └── 03_copy.sh
├── claude/
│ └── .claude/
│ └── CLAUDE.md # Global Claude Code configuration
└── zsh/
└── .zshrc # Zsh configuration
| Package | Target | Contents |
|---|---|---|
claude |
~/.claude/CLAUDE.md |
Global Claude Code behavior |
zsh |
~/.zshrc |
Aliases, PATH, fzf, zoxide, history |
When a file already exists at the target location and differs from the source, the script asks:
[copy] ~/.zshrc already exists.
[o] overwrite [b] backup + overwrite [s] skip (default) :
- Create a directory mirroring the target path relative to
$HOME:git/.gitconfig - Add the package name to
PACKAGESinscripts/03_copy.sh - Re-run
./setup.sh(step 3 only)
Edit Brewfile, then:
brew bundle --file=Brewfile --no-lock