English | 简体中文
Note
This repository contains my dotfiles for managing my development environment. Powered by chezmoi, it allows me to effortlessly keep my configurations in sync across multiple Macs.
This repository contains a series of configuration files and scripts used to set up and manage my development environment, including but not limited to:
-
Agentic coding configuration:
dot_claude/dot_codex -
Git configuration:
dot_config/git -
Homebrew dependencies:
Brewfile -
Shell configuration:
dot_zshrc -
Terminal prompt:
dot_config/starship
These files are managed using chezmoi, with support for templates, encryption, and per-device customization.
On a new Mac, open Terminal.app and run:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply libyThis command will:
- Install chezmoi
- Clone this repository to
~/.local/share/chezmoi - Run all bootstrap scripts (installing Xcode CLI Tools, Homebrew, brew packages, etc.)
- Sync configuration files to
$HOME
chezmoi init liby
chezmoi applychezmoi add <file> # Add a file to chezmoi management
chezmoi edit <file> # Edit the source file
chezmoi diff # Show differences between source and target
chezmoi apply # Apply all changes to $HOME
chezmoi cd # Enter the source directory
chezmoi git status # Run Git commands on the source directory from anywhereSensitive files are stored with GPG encryption:
chezmoi add --encrypt <file> # Add with encryptionBootstrap scripts are located in .chezmoiscripts/ and run in listed order:
| Phase | Script | Notes |
|---|---|---|
| before | Xcode CLI Tools | Required for Git and compilation |
| before | Homebrew | |
| before | Brewfile packages | |
| before | Case-sensitive volume | For the ~/Code directory |
| before | Node.js | Via proto; includes pnpm |
| before | Rust | |
| before | Claude Code | |
| before | zsh plugins | |
| after | GPG agent | Includes YubiKey setup |
| after | Git config | Generated from templates |
| after | macOS defaults | |
| after | zsh completions |
before scripts run before file sync, after scripts run after file sync.
If you have any suggestions or issues, feel free to open an Issue or Pull Request.