Personal configuration for a productive shell and editor setup on macOS and Linux (Arch, Debian). Install scripts link configs from this repo into your home directory so you can version everything in git and reproduce the same environment on a new machine.
Inspired by Mathias Bynens’s dotfiles. More background on the dotfiles idea: dotfiles.github.io.
- Quick start (macOS)
- Quick start (Linux)
- What’s included
- AI, Cursor, and Claude Code
- Environment variables
- Installation
- Optional: more software
- Repository layout
- Feedback & thanks
mkdir -p ~/GitHub && cd ~/GitHub
git clone https://github.com/mingster/dotfiles.git && cd dotfiles
sh mac/osxprep.sh # Command Line Tools + prep
sh mac/osx.sh # Optional: macOS defaults (review first)
sh install.sh # Symlinks, .agents, Cursor, Claude Code; runs mac/system_setup.shEach run of **install.sh** (bash script, runnable as sh install.sh or bash install.sh):
- Sets
**~/dotfiles**to a symlink → the absolute path of the directory that containsinstall.sh(re-running from another clone retargets~/dotfiles). - Refreshes home links for git, vim,
**.agents**, Claude Code (script/setup-claude-code.sh→~/.claude/), and Cursor (rules + user settings viascript/link-cursor-user.sh).
If **~/dotfiles exists as a real directory** (not a symlink), the script exits with an error so nothing is overwritten blindly.
Same clone location as macOS. **install.sh** sets up home symlinks (including **.agents**, Claude Code via script/setup-claude-code.sh, Cursor via script/link-cursor-user.sh), then runs the right **system_setup** for the machine:
| OS | Script |
|---|---|
| macOS | mac/system_setup.sh |
Arch (ID=arch in /etc/os-release, or Arch-like ID_LIKE) |
arch/system_setup.sh |
Debian / Ubuntu / Mint / Pop!_OS / Zorin, or Debian-like ID_LIKE |
debian/system_setup.sh |
Unsupported distros print a message but still keep the symlinks from earlier in the script. To only link dotfiles and skip the heavy installer (testing, unsupported distro), use **DOTFILES_SKIP_SYSTEM_SETUP=1**.
mkdir -p ~/GitHub && cd ~/GitHub
git clone https://github.com/mingster/dotfiles.git && cd dotfiles
sh install.sh # symlinks + platform system_setupRequirements: **bash**, **git**, and **sudo** where the platform script installs packages. Read **arch/system_setup.sh** or **debian/system_setup.sh** before running on a machine you care about. They are full environment installers.
On Windows (Git Bash / MSYS), **install.sh** still runs the symlink block when **$HOME/dotfiles** resolves; **system_setup** is skipped and Cursor user linking may not apply (see script/link-cursor-user.sh).
| Area | Notes |
|---|---|
| Shell & terminal | Fish, Fisher, Tide v6 (fisher install ilancosman/tide@v6) |
| macOS | Homebrew, preferences via mac/osx.sh |
| Fonts | Nerd Fonts — Hack (see mac/system_setup.sh) |
| Terminal tools | tmux, lf, lazygit |
| Editors | VS Code extension lists under vscode/; Cursor under cursor/ |
| Config | GNU stow via mac/stowall on macOS; on Linux run stow yourself against ~/dotfiles/.config packages if you use the same layout |
| Linux | arch/system_setup.sh, debian/system_setup.sh, plus arch/install_*.sh / debian/install_*.sh for optional stacks |
| CI | ShellCheck on install.sh, mac/stowall, and mac / arch / debian system_setup.sh (see script/shellcheck-dotfiles.sh); JSON validation for .agents/.skill-lock.json when that file is present in the repo |
Dotfiles wires skills (skills CLI), Claude Code, and Cursor (global rules + user settings.json / keybindings.json) into your home directory.
| Topic | Summary |
|---|---|
| Agent skills | ~/.agents → ~/dotfiles/.agents. Lock file: .agents/.skill-lock.json. Restore: bash ~/dotfiles/script/bootstrap-agents.sh or DOTFILES_INSTALL_SKILLS=1 sh install.sh. See .agents/README.md. |
| Claude Code | script/setup-claude-code.sh links ~/.claude/ into ~/dotfiles/.agents (skills/, claude/, claude/agents/). Claude Code CLI and Claude Code Desktop (code.claude.com) both use ~/.claude/skills/, same tree as the skills CLI. .agents/claude/settings.json includes "Skill" in permissions.allow so skills under that tree can run (tighten if you want). See .agents/README.md. Do not commit secrets (see .gitignore). |
| Cursor | Rules: ~/.cursor/rules → ~/dotfiles/cursor/rules (see cursor/rules/README.md). User settings: script/link-cursor-user.sh → Cursor User settings.json and keybindings.json. Prisma-related editor options align with riben web/.vscode/settings.json. MCP: use cursor/mcp.json.example; keep real keys out of git. |
| Entry point for agents | AGENTS.md — paths and boundaries for work in this repo. |
| Copilot on GitHub | .github/copilot-instructions.md |
| Variable | When set | Effect |
|---|---|---|
DOTFILES_INSTALL_SKILLS=1 |
With install.sh |
Runs npx skills@latest experimental_install via script/bootstrap-agents.sh (needs Node / npx). |
DOTFILES_BREW_UPGRADE=1 |
With install.sh on macOS only |
Runs brew upgrade in mac/system_setup.sh (otherwise only brew update). Ignored on Linux. |
DOTFILES_SKIP_SYSTEM_SETUP=1 |
With install.sh |
Skips **mac/** / **arch/** / **debian/** system_setup.sh (symlinks, .agents, Claude Code, and Cursor setup still run). |
DOTFILES |
Optional | Some helpers default to $HOME/dotfiles; set this if your dotfiles root differs (used by script/bootstrap-agents.sh, script/setup-claude-code.sh, script/link-cursor-user.sh). **install.sh** does not read DOTFILES; it derives the repo path from the location of **install.sh**. |
Examples:
DOTFILES_INSTALL_SKILLS=1 sh ~/GitHub/dotfiles/install.sh
DOTFILES_BREW_UPGRADE=1 sh ~/GitHub/dotfiles/install.shmkdir -p ~/GitHub && cd ~/GitHub
git clone https://github.com/mingster/dotfiles.git && cd dotfilesFrom the repo root (or use absolute paths):
sh install.shThis ensures **~/dotfiles** → this repo, links shell/git/vim dotfiles (overwriting previous symlinks), sets up **.agents**, Claude Code (script/setup-claude-code.sh), Cursor rules + user settings, and optional skills when **DOTFILES_INSTALL_SKILLS=1**. It then runs the platform **system_setup** detected from **OSTYPE** and **/etc/os-release** on Linux (see Quick start (Linux)), unless **DOTFILES_SKIP_SYSTEM_SETUP=1**.
Order of operations (see source in [install.sh](install.sh)):
**~/dotfiles**→ symlink to this repo (fails if**~/dotfiles**exists and is not a symlink).- Home symlinks (targets under the repo):
.csvignore,.editorconfig,.gitattributes,.gitflow_export,.gitignore,.gitignore_global,.hgignore_global,.nanorc,.vimrc,.vim. **~/.gitconfig** copied from.gitconfig(arm64) or.gitconfig-x64(x86_64).**git config --global**core.excludesfileandcore.attributesfilepointing at files in this repo.**mkdir -p ~/dotfiles/.agents**,**~/.agents**→**~/dotfiles/.agents**.**bash script/setup-claude-code.sh**:**~/.claude/**← symlinks into**.agents/skills**,**.agents/claude/**, and**.agents/claude/agents/**.**~/.cursor/rules**→**~/dotfiles/cursor/rules**.- If
**DOTFILES_INSTALL_SKILLS=1**:**bash script/bootstrap-agents.sh**. **bash script/link-cursor-user.sh**: Cursor User**settings.json**and**keybindings.json**→**~/dotfiles/cursor/**(macOS and Linux paths only).- Unless
**DOTFILES_SKIP_SYSTEM_SETUP=1**, run**mac/system_setup.sh**,**arch/system_setup.sh**, or**debian/system_setup.sh**as detected.
Platform **system_setup** scripts also call **bash script/setup-claude-code.sh** (and other links) so a manual re-run of **system_setup** stays aligned.
Symlink loop (Too many levels of symbolic links): install.sh uses the physical repo path (pwd -P) so ~/dotfiles and paths like ~/dotfiles/mac/system_setup.sh do not walk a circular symlink chain. If you still see this error, remove the broken symlink rm ~/dotfiles (only if it is a symlink, not a real folder), then run install.sh again from your clone (for example cd ~/GitHub/dotfiles && sh install.sh). Do not point two locations at each other (for example ~/dotfiles → ~/GitHub/dotfiles and ~/GitHub/dotfiles → ~/dotfiles).
Duplicate skills in Cursor: Cursor loads global skills from both ~/.cursor/skills/ and ~/.claude/skills/. If both point at the same tree, every skill appears twice. script/setup-claude-code.sh removes a redundant ~/.cursor/skills when it matches ~/.claude/skills (re-run install.sh or that script). See .agents/README.md.
sh ~/GitHub/dotfiles/mac/osxprep.shRun before or after install.sh depending on whether you need CLT first; adjust to your workflow.
Review mac/osx.sh, then:
sh ~/GitHub/dotfiles/mac/osx.shReview and edit first. Installs many CLI and GUI packages:
sh ~/GitHub/dotfiles/mac/install_my_software.shinstall.sh already invokes **arch/system_setup.sh** or **debian/system_setup.sh** when **/etc/os-release** matches (see Quick start (Linux)). To run a script again manually (for example after editing it):
cd ~/GitHub/dotfiles
bash arch/system_setup.sh # or debian/system_setup.shRead the script first: both install packages, change the default shell to fish, configure UFW and desktop tooling, etc.
- macOS:
mac/install_*.sh— Android, AWS, databases, Python, Node, nginx, etc. - Linux (Arch):
arch/install_*.sh— Node, Java, PostgreSQL, MongoDB, NVIDIA, KDE, Claude Code (arch/install_claude.sh), Zed (arch/install_zed.sh), and others. - Linux (Debian):
debian/install_*.sh— TeX, Zotero, Mullvad, singularity, VNC, etc. - Editors (all): vscode/vscode_README.md, vscode/install-vscode-extensions.sh, cursor/install-vscode-extensions_cursor.sh
| Path | Role |
|---|---|
install.sh |
Top-level bootstrap: ~/dotfiles symlink, home dotfiles, .agents, Claude Code, Cursor, then system_setup |
| Top-level dotfiles | Repo root files linked into $HOME (for example .gitconfig, .vimrc, .vim, .gitignore_global, …) |
mac/, arch/, debian/ |
Platform-specific installers and system_setup.sh |
mac/stowall |
Stow all packages under $HOME/dotfiles/.config (DOTFILES overrides root in that script) |
script/ |
bootstrap-agents.sh, setup-claude-code.sh, link-cursor-user.sh, shellcheck-dotfiles.sh |
.agents/ |
Skills (skills/, .skill-lock.json), Claude-only files under claude/; see .agents/README.md |
.config/ |
App configs consumed via stow / platform scripts (nvim, fish, tmux, kitty, …) |
cursor/ |
Cursor user settings.json, keybindings.json, rules/, mcp.json.example |
vscode/ |
VS Code settings and extension install script |
AGENTS.md |
Short map of AI-related paths for work in this repo |
.github/ |
Copilot instructions, workflows (ShellCheck, skill-lock JSON) |
_outdated/ |
Older scripts kept for reference |
Suggestions and improvements are welcome.
Thanks to josean-dev / dev-environment-files, Sketchybar setup (josean.com), @ptb’s Mac OS X Lion Setup, Ben Alman, Chris Gerke / Insta, Cãtãlin Mariş, Gianni Chiappini / gf3, Jan Moesen / tilde, Lauri Ranta / OS X notes, Matijs Brinkhuis, Nicolas Gallagher, Sindre Sorhus, Tom Ryder, Kevin Suttle / OSXDefaults, Haralan Dobrev, and everyone who contributed or suggested improvements.