Set up on a new machine:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply ant0nscAlternative: Install mise via
curl https://mise.run | shthen run
mise use --global chezmoiThen run chezmoi init --apply ant0nsc to set up the dotfiles.
Documentation: https://chezmoi.io/docs/
- Chezmoi state is stored in a Git repository at
~/.local/share/chezmoi. You can dogitcommands directly in that folder, or use thechezmoicommands below. - Add a new file (or a changed file) to chezmoi:
chezmoi add <file>- Example: you have modified
~/.gitconfigand want to add the changes to chezmoi, runchezmoi add ~/.gitconfig
- Example: you have modified
- Remove a file from chezmoi:
chezmoi remove <file> - Show the status of files managed by chezmoi:
chezmoi status- Similar to
git status, it shows the names of the files that have been modified, but not yet committed it to chezmoi
- Similar to
- Show all the differences between the current state and the state managed by chezmoi:
chezmoi diff- For example, it shows which changes you have made to
~/.bashrclocally, but not yet committed it to chezmoi
- For example, it shows which changes you have made to
- Edit a file managed by chezmoi:
chezmoi edit <file>- this will open the file in your default editor
$EDITOR
- this will open the file in your default editor
- Pull the latest changes from the remote repository and apply:
chezmoi update- You can add a
--dry-runflag to see what would happen without actually applying the changes
- You can add a