~/
dotfiles.hongy.dev
chezmoiidempotent

Machine Bootstrap Scripts

Copy-and-paste commands to bootstrap a fresh macOS, Linux, or Windows machine. Managed with chezmoi, designed for fast and repeatable setup.

Quick Setup

Clone the repository and run the bootstrap script. It handles everything: Homebrew, chezmoi, dotfiles, packages, and diagnostics.

bootstrapsh
sh
# Clone repositorymkdir -p ~/.local/stategit clone https://github.com/hongymagic/dotfiles.git ~/.local/share/chezmoicd ~/.local/share/chezmoi# Complete setup with single command./bootstrap.sh# Optional: Configure macOS settings./macos.sh

What bootstrap.sh Does

The bootstrap script is idempotent and handles the entire setup process automatically.

Installs Homebrew (macOS only)
Installs chezmoi
Applies dotfiles configuration
Installs Homebrew packages from Brewfile
Fetches external dependencies
Provides comprehensive diagnostics

Manual Control

For granular control, run individual components separately.

sh
# Install/update Homebrew packages only./brew.sh# Apply dotfiles onlychezmoi apply -Rv# Configure macOS system settings./macos.sh

Secrets via 1Password

Secrets are stored in 1Password and pulled automatically during chezmoi apply.

sh
# Ensure 1Password CLI is installedbrew install 1password-cli# Apply dotfiles (will prompt for 1Password sign-in)chezmoi apply -Rv

Manual Secrets (Without 1Password)

Create ~/.extra.zsh manually if you don't use 1Password.

~/.extra.zshsh
sh
cat >> ~/.extra.zsh <<'EOF'# Git credentialsGIT_AUTHOR_NAME="Your Name"GIT_AUTHOR_EMAIL="your.email@example.com"GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"git config --global user.name "$GIT_AUTHOR_NAME"GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"git config --global user.email "$GIT_AUTHOR_EMAIL"# Add any API keys or other secrets hereexport OPENAI_API_KEY=EOFchmod 600 ~/.extra.zsh

Custom PATH

Add custom directories to your PATH via ~/.path.zsh.

~/.path.zshsh
sh
cat >> ~/.path.zsh <<'EOF'# Add custom paths to $PATH# export PATH="$HOME/.local/bin:$PATH"EOF

Aerospace (Optional)

Disable the Aerospace tiling window manager if you don't want it.

sh
# Uninstallbrew uninstall aerospace# Or disable via configchezmoi edit --apply ${XDG_CONFIG_HOME}/aerospace/aerospace.toml# Set start-at-login to false, then:chezmoi apply -Rv

sketchybar

A highly customisable macOS status bar replacement.

sh
# Install sketchybar and its dependencies~/.config/sketchybar/helpers/install.sh

Included Features

Opinionated tooling and configuration included in this dotfiles repository.

tmuxTerminal multiplexer configuration
zshShell configuration
CatppuccinUnified Mocha theme across tools
AerospaceTiling window manager (optional)
1PasswordSecret management via chezmoi templates
AI ToolsClaude, OpenCode, Codex, Continue, Gemini configs
macOS / Linux