id = "chezmoi" name = "chezmoi" homepage = "https://www.chezmoi.io" description = "Manage your dotfiles across multiple diverse machines, securely." icon = "theSVG:chezmoi" executables = ["chezmoi"] [dotfiles] # https://www.chezmoi.io/reference/configuration-file/ — "chezmoi searches for # its configuration file according to the XDG Base Directory Specification", # reading $HOME/.config/chezmoi/chezmoi.$FORMAT on Unix and # %USERPROFILE%/.config/chezmoi/chezmoi.$FORMAT on Windows, where $FORMAT is # one of json, jsonc, toml or yaml. The two spell the same path here. paths = [ "~/.config/chezmoi/chezmoi.toml", "~/.config/chezmoi/chezmoi.yaml", "~/.config/chezmoi/chezmoi.json", "~/.config/chezmoi/chezmoi.jsonc", ] # internal/cmd/config.go, newConfigFile(): CacheDirAbsPath is # `bds.CacheHome/chezmoi`, and chezmoi's twpayne/go-xdg BaseDirectorySpecification # sets CacheHome to $XDG_CACHE_HOME, else ~/.cache, with no per-OS branch — the # XDG cache home on macOS too, hence [xdgCache] rather than [cacheHome]. exclude = ["[xdgCache]/chezmoi/"] # chezmoi holds no credential file of its own: secrets are pulled from an # external manager (1Password, pass, Bitwarden, …) when a template renders. secret = [] # Carrying these files between machines is chezmoi's entire job. self_sync = true # Every one of these is an absolute path to a directory on this machine — # see the "Variables" table at # https://www.chezmoi.io/reference/configuration-file/variables/ (cacheDir # "Cache directory", destDir "Destination directory", persistentState # "Location of the persistent state file", sourceDir "Source directory", # workingTree "git working tree directory"). A machine that relocated any of # them must keep its own value. Relocating any of them is the user's own doing # and has to be redone by hand on a rebuild, so the values are kept: backup. [[dotfiles.machine_lines]] file = "~/.config/chezmoi/chezmoi.toml" match = { key_path = ["sourceDir", "destDir", "cacheDir", "workingTree", "persistentState"] } scope = "backup" [[dotfiles.machine_lines]] file = "~/.config/chezmoi/chezmoi.yaml" match = { key_path = ["sourceDir", "destDir", "cacheDir", "workingTree", "persistentState"] } scope = "backup" [[dotfiles.machine_lines]] file = "~/.config/chezmoi/chezmoi.json" match = { key_path = ["sourceDir", "destDir", "cacheDir", "workingTree", "persistentState"] } scope = "backup" # chezmoi.jsonc gets no rule: JSONC is not one of the parsers a rule can name, # so a consumer could not apply it. [commands] format = 1 label = "chezmoi" description = "Apply and inspect your dotfiles. Adding, editing, secrets, encryption and state commands are left out." quality = "ai-draft" base = "fig:chezmoi" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/chezmoi.ts" license = "MIT" [[commands.subcommand]] path = ["apply"] label = "Apply dotfiles" description = "Update the destination directory to match the target state." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/chezmoi.ts" license = "MIT" [[commands.subcommand.field]] id = "target" label = "Targets" description = "Limit to these destination paths; empty means everything managed." type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "include" label = "Include types" description = "Entry types to include, comma separated." type = "string" option = ["--include", "-i"] sources = ["fig"] [[commands.subcommand.field]] id = "exclude" label = "Exclude types" description = "Entry types to exclude, comma separated." type = "string" option = ["--exclude", "-x"] sources = ["fig"] [[commands.subcommand.field]] id = "recursive" label = "Recurse" description = "Recurse into subdirectories." type = "boolean" option = ["--recursive", "-r"] sources = ["fig"] [[commands.subcommand.field]] id = "init" label = "Recreate config" description = "Recreate config file from template." type = "boolean" option = ["--init"] sources = ["fig"] [[commands.subcommand.task]] id = "apply" label = "Apply everything" fields = ["target"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["include", "exclude", "recursive", "init"] [[commands.subcommand]] path = ["diff"] label = "Show differences" description = "Print the diff between the target state and the destination state." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/chezmoi.ts" license = "MIT" [[commands.subcommand.field]] id = "target" label = "Targets" description = "Limit to these destination paths; empty means everything managed." type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "include" label = "Include types" description = "Entry types to include, comma separated." type = "string" option = ["--include", "-i"] sources = ["fig"] [[commands.subcommand.field]] id = "exclude" label = "Exclude types" description = "Entry types to exclude, comma separated." type = "string" option = ["--exclude", "-x"] sources = ["fig"] [[commands.subcommand.field]] id = "recursive" label = "Recurse" description = "Recurse into subdirectories." type = "boolean" option = ["--recursive", "-r"] sources = ["fig"] [[commands.subcommand.field]] id = "reverse" label = "Reverse" description = "Reverse the direction of the diff." type = "boolean" option = ["--reverse"] sources = ["fig"] [[commands.subcommand.field]] id = "builtin" label = "Builtin diff" description = "Use the builtin diff." type = "boolean" option = ["--use-builtin-diff"] sources = ["fig"] [[commands.subcommand.task]] id = "diff" label = "Diff everything" fields = ["target"] required = [] [[commands.subcommand.task]] id = "reverse" label = "Reverse diff" set = { reverse = [true] } fields = ["target", "reverse"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target", "reverse"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["include", "exclude", "recursive", "builtin"] [[commands.subcommand]] path = ["status"] label = "Status" description = "Show the status of targets." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/chezmoi.ts" license = "MIT" [[commands.subcommand.field]] id = "target" label = "Targets" description = "Limit to these destination paths; empty means everything managed." type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "include" label = "Include types" description = "Entry types to include, comma separated." type = "string" option = ["--include", "-i"] sources = ["fig"] [[commands.subcommand.field]] id = "exclude" label = "Exclude types" description = "Entry types to exclude, comma separated." type = "string" option = ["--exclude", "-x"] sources = ["fig"] [[commands.subcommand.field]] id = "recursive" label = "Recurse" description = "Recurse into subdirectories." type = "boolean" option = ["--recursive", "-r"] sources = ["fig"] [[commands.subcommand.task]] id = "status" label = "Status of everything" fields = ["target"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["include", "exclude", "recursive"] [[commands.subcommand]] path = ["init"] label = "Initialise" description = "Set up the source directory from a dotfiles repo. May also apply when --apply is set." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/chezmoi.ts" license = "MIT" [[commands.subcommand.field]] id = "source" label = "Repository" description = "Repo URL or GitHub user name." type = "string" position = 0 min = 1 sources = ["fig"] [[commands.subcommand.field]] id = "apply" label = "Apply afterwards" description = "Update destination directory." type = "boolean" option = ["--apply", "-a"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "branch" label = "Branch" description = "Set initial branch to checkout." type = "string" option = ["--branch"] sources = ["fig"] [[commands.subcommand.field]] id = "depth" label = "Clone depth" description = "Create a shallow clone." type = "integer" option = ["--depth", "-d"] sources = ["fig"] [[commands.subcommand.field]] id = "ssh" label = "Use SSH" description = "Use ssh instead of https when guessing dotfile repo URL." type = "boolean" option = ["--ssh"] sources = ["fig"] [[commands.subcommand.field]] id = "guess" label = "Guess repo URL" description = "Guess the repo URL." type = "boolean" option = ["--guess-repo-url", "-g"] sources = ["fig"] [[commands.subcommand.field]] id = "one_shot" label = "One-shot" description = "Run in one-shot mode." type = "boolean" option = ["--one-shot"] sources = ["fig"] [[commands.subcommand.task]] id = "init" label = "Clone only" fields = ["source", "branch", "ssh"] required = ["source"] [[commands.subcommand.task]] id = "apply" label = "Clone and apply" set = { apply = [true] } fields = ["source", "apply", "branch", "ssh"] required = ["source"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["source", "apply", "branch", "ssh"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["depth", "guess", "one_shot"]