Skip to content

Configuration file

chezmoi searches for its configuration file according to the XDG Base Directory Specification and supports JSON, TOML, and YAML. The basename of the config file is chezmoi, and the first config file found is used.

In most installations, the config file will be read from ~/.config/chezmoi/chezmoi.$FORMAT, where $FORMAT is one of json, toml, or yaml. The config file can be set explicitly with the --config command line option. By default, the format is detected based on the extension of the config file name, but can be overridden with the --config-format command line option.


    "sourceDir": "/home/user/.dotfiles",
    "git": {
        "autoPush": true
sourceDir = "/home/user/.dotfiles"
    autoPush = true
sourceDir: /home/user/.dotfiles
    autoPush: true