Skip to content

liby/dotfiles

Repository files navigation

English | 简体中文

My Dotfiles

Note

This repository contains my dotfiles for managing my development environment. Powered by chezmoi, it allows me to effortlessly keep my configurations in sync across multiple Macs.

Project Overview

This repository contains a series of configuration files and scripts used to set up and manage my development environment, including but not limited to:

These files are managed using chezmoi, with support for templates, encryption, and per-device customization.

Installation Instructions

One-command setup on a new machine

On a new Mac, open Terminal.app and run:

sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply liby

This command will:

  1. Install chezmoi
  2. Clone this repository to ~/.local/share/chezmoi
  3. Run all bootstrap scripts (installing Xcode CLI Tools, Homebrew, brew packages, etc.)
  4. Sync configuration files to $HOME

On a machine with chezmoi already installed

chezmoi init liby
chezmoi apply

Usage

chezmoi add <file>          # Add a file to chezmoi management
chezmoi edit <file>         # Edit the source file
chezmoi diff                # Show differences between source and target
chezmoi apply               # Apply all changes to $HOME
chezmoi cd                  # Enter the source directory
chezmoi git status          # Run Git commands on the source directory from anywhere

Encrypted files

Sensitive files are stored with GPG encryption:

chezmoi add --encrypt <file>   # Add with encryption

Bootstrap scripts

Bootstrap scripts are located in .chezmoiscripts/ and run in listed order:

Phase Script Notes
before Xcode CLI Tools Required for Git and compilation
before Homebrew
before Brewfile packages
before Case-sensitive volume For the ~/Code directory
before Node.js Via proto; includes pnpm
before Rust
before Claude Code
before zsh plugins
after GPG agent Includes YubiKey setup
after Git config Generated from templates
after macOS defaults
after zsh completions

before scripts run before file sync, after scripts run after file sync.

Contribution Guidelines

If you have any suggestions or issues, feel free to open an Issue or Pull Request.

About

✨ Dotfiles for humans and their coding agents

Resources

Stars

Watchers

Forks

Contributors