My personal dotfiles for macOS development environment, managed by chezmoi.
# Install chezmoi if you don't have it
brew install chezmoi
# Initialize and apply this repository
chezmoi init --apply ry-itto/dotfiles- macOS (this configuration is macOS-only)
- Command Line Tools for Xcode
- Internet connection for downloading packages
brew install chezmoi
chezmoi init --apply ry-itto/dotfileschezmoi init --apply will:
- Clone this repository into
~/.local/share/chezmoi - Render dotfiles into
$HOME(e.g.dot_zshrc→~/.zshrc) - Run
run_onchange_install-brew-packages.shto install Homebrew bundle from~/.Brewfile - Run
run_onchange_configure-macos-defaults.shandrun_onchange_configure-xcode.shto apply system defaults - Run
run_once_install-zplug.sh,run_once_install-dein.shto bootstrap shell/editor plugin managers - Run
run_once_install-mise-tools.shto install any tools defined indot_config/mise/config.toml(グローバルでは言語ランタイムを固定しない方針 — 詳細は プログラミング言語の管理方針)
# Pull latest changes from this repo and re-apply
chezmoi update
# Edit a managed file (opens source file in $EDITOR)
chezmoi edit ~/.zshrc
# See what would change before applying
chezmoi diff
# Add a new file from $HOME into management
chezmoi add ~/.somefileNote: After migrating to chezmoi, editing files in
$HOMEdirectly does not sync back to this repository. Usechezmoi editor edit the source file under~/.local/share/chezmoi, thenchezmoi apply.
.
├── dot_zshrc # → ~/.zshrc
├── dot_zsh/ # → ~/.zsh/
│ ├── alias.zsh
│ ├── env.zsh
│ ├── plugin.zsh
│ ├── style.zsh
│ ├── functions/
│ └── bin/executable_reload # → ~/.zsh/bin/reload (chmod +x)
├── dot_gitconfig
├── dot_Brewfile
├── dot_vim/
├── dot_hammerspoon/
├── dot_claude/ # → ~/.claude/
├── dot_config/
│ ├── ghostty/config
│ ├── nvim/
│ ├── starship.toml
│ └── mise/config.toml # mise settings
├── private_Library/
│ └── private_Application Support/Code/User/settings.json # → VSCode settings
├── run_onchange_install-brew-packages.sh.tmpl
├── run_onchange_configure-macos-defaults.sh
├── run_onchange_configure-xcode.sh
├── run_once_install-zplug.sh
├── run_once_install-dein.sh
├── run_once_install-mise-tools.sh
├── .chezmoiignore # files to skip during apply
└── .github/workflows/ci.yml
- Package Managers: Homebrew, mise
- Shell: Zsh with zplug, Starship prompt
- Editors: Neovim, VSCode
- Version Control: Git, GitHub CLI
mise でプロジェクトごとに管理する。詳細は プログラミング言語の管理方針 を参照。
- iOS Development: Xcode, XcodeGen, xcbeautify
- macOS Apps: Ghostty, Raycast, Hammerspoon, Rectangle
Modular configuration in dot_zsh/:
alias.zsh: Custom command aliasesenv.zsh: Environment variables and PATH setupplugin.zsh: Zsh plugin configuration via zplugstyle.zsh: Prompt and appearance settings
dot_gitconfig provides commit template, GitHub CLI helpers, and standard pull/credential settings.
Vim setup is wired up via dein.vim. Plugin manifests live under dot_vim/rc/.
- Fork this repository to create your own version
- Edit configurations under
~/.local/share/chezmoi/(or viachezmoi edit) - Apply changes with
chezmoi apply - Modify packages in
dot_Brewfile
この dotfiles では プログラミング言語ランタイムの共通設定(グローバルバージョン)を持たない 方針を採る。
- プロジェクト側で指定されている場合: そのプロジェクトの
mise.toml/.tool-versions/.node-version/.ruby-versionなどに従い、mise(または各プロジェクト指定の方法)で導入する。 - その他、ローカルで一時的に必要になった場合:
mise use -g <tool>@<version>などで都度グローバルに入れる。dotfiles 側にはコミットしない。 - dotfiles 管理下の
dot_config/mise/config.toml: 言語ランタイムのバージョンは記述しない。mise 自体の設定(例:idiomatic_version_file_enable_tools)に限る。
共通設定でランタイムのバージョンを固定すると、
- マシンごと・プロジェクトごとのバージョン差異に追従するために dotfiles 側を頻繁に更新することになる
- プロジェクト側の指定とグローバル指定が衝突したときの優先順位の調整が面倒
になる。プロジェクト側の指定を常に優先することで、dotfiles を「環境の土台」だけに保つ。
Homebrew のフォーミュラの依存関係として Python・Ruby などが入ってしまうケースは許容する。brew bundle の出力や /opt/homebrew/Cellar 配下に入るものは、ツールの動作に必要な副産物とみなす(プロジェクト用途では mise 側を優先する)。
Feel free to open issues or submit pull requests if you have suggestions for improvements.
This repository is available under the MIT License. Feel free to fork and modify for your own use.