这是一个以 Chezmoi 为核心的 macOS 开发环境配置仓库,用于在新机器上恢复 Shell、Git、终端工具和用户配置。
首次运行请保持交互式终端,不要直接通过管道执行远程脚本:
curl -fsLS https://raw.githubusercontent.com/lithcube/dotfiles/main/init.sh \
-o /tmp/dotfiles-init.sh
sh /tmp/dotfiles-init.sh如果脚本已经在本地:
./init.sh完整参数和环境变量说明:
./init.sh --help国内网络环境下对 GitHub 操作(推送/拉取/克隆)可能需要代理,详情请查看
AGENTS.md。
当前仓库已经具备基础 bootstrap 流程:
init.sh负责安装并调用 Chezmoi.chezmoiscripts/负责 Homebrew 安装与包同步.chezmoidata/homebrew.yaml负责维护 macOS 软件清单dot_config/git/负责 Git 全局配置与忽略规则
源码格式规范(.editorconfig)和仓库忽略规则(.gitignore)也已建立。
当前文件:
.
├── init.sh # bootstrap 入口
├── README.md # 项目说明
├── .editorconfig # 源码格式规范
├── .gitignore # 版本控制忽略规则
├── .chezmoidata/
│ └── homebrew.yaml # macOS 软件清单
├── .chezmoiscripts/ # Chezmoi apply 脚本
│ └── run_onchange_after_01-install-packages.sh.tmpl
├── dot_config/
│ └── git/
│ ├── config # Git 全局配置
│ └── ignore # Git 全局忽略规则
└── docs/
└── superpowers/specs/ # 设计规格文档
└── 2026-08-01-editorconfig-gitignore-design.md
以下仓库用于参考 Chezmoi、bootstrap、工具链和跨平台配置的组织方式。
查阅时优先查看本地缓存;若尚未下载,先克隆到 /tmp/dotfiles-references,
不要在仓库根目录或 docs/ 中存放这些参考仓库。
# 示例:检查本地是否已有参考仓库
ls /tmp/dotfiles-references
# 若缺失,下载到本地缓存目录
# git clone --depth 1 https://github.com/<owner>/<repo>.git /tmp/dotfiles-references/<owner>-<repo>| 仓库 | 可借鉴的实践 |
|---|---|
| signalridge/dotfiles | .chezmoidata/ 驱动的 Profile、分阶段脚本、模板/Flake CI,以及 aqua、mise 和 Nix 的分层工具链。 |
| theniceboy/.config | 可重复执行的维护入口、按应用组织的配置,以及 macOS 集成脚本。 |
| ANRlm/dotfiles | Brewfile 软件清单、setup/restore 分离、平台分支和恢复脚本冲突策略。 |
| for13to1/dotfiles | Stow 模块化布局、平台软件清单、主机本地覆盖层和软链接校验。 |
| insv23/dotfiles | 主机专属链接配置、跨平台安装脚本、代理约定和供应链安全文档。 |
| wsgggws/dotfiles | 模块化 Zsh、Git hook,以及 WezTerm、Starship、tmux 等终端配置。 |
| lewislulu/terminal-setup | 多平台支持、--dry-run、显式 Shell 选择和幂等检查。 |
| zeinsshiri1984/ApexDotfiles | Chezmoi 与 just、XDG 布局、mise 工具链和分阶段 bootstrap。 |