Personal dotfiles and configuration files managed with chezmoi.
To set up a new machine (one command does everything):
curl -fsLS https://raw.githubusercontent.com/cloudartisan/dotfiles/master/bootstrap-chezmoi.sh | bash -s -- --applyThis will:
- Install chezmoi
- Clone and apply your dotfiles
- Install Homebrew and all packages
- Set up Vim, Git, shell configuration
- Install Cursor Agent CLI
- Configure everything automatically
- Shell configuration (bash & zsh support)
- Git configuration
- Vim setup with plugins
- Tmux configuration
- Homebrew package management
- Cursor Agent CLI integration
- Supports both macOS and Linux
After initial setup, use these commands:
# Update all machines with latest changes
chezmoi update
# Edit a dotfile
chezmoi edit ~/.bash_profile
# Apply changes locally
chezmoi apply
# Commit and push changes
chezmoi cd -- git add . && git commit -m "Update config" && git push.chezmoiscripts/- Automated setup scripts (run_once_*.sh.tmpl)bin/- Utility scripts for manual use.bash_*- Shell configuration filesBrewfile- Homebrew package definitionsbootstrap-chezmoi.sh- Primary installation script- Various dotfiles (
.gitconfig,.tmux.conf, etc.)
run_once_*.sh.tmpl- Scripts that run once during setup*.tmpl- Template files with variables/conditionals- Regular files - Deployed as-is to home directory
After installation, you'll have access to these utility scripts:
install_brew- Install Homebrew and packages from Brewfileinstall_vim- Set up Vim with plugins and configurationinstall_cursor_agent- Install Cursor AI agent CLI tool (utility)install_tmux- Install and configure tmux
upgrade_brew- Update Homebrew and all packagesupdate_vim- Update Vim pluginssetup_hugo_completion- Set up Hugo bash completion
git-ignore- Add files to .gitignoregit-author-rewrite.sh- Rewrite commit author historygit-repull-ship.bash- Git workflow helper
ps-rss,ps-priv-dirty-rss- Memory usage toolsgettarz,subvertarz- Archive utilitiesvidslurp- Video processing tool
The bootstrap process runs automated setup scripts located in .chezmoiscripts/:
- run_once_install-packages.sh.tmpl: Installs Homebrew, all Brewfile packages, and Cursor Agent CLI
- run_once_setup-vim.sh.tmpl: Configures Vim with plugins from the dotvim repository
- run_once_configure-shell.sh.tmpl: Sets up bash shell with helpful aliases and PATH
- run_once_configure-git.sh.tmpl: Configures Git with user information and useful aliases
- run_once_configure-macos.sh.tmpl: Configures macOS preferences (only on macOS)
- Scripts are located in the
.chezmoiscripts/directory - They run automatically during
chezmoi init --applyorchezmoi apply - The
run_once_prefix ensures they only run once per machine (tracked by chezmoi) - The
.tmplextension allows for templating with variables and conditionals - Scripts handle the complete system setup automatically
Some scripts use templating to provide different settings for work vs. personal machines:
# The script will prompt you when setting up a new machine
{{- if (eq .chezmoi.hostname "work-laptop") }}
# Work-specific settings
{{- else }}
# Personal settings
{{- end }}This repository was migrated from a traditional dotfiles setup to chezmoi. For migration details, see migrate-to-chezmoi.md.
The GitHub repository is the authoritative source of truth for your dotfiles.
All your dotfiles are version-controlled in this repository. When you make changes through chezmoi, they are:
- Saved in your GitHub repository
- Applied to your local system
- Available to sync to other machines
# 1. Edit a dotfile
chezmoi edit ~/.bash_profile
# 2. Apply the changes to your home directory
chezmoi apply
# 3. Commit and push to GitHub
chezmoi cd -- git commit -m "Update bash profile" && git pushThat's it! Your changes are now tracked and synchronized.
- GitHub repository: The master copy of your dotfiles
- ~/.local/share/chezmoi: Local copy of the repository
- Your home directory (~): Where the actual dotfiles are used by your system
Method 1 (Recommended):
# Edit through chezmoi (this is the best way)
chezmoi edit ~/.bashrc
# Apply changes to your home directory
chezmoi apply
# Commit and push
chezmoi cd -- git commit -m "Update bashrc" && git pushMethod 2:
# Edit directly
vim ~/.bashrc
# Add changes to chezmoi
chezmoi add ~/.bashrc
# Apply changes
chezmoi apply
# Commit and push
chezmoi cd -- git commit -m "Update bashrc" && git push# Add a new config file
chezmoi add ~/.my_new_config
# Commit and push
chezmoi cd -- git commit -m "Add new config" && git push# One command to install chezmoi and apply your dotfiles
curl -fsLS https://raw.githubusercontent.com/cloudartisan/dotfiles/master/bootstrap-chezmoi.sh | bash -s -- --applyThis will:
- Install chezmoi
- Clone your dotfiles repository
- Run all automated setup scripts from
.chezmoiscripts/ - Install Homebrew and all packages from Brewfile
- Install and configure Cursor Agent CLI
- Configure shell, Vim, Git, and other tools
- Set up everything automatically
After you've pushed changes from one machine:
# On your other machines:
chezmoi updateThis pulls the latest changes from GitHub and applies them.
chezmoi edit ~/.file- Edit a dotfilechezmoi add ~/.file- Track a new filechezmoi diff- Preview changes before applyingchezmoi apply- Apply changes to your home directorychezmoi update- Pull and apply latest changes from GitHubchezmoi cd -- git command- Run git commands in the repository
- Always use
chezmoi editinstead of editing files directly - Review changes with
chezmoi diffbefore applying - Commit and push regularly
- Use .chezmoiignore to exclude sensitive files (like .bash_history)
- Use templates for machine-specific configurations
MIT