English | 简体中文
My personal macOS development environment configuration, managed with chezmoi.
- Quick Setup
- Tech Stack
- Quick Reference
- Directory Structure
- Configuration Highlights
- Secrets Management
- AI Integration
- Updating
This script will reset your terminal and shell configuration!
Before running, please:
- Backup your existing configs:
~/.zshrc,~/.zshenv,~/.gitconfig,~/.config/ghostty/ - Understand what this script does (review
bootstrap.shand the directory structure above) - I am not responsible for any data loss or configuration issues
Thanks to chezmoi, you can bootstrap a completely new, empty machine with just two commands.
1. Initialize and apply dotfiles
This uses chezmoi's official one-liner to download the binary, clone this repository, and apply the configuration files:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply FradSer2. Run the bootstrap script
Now that the repository is cloned to your machine, run the setup script to install Homebrew, tools, runtimes, and AI agents:
~/.local/share/chezmoi/bootstrap.sh(Note: chezmoi init uses HTTPS by default. If you plan to push changes back to GitHub later, update the git remote to SSH inside ~/.local/share/chezmoi after generating your SSH keys.)
- Installs Homebrew (if missing)
- Installs core tools, runtimes, and applications via Brewfile
- Configures global Git settings
- Sets up Node.js (via
fnm), enablespnpm, and installs AI agents - Installs Bun and uv (Python manager)
- Configures Ghostty terminal
- Shell: Zsh (modular config, Homebrew plugins)
- Terminal: Ghostty (Maple Mono NF CN)
- Prompt: Starship (nerd font, multi-language)
- Runtimes: Node.js (fnm), Go, Rust, Bun, Python (uv)
- Editor: Cursor / Zed
- AI Tools: Claude Code, Gemini CLI, OpenAI Codex, amp, opencode
- Core CLI Tools:
zoxide(smartcd)eza(modernls)bat(moderncat)fzf+fd+ripgrep(fuzzy search)lazygit(Git TUI)tmux(terminal multiplexer)gh(GitHub CLI)git-delta(syntax-highlighting pager for diff)
chezmoi apply # Apply dotfiles to $HOME
chezmoi update # Pull latest & apply
chezmoi diff # Preview changes
chezmoi edit ~/.zshrc # Edit a managed file.
├── bin/
│ └── chezmoi # chezmoi binary (self-managed)
├── bootstrap.sh # Environment setup script
├── Brewfile # Homebrew dependencies
├── dot_zshrc # Zsh entry point
├── dot_zshenv # Zsh environment variables
├── dot_zprofile # Zsh login settings
├── dot_gitignore_global # Global git ignores
├── dot_config/
│ ├── ghostty/config # Ghostty terminal config
│ ├── starship.toml # Starship prompt config
│ └── zsh/
│ ├── completions/ # Zsh completion scripts
│ ├── rc.d/ # Zsh initialization scripts (numeric order)
│ │ ├── 00-init.zsh # Tool init: evalcache, starship, fnm
│ │ ├── 05-compinit.zsh # Zsh completion initialization
│ │ ├── 10-ai-claude.zsh # Claude wrapper + provider config
│ │ ├── 11-ai-others.zsh # Codex / Gemini / Qwen wrappers
│ │ ├── 20-settings.zsh # Zsh options
│ │ ├── 25-fzf.zsh # fzf keybindings
│ │ ├── 30-aliases.zsh # Git & system aliases
│ │ ├── 90-plugins.zsh # Plugin loading
│ │ ├── 95-tips.zsh # Shell tips
│ │ └── 99-zoxide.zsh # zoxide init
│ └── dot_claude-providers.toml # Claude API provider configs
└── dot_claude/
├── settings.json # Claude Code settings & plugins
└── executable_statusline.sh # Custom status line
Load order: dot_zshrc → dot_config/zsh/rc.d/*.zsh (00-99)
| Script | Purpose |
|---|---|
00-init.zsh |
evalcache, starship, fnm |
05-compinit.zsh |
Zsh completion initialization |
10-ai-claude.zsh |
Claude wrapper + provider TOML loader + completions |
11-ai-others.zsh |
Codex / Gemini / Qwen CLI wrappers |
20-settings.zsh |
Zsh options (history, completion) |
25-fzf.zsh |
fzf keybindings & preview |
30-aliases.zsh |
Git aliases, system shortcuts |
90-plugins.zsh |
zsh-autosuggestions, syntax-highlighting, fzf-tab |
95-tips.zsh |
Shell tips and helpers |
99-zoxide.zsh |
Smart cd integration |
Zsh plugins installed via Homebrew: zsh-autosuggestions, zsh-syntax-highlighting, zsh-history-substring-search, zsh-autopair, zsh-you-should-use, fzf-tab, evalcache.
- Custom statusline showing model, directory, git branch
- Claude API provider configs in
dot_claude-providers.toml(15+ providers including GLM, Moonshot, Kimi, OpenRouter, and local cliproxyapi proxies) - Enabled plugins: git, gitflow, github, exa-mcp-server, superpowers, code-context, skill-creator, acpx, codex
- Auto memory enabled; model defaults to
opus
- Font: Maple Mono NF CN
- Theme: Apple System Colors Light / Cursor Dark (auto-switches with system appearance)
- Translucent background with macOS glass blur
- Quick terminal on top of screen with fast animation
- Shell integration and command-finish notifications
Sensitive information (API keys, tokens) is excluded from this repository.
Create ~/.config/zsh/.secret manually to store your private environment variables:
# ~/.config/zsh/.secret
export GITHUB_TOKEN="your_token"
export ANTHROPIC_API_KEY="your_token"This setup is optimized for AI-assisted development:
- Claude Code — custom statusline, multi-provider API fallback
- Cursor — primary editor
- Gemini CLI — Google AI
- OpenAI Codex — CLI coding assistant
- amp — AI coding agent
- opencode — AI coding agent
| Plugin | Purpose |
|---|---|
| git | Git workflow automation |
| gitflow | Git-flow operations |
| github | GitHub PR and issue management |
| exa-mcp-server | Web search & code examples |
| superpowers | Advanced agent workflows |
| code-context | Codebase research |
| skill-creator | Custom skill creation |
| acpx | Agent-to-agent communication |
| codex | OpenAI Codex integration |
To pull the latest changes and apply them:
chezmoi update