Cross-platform dotfiles with a Python-based bootstrap. A thin POSIX shell
entrypoint hands off to uv, which runs the
real installer (main.py). The installer detects your OS, installs core
packages, sets up Oh My Zsh + Starship, links the dotfiles into $HOME, and
optionally installs extra components from a registry.
Warning: These are my personal settings. Fork the repo and review the code before running it — don't blindly apply someone else's configuration.
git clone git@github.com:HernandoR/dotfiles.git
cd dotfiles
./bootstrap.shbootstrap.sh requires curl. It installs uv if it isn't already present,
then runs uv run main.py and forwards any extra arguments to it. So anything
documented below for main.py can be passed straight through:
./bootstrap.sh --dry-run --verboseRunning with no sub-command (./bootstrap.sh or uv run main.py) performs a
full bootstrap:
- Detect OS —
darwin,debian/ubuntu, orunknown(read fromplatform.system()and/etc/os-release). - Install core packages
- macOS: installs Homebrew (from the BFSU mirror) and
git,zsh,rsync,rclone. - Debian/Ubuntu:
apt update, ensurescurlis present, then installsgit,zsh,rsync,aptitude,wget.
- macOS: installs Homebrew (from the BFSU mirror) and
- Configure the shell — installs Oh My Zsh (falling back to a Gitee
mirror when GitHub is unreachable), Antigen, the
zsh-autosuggestionsandzsh-syntax-highlightingplugins, and the Starship prompt. - Restore + link dotfiles — rsyncs the tracked files from
sources/rootinto~/dotfiles, then symlinks them into$HOME. - Run optional components — anything you requested via
--optional-components(see below).
| Flag | Effect |
|---|---|
--dry-run |
Print every command without executing it. |
--verbose |
Enable debug logging (and rsync -P progress). |
--interactive |
Allow interactive prompts during install (Oh My Zsh, Starship). |
--optional-components <list> |
Comma-separated optional components / alias groups. |
main.py also exposes targeted commands for managing dotfiles without a full
bootstrap:
./bootstrap.sh backup # rsync $HOME/dotfiles back into sources/root
./bootstrap.sh restore # restore sources/root into $HOME/dotfiles and re-link
./bootstrap.sh set-proxy # set git http/https proxy from $http_proxy / $https_proxy
./bootstrap.sh unset-proxy # clear the git proxy configOptional components live in a self-registering registry
(installers/components.py). Each is selected by name, or by an alias
group (currently all). Select them in two ways — the CLI flag wins over the
environment variable:
# via flag
./bootstrap.sh --optional-components docker,claude
# via env var
DOTFILE_BOOTSTRAP_OPTIONAL_COMPONENTS=all ./bootstrap.shUnknown names are logged and skipped. Components only run on their supported OS; non-applicable ones are skipped automatically.
| Name | Description | OS |
|---|---|---|
1password |
1Password | debian, ubuntu |
docker |
Docker | debian, ubuntu |
docker-rootless |
Docker (rootless) | all |
cmdl-tools |
command-line tools (deadsnakes PPA, etc.) | debian, ubuntu |
cuda |
CUDA Toolkit 12.6 | debian, ubuntu |
llvm |
LLVM 18 (+ update-alternatives) |
debian, ubuntu |
mac-brew |
Homebrew formulae & casks | darwin |
claude |
Claude Code CLI | all |
To list everything available at any time:
uv run -m installers.componentsbootstrap.sh POSIX entrypoint — installs uv, runs main.py
main.py DotfilesManager: OS detection, core install, dotfile linking, sub-commands
installers/
components.py OptionalComponent registry (--optional-components)
debian.py Debian/Ubuntu installers (1Password, Docker, CUDA, LLVM, …)
macos.py macOS bootstrap (Homebrew + formulae/casks)
sources/
root/ the actual dotfiles, rsynced into $HOME
.file_list files rsync includes
.ex_list patterns rsync excludes
zsh_plugins/ zsh plugin configs copied into Oh My Zsh custom/
install/, templates/ supporting assets
init/ editor/terminal preferences (Sublime, iTerm, etc.)
- Requires Python ≥ 3.9;
uvmanages the interpreter and (currently empty) dependency set, so no manualpip installis needed. - Several downloads default to Chinese mirrors (BFSU for Homebrew, Gitee for Oh My Zsh when GitHub is unreachable) for faster installs in CN networks.
- Run the installer from inside the cloned
dotfilesdirectory — it expects thesources/directory to be present.