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 status --exclude=encrypted  # Show a safe change overview
chezmoi diff <dest-path>    # Inspect one non-secret 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 Global developer tools Global npm tool and Pyright versions declared in package.json and requirements.txt
before Rust
before Claude Code
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.

Renovate checks daily in the Asia/Singapore timezone and updates GitHub Actions, the declared global npm tools, and Pyright. The next chezmoi apply installs only missing or mismatched tool versions.

Zsh plugins are pinned to upstream commits in .chezmoiexternal.toml. Renovate groups their pin updates into one PR, and CI verifies that each pinned archive applies and its entry point loads.

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

111 stars

Watchers

2 watching

Forks

Contributors