Skip to content

FradSer/dotfiles

Repository files navigation

Frad's Dotfiles

chezmoi Shell Terminal

English | 简体中文


Frad's Dotfiles

My personal macOS development environment configuration, managed with chezmoi.

Table of Contents


Important Warning

This script will reset your terminal and shell configuration!

Before running, please:

  1. Backup your existing configs: ~/.zshrc, ~/.zshenv, ~/.gitconfig, ~/.config/ghostty/
  2. Understand what this script does (review bootstrap.sh and the directory structure above)
  3. I am not responsible for any data loss or configuration issues

Quick Setup (For a fresh Mac)

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 FradSer

2. 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.)

What bootstrap.sh does

  1. Installs Homebrew (if missing)
  2. Installs core tools, runtimes, and applications via Brewfile
  3. Configures global Git settings
  4. Sets up Node.js (via fnm), enables pnpm, and installs AI agents
  5. Installs Bun and uv (Python manager)
  6. Configures Ghostty terminal

Tech Stack & Tools

  • 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 (smart cd)
    • eza (modern ls)
    • bat (modern cat)
    • fzf + fd + ripgrep (fuzzy search)
    • lazygit (Git TUI)
    • tmux (terminal multiplexer)
    • gh (GitHub CLI)
    • git-delta (syntax-highlighting pager for diff)

Quick Reference

chezmoi apply           # Apply dotfiles to $HOME
chezmoi update          # Pull latest & apply
chezmoi diff            # Preview changes
chezmoi edit ~/.zshrc   # Edit a managed file

Directory Structure

.
├── 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

Configuration Highlights

Zsh Modular Setup

Load order: dot_zshrcdot_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.

Claude Code

  • 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

Terminal (Ghostty)

  • 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

Secrets Management

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"

AI Integration

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

Enabled Claude Plugins

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

Updating

To pull the latest changes and apply them:

chezmoi update

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages