一个全面的点文件设置脚本,用于配置macOS和Linux系统的开发环境。
概览
一个全面的点文件设置脚本,用于配置macOS和Linux系统的开发环境。 - -m, --minimal:安装最少,软件包和工具更少 - -n, --no-sudo:无sudo权限安装 - -h, --help:显示帮助信息 - XDG 基础目录结构 - Git 配置 - ZSH 作为默认 shell(Linux)- Homebrew(macOS)- Rosetta 2(macOS ARM) - chezmoi用于dotfiles管理 - fzf用于模糊查找 - mise用于运行时版本管理 - tmux与插件管理器(完整安装)- Miniconda用于Python环境管理(完整安装) - 开发工具和构建基础 - Python pip 及相关包 - FiraCode Nerd 字体(Linux) - 其他系统工具 - macOS 或 Linux(基于 Debian/Ubuntu 的)- 互联网连接 - Git - curl 脚本会自动检测你的操作系统并安装相应的软件包和配置。
概述(AI 翻译)
点文件和机器设置,适用于macOS和Linux,管理方式如下
MISE。一个mise bootstrap安装系统包,
复制仓库、链接点文件和安装工具。
安装
对于最小安装(服务器),通过 --minimal:
setup.sh:
- 在macOS上安装Xcode命令行工具,或在macOS上安装git并用curl。 Debian/Ubuntu,曾经要求你提供密码。
- 安装 mise(或运行
mise self-update,当它超过 2026.9.8 时), 将该仓库克隆到~/.dotfiles,并启用其预提交钩子。 - 要求输入你的 git 名称和邮箱并保存在
~/.config/mise/config.local.toml。设置DOTFILES_GIT_NAME和DOTFILES_GIT_EMAIL跳过提示。 - 将
~/.config/mise/config.toml链接到完整或最小配置。 - 复制它即将替换的每个现有文件
~/.dotfiles-backup- /。 - 运行
mise bootstrap。它刷新包元数据([apt-get update),其中 需要 sudo)仅在缺少一个包时,因此一台最新机器不需要 密码。
然后打开一个新壳。在完全安装时,运行ccp bootstrap来获取
从 ccp 源代码安装的 Claude 代码技能;仅创建 CCP 中心的物品
手工存放在这里。
布局
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Dotfiles
Dotfiles and machine setup for macOS and Linux, managed with
mise. One mise bootstrap installs system packages,
clones repositories, links dotfiles and installs tools.
Install
curl -L https://raw.githubusercontent.com/samhvw8/dotfiles/main/setup.sh | bash
For a minimal install (servers), pass --minimal:
curl -L https://raw.githubusercontent.com/samhvw8/dotfiles/main/setup.sh | bash -s -- --minimal
setup.sh:
- Installs the Xcode Command Line Tools on macOS, or git and curl on Debian/Ubuntu, asking for your password once.
- Installs mise (or runs
mise self-updatewhen it is older than 2026.9.8), clones this repository to~/.dotfiles, and enables its pre-commit hook. - Asks for your git name and email and saves them in
~/.config/mise/config.local.toml. SetDOTFILES_GIT_NAMEandDOTFILES_GIT_EMAILto skip the prompt. - Links
~/.config/mise/config.tomlto the full or minimal config. - Copies every existing file it is about to replace into
~/.dotfiles-backup-/. - Runs
mise bootstrap. It refreshes package metadata (apt-get update, which needs sudo) only when a package is missing, so an up-to-date machine needs no password.
Then open a new shell. On a full install, run ccp bootstrap to fetch the
Claude Code skills installed from ccp sources; only the ccp hub items created
by hand are stored here.
Layout
| Path | Purpose |
|---|---|
home/ |
Dotfiles, linked to the same paths under ~ |
mise/config.toml |
Full install: tools, full-only dotfiles, packages, repos and hooks |
mise/minimal.toml |
Minimal install: a smaller tool set and the minimal .zshrc |
mise/conf.d/dotfiles.toml |
Dotfiles, packages, repos and hooks shared by both installs |
mise/scripts/ |
Bootstrap hook scripts |
mise/snippets/ |
Templated blocks managed inside files such as ~/.gitconfig |
setup.sh |
New-machine installer |
migrate-from-chezmoi.sh |
One-time migration for machines still on chezmoi |
.githooks/pre-commit |
Runs dot:check before each commit |
.okf/ |
Knowledge bundle: how and why this setup works (see below) |
~/.config/mise/config.toml links to mise/config.toml or mise/minimal.toml,
which is what makes a machine full or minimal. mise/conf.d/dotfiles.toml is
linked into ~/.config/mise/conf.d/ on both.
How it works
mise bootstrap runs these steps in order. Each one skips work that is already
done, so it is safe to run again at any time:
prepare-host.sh: XDG directories, and Rosetta 2 on macOS.- System packages:
brewandbrew-caskon macOS,apton Linux. mise installsbrewandbrew-caskentries itself; Homebrew is not installed. finish-host.sh: deb-get and zsh as the login shell on Linux.- Repositories:
~/.tmux/plugins/tpmon full installs. - Dotfiles: links and managed blocks.
- Tools from the mise config.
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add samhvw8/dotfiles