Manage your dotfiles across multiple diverse machines, securely.

Overview

chezmoi logo chezmoi

GitHub Release

Manage your dotfiles across multiple diverse machines, securely.

With chezmoi, you can install chezmoi and your dotfiles on a new, empty machine with a single command:

$ sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply <github-username>

Updating your dotfiles on any machine is a single command:

$ chezmoi update


How do I start with chezmoi now?

Install chezmoi then read the quick start guide. The how-to guide covers most common tasks, and there's both documentation on templating and frequently asked questions for specific questions. You can browse other people's dotfiles that use chezmoi on GitHub and on GitLab, and see how chezmoi compares to other dotfile managers. For a full description of chezmoi, consult the reference.


What does chezmoi do and why should I use it?

chezmoi helps you manage your personal configuration files (dotfiles, like ~/.zshrc) across multiple machines.

chezmoi is helpful if you have spent time customizing the tools you use (e.g. shells, editors, and version control systems) and want to keep machines running different accounts (e.g. home and work) and/or different operating systems (e.g. Linux, macOS, and Windows) in sync, while still being able to easily cope with differences from machine to machine.

chezmoi scales from the trivial (e.g. copying a few dotfiles onto a Raspberry Pi, development container, or virtual machine) to complex long-lived multi-machine development environments (e.g. keeping any number of home and work, Linux, macOS, and Windows machines in sync). In all cases you only need to maintain a single source of truth (a single branch in git) and getting started only requires adding a single binary to your machine (which you can do with curl, wget, or scp).

chezmoi has strong support for security, allowing you to manage secrets (e.g. passwords, access tokens, and private keys) securely and seamlessly using a password manager and/or encrypt whole files with your favorite encryption tool.

If you do not personalize your configuration or only ever use a single operating system with a single account and none of your dotfiles contain secrets then you don't need chezmoi. Otherwise, read on...


What are chezmoi's key features?

Flexible

You can share as much configuration across machines as you want, while still being able to control machine-specific details. Your dotfiles can be templates (using text/template syntax). Predefined variables allow you to change behavior depending on operating system, architecture, and hostname. chezmoi runs on all commonly-used platforms, like Linux, macOS, and Windows. It also runs on less commonly-used platforms, like FreeBSD, OpenBSD, and Termux.

Personal and secure

Nothing leaves your machine, unless you want it to. Your configuration remains in a git repo under your control. You can write the configuration file in the format of your choice. chezmoi can retrieve secrets from 1Password, Bitwarden, gopass, KeePassXC, LastPass, pass, Vault, Keychain, Keyring, or any command-line utility of your choice. You can encrypt individual files with GnuPG or age. You can checkout your dotfiles repo on as many machines as you want without revealing any secrets to anyone.

Transparent

chezmoi includes verbose and dry run modes so you can review exactly what changes it will make to your home directory before making them. chezmoi's source format uses only regular files and directories that map one-to-one with the files, directories, and symlinks in your home directory that you choose to manage. If you decide not to use chezmoi in the future, it is easy to move your data elsewhere.

Declarative and robust

You declare the desired state of files, directories, and symbolic links in your source of truth and chezmoi updates your home directory to match that state. What you want is what you get. chezmoi updates all files and symbolic links atomically. You will never be left with incomplete files that could lock you out, even if the update process is interrupted.

Fast and easy to use

Using chezmoi feels like using git: the commands are similar and chezmoi runs in fractions of a second. chezmoi makes most day-to-day operations one line commands, including installation, initialization, and keeping your machines up-to-date. chezmoi can pull and apply changes from your dotfiles repo in a single command, and automatically commit and push changes.


I already have a system to manage my dotfiles, why should I use chezmoi?

Read the comparison of chezmoi to other dotfile managers.


How do people use chezmoi?

Dotfile repos using chezmoi

Have a look at people using chezmoi on GitHub and on GitLab.

People talking about chezmoi

Read what people have said about chezmoi.


What documentation is available?


License

MIT


Issues
  • Recommendations for dealing with dynamically named directories

    Recommendations for dealing with dynamically named directories

    What exactly are you trying to do?

    I intend to switch to chezmoi from Stow (partly because my install script is spiralling out of control as you describe in the comparison, and partly so I can include Windows/macOS/Termux) but before doing so I'd like to wrap my head around dealing with directories with dynamic names.

    The most notable example of this is Firefox, which assigns random prefixes to profile directories by default e.g. (edited for brevity)

    > tree -d ~/.mozilla/firefox/profiles
    ~/.mozilla/firefox/profiles
    ├── 1io09dal.default-release
    ├── 5adf213y.default-nightly
    └── n32lkdfa.default
    

    where 1io09dal, 5adf213y and n32lkdfa can be any random string of letters and digits as far as I'm aware.

    I'm not entirely sure if there is an elegant way to handle this with chezmoi itself as I'm aware 1:1 mappings are preferred.

    At the moment I'm thinking the best method to deal with this is something like the following:

    1. Map the files and templates to an intermediate directory, such as ~/.config/firefox/profiles/default-release etc.
    2. Run chezmoi apply
    3. Run a script after chezmoi apply to link or copy the files to the correct directory

    I'm interested to see if you have any thoughts or recommendations regarding this.

    What have you tried so far?

    N/A

    Where else have you checked for solutions?

    Output of any commands you've tried with --verbose

    N/A

    Output of chezmoi doctor

    N/A

    Additional context

    N/A

    support 
    opened by bradenhilton 45
  • chezmoi users: Please help with testing chezmoi2

    chezmoi users: Please help with testing chezmoi2

    What's new and what's changing in chezmoi v2: https://github.com/twpayne/chezmoi/blob/master/docs/CHANGES.md

    If you're not interested, click the "Unsubscribe" button in this GitHub issue.

    chezmoi v2 is close to being released and adds a huge number of new features while being almost completely backwards-compatible with v1. Thanks to testing by many contributors in #987, the code in chezmoi's master branch can be considered "release candidate 1".

    You can grab pre-built binaries of the latest build of master (click on the most recent successful build, and then scroll down to the bottom of the page to find the build artifacts: there are Linux, macOS, and Windows binaries here). Or, you can build chezmoi from source (note that you need Go 1.16 now).

    Please report any problems you find by either replying here or opening a new GitHub issue.

    cc people who have opened issues that are fixed in v2 and/or already helped with testing or have a dotfiles repo using chezmoi with five or more stars or have been active recently: @3v1n0 @Croissong @JustinGrote @Legion2 @MurzNN @TsekNet @alker0 @angristan @beaussan @benmezger @caedes @caius @contrun @felipecrs @fwSmit @goooseman @gotgenes @jackmac92 @kitos9112 @m-rey @markstos @oscarbenedito @ptxmac @relaxdiego @renard @renemarc @schuerg @sersorrel @szorfein @terminalmage @vogu66 @woneill @zb140 @zuntik

    If you're not interested, click the "Unsubscribe" button in this GitHub issue.

    help wanted 
    opened by twpayne 35
  • chezmoi2: Contributors, please help with beta testing

    chezmoi2: Contributors, please help with beta testing

    With #654 merged, chezmoi version 2 is now ready for beta testing. I'd really appreciate it if you could test it on your machines. At the moment, this requires you need to be familiar with Go development to build and install it locally. Packages, snaps, etc. will follow later.

    Quick notes:

    • You should not need to change anything in your source state. Note that when you run chezmoi2 apply for the first time your run_once_ scripts will run again.
    • The goal of chezmoi2 is to enable some new features (e.g. chezmoi2 status) and fix various corner-case bugs that were hard to fix with chezmoi1's architecture. Even though chezmoi2 is a complete re-write internally, to the end user, chezmoi2 is not radically different to chezmoi1.
    • Read a rough draft of what's changed.
    • See the v2.0.0 milestone for individual issues.
    • Right now it's in a separate subdirectory, install it by checking out the master branch and running go install ./chezmoi2.
    • It should be safe to use, but please use chezmoi2 diff and/or use the --dry-run option to check changes before you apply them.
    • The separate chezmoi2 directory and command name are temporary: eventually chezmoi2 will replace chezmoi1.

    Specific ways to help:

    • Please install and run chezmoi2 and report anything that seems strange or suspicious in this issue, please don't open new issues yet.
    • There are a lot of integration tests in chezmoi2/testdata/scripts. More tests are very welcome!
    • Please prefix PRs that affect chezmoi2 with the string chezmoi2:.

    What happens next:

    • chezmoi2 gets tested a bit more, hopefully by you, to shake out the initial bugs.
    • Once chezmoi2 seems mostly stable, I'll update the release processes to produce beta releases for wider testing.
    • Once the beta has been more widely tested, chezmoi2 will replace chezmoi.

    cc @benmezger @Grimler91 @felipecrs @fwSmit @Legion2 @zb140

    help wanted 
    opened by twpayne 30
  • Improve Windows support

    Improve Windows support

    chezmoi is currently targeted at macOS/Linux, but there is no reason why it shouldn't also run on Windows. Contributions improving Windows support are very welcome.

    enhancement help wanted 
    opened by twpayne 28
  • New template function for capturing the output of the `template` function

    New template function for capturing the output of the `template` function

    Is your feature request related to a problem? Please describe.

    I have:

    ❯ cat ~/.dotfiles/home/.chezmoitemplates/get-latest-github-release
    {{- $url :=  printf "https://github.com/%s/releases/latest" . -}}
    {{- output "curl" "-fsSL" "-o" "/dev/null" "-w" "%{url_effective}" $url | trim | base -}}
    

    And I would like to use it like so:

    ❯ cat ~/.dotfiles/home/.chezmoiexternal.yaml
    {{ $denoVersion := template "get-latest-github-release" "denoland/deno" -}}
    ".deno/bin/deno":
      type: file
      url: "https://github.com/denoland/deno/releases/download/{{ $denoVersion }}/deno-x86_64-unknown-linux-gnu.zip"
      executable: true
      filter:
        command: zcat
    

    But it's not possible, because:

    $ chezmoi execute-template '{{ $denoVersion := template "get-latest-github-release" "denoland/deno" }}{{ $denoVersion }}'
    chezmoi: template: arg1:1: unexpected <template> in command
    

    EDIT 1: I previously posted with the wrong error message above, which turns to be valid but posterior to the error originally reported, as pointed by @twpayne at here.

    EDIT 2: In the variable assignment, it was missing : before = as pointed by @twpayne at here. But that wasn't the cause of the issue, anyway.

    Describe the solution you'd like

    A function which would let me do that, as pointed in https://stackoverflow.com/a/40170999/12156188. So that I could do:

    $ chezmoi execute-template '{{ $denoVersion := execTemplate "get-latest-github-release" "denoland/deno" }}{{ $denoVersion }}'
    v1.16.1
    

    Describe alternatives you've considered

    I could not find any.

    Additional context

    My dotfiles is currently bloated with a lot of code duplication, and now I'm trying to clean it up by using some templates.

    enhancement 
    opened by felipecrs 26
  • Persist file permissions for group and other

    Persist file permissions for group and other

    First, as I have not said this yet, great tool! I was evaluating all kind of various dotfile tools and found this one to be the most well-thought implementation. Great job 😃

    Is your feature request related to a problem? Please describe.

    By example:

    # In my home directory
    ~> ll testingprivexec2.txt
    .rwx--x--x 7 userA groupA 24 May 10:56 testingprivexec2.txt*
    ~> chmod 711 testingprivexec2.txt
    ~> chezmoi add testingprivexec2.txt
    ~> chezmoi apply
    ~> ll testingprivexec2.txt
    .rwxrwxrwx 7 userA groupA 24 May 10:56 testingprivexec2.txt*
    

    If I set a specific group or other permission on a file in my home directory that is controlled by chezmoi, that permission is not persisted after a chezmoi apply. By experiment I've found it to use the umask, which does feel natural as that is how it works e.g. for git clone.

    It would be nice though if all file permissions could be persisted. It is possible this is not in the scope of chezmoi.

    Describe the solution you'd like

    I have not investigated this deeply, but here is an outlandish idea that at least works i git. Use git notes e.g. like shown here https://stackoverflow.com/a/5960171. This could also be used to store the private and executable info, so files did not have to get renamed to executable_ or private_ etc.

    Describe alternatives you've considered

    No alternatives considered.

    enhancement 
    opened by thernstig 22
  • chezmoi edit opens empty file

    chezmoi edit opens empty file

    Just getting started with chezmoi and following the quick start guide.

    Not sure if this is a bug or if I messed something up so I'll initially open this as a support request.

    Steps taken:

    brew install chezmoi
    
    chezmoi init
    chezmoi add ~/.config/zsh/.zshrc
    chezmoi manged
    # .config
    # .config/zsh
    # .config/zsh/.zshrc
    
    chezmoi cd
    tree
    # .
    # └── dot_config
    #    └── zsh
    #       └── dot_zshrc
    

    Everything working as expected thus far.

    However, the following command opens an empty file in my editor.

    chezmoi edit ~/.config/zsh/.zshrc
    

    The path of this empty file is:

    /var/folders/qd/q3pwnzn97rbdwqsbjcxdqhg40000gn/T/chezmoi-edit533837452/.config/zsh/.zshrc

    My expectation was for .zshrc or dot_zshrc to be opened.

    If I don't use chezmoi edit and just manually open and edit the source or dot_zshrc file, everything works as expected.

    Thanks 🙏. Amazing program by the way 😍

    support 
    opened by theurgi 21
  • Add arguments to

    Add arguments to "chezmoi unmanaged" and "chezmoi managed"

    Fixes twpayne/chezmoi#1985.

    Allow arguments on chezmoi managed and unmanaged. Per recommendations on twpayne/chezmoi#1985, no additional flags are added to either commands, and behaviors are very similar to the respective commands without arguments (such as not recursing into directories).

    $ chezmoi unmanaged ~/.ssh ~/.gnupg
    (list unmanaged files under the arguments)
    $ chezmoi managed ~/.config/git ~/scripts
    (list managed files under the arguments)
    

    Note that in consideration of duplicated arguments and outputs, sorting and deduplication is done on both the arguments and the outputs for unmanaged, and on the outputs for managed. This helps with the following hypothetical situation (exaggerated to hopefully convey the idea more clearly):

    $ chezmoi unmanaged ~/{,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,}
    (extremely duplicated lines of output)
    $ chezmoi unmanaged ~/.config/{,a,b,c,d,e,f,g,h,*}
    (outputs for a..h are duplicated many times)
    
    opened by RuijieYu 18
  • The best way to add .oh-my-zsh plugins that don't have a repo

    The best way to add .oh-my-zsh plugins that don't have a repo

    What exactly are you trying to do?

    Several command line tools provide ways to add command completions to ZSH but don't provide a static file that can be integrated into .chezmoiexternal.toml using either external repo configuration. For example, in order to add bitwarden command completions to zsh through .oh-my-zsh, you have to run the following command to generate the completion file1:

    mkdir $ZSH_CUSTOM/plugins/bw
    bw completion --shell zsh | sudo tee $ZSH_CUSTOM/plugins/bw/_bw
    

    Because I don't see a place where this file exists statically (it looks like it's being rendered), I need a way to include it through a different means.

    What have you tried so far?

    My first thought was to just include it like a normal file in chezmoi. So I ran:

    chezmoi add $ZSH_CUSTOM/plugins/bw --recursive

    after having already run the bw completion command to generate the file. The problem here is that the file gets added to chezmoi's repo at the base level, i.e. $(chezmoi source-path)/plugins/bw/_bw, which is not the correct position to be installed in for .oh-my-zsh to pick it up. Perhaps this is because .oh-my-zsh is in the .chezmoiexternal.toml? The effect is that chezmoi apply or using chezmoi on another machine causes _bw to be pull into $HOME/plugins/bw/_bw and for the plugin to not be loaded.

    Where else have you checked for solutions?

    Output of any commands you've tried with --verbose flag

    ❯ chezmoi add --verbose $ZSH_CUSTOM/plugins/bw --recursive
    diff --git a/exact_plugins/bw b/exact_plugins/bw
    new file mode 40755
    index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
    --- /dev/null
    +++ b/exact_plugins/bw
    diff --git a/exact_plugins/bw/_bw b/exact_plugins/bw/_bw
    new file mode 100644
    index 0000000000000000000000000000000000000000..69beaf6e3ba428bb6ca66c005f6af743c804d972
    --- /dev/null
    +++ b/exact_plugins/bw/_bw
    @@ -0,0 +1,414 @@
    +#compdef _bw bw
    +
    +function _bw {
    ... ( a bunch of other output of the contents of the file that I feel is impertinent to this issue)
    

    and the subsequent chezmoi diff

    ❯ chezmoi diff --verbose
    diff --git a/.oh-my-zsh/custom/plugins/bw b/.oh-my-zsh/custom/plugins/bw
    deleted file mode 40755
    index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
    --- a/.oh-my-zsh/custom/plugins/bw
    +++ /dev/null
    diff --git a/.oh-my-zsh/custom/plugins/gh b/.oh-my-zsh/custom/plugins/gh
    deleted file mode 40755
    index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
    --- a/.oh-my-zsh/custom/plugins/gh
    +++ /dev/null
    diff --git a/.oh-my-zsh/custom/plugins/poetry b/.oh-my-zsh/custom/plugins/poetry
    deleted file mode 40755
    index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
    --- a/.oh-my-zsh/custom/plugins/poetry
    +++ /dev/null
    diff --git a/plugins b/plugins
    new file mode 40755
    index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
    --- /dev/null
    +++ b/plugins
    diff --git a/plugins/bw b/plugins/bw
    new file mode 40755
    index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
    --- /dev/null
    +++ b/plugins/bw
    diff --git a/plugins/bw/_bw b/plugins/bw/_bw
    new file mode 100644
    index 0000000000000000000000000000000000000000..69beaf6e3ba428bb6ca66c005f6af743c804d972
    --- /dev/null
    +++ b/plugins/bw/_bw
    @@ -0,0 +1,414 @@
    +#compdef _bw bw
    +
    ... cut for brevity ...
    +function _bw_receive {
    +  _arguments -C \
    +    '--password[Password needed to access the Send.]' \
    +    '--passwordenv[Environment variable storing the Send'"'"'s password]' \
    +    '--passwordfile[Path to a file containing the Sends password as its first line]' \
    +    '--obj[Return the Send'"'"'s json object rather than the Send's content]' \
    +    '--output[Specify a file path to save a File-type Send to]' \
    +    '(-h --help)'{-h,--help}'[output usage information]' \
    +    "*::arg:->args"
    +}
    \ No newline at end of file
    diff --git a/plugins/gh b/plugins/gh
    new file mode 40755
    index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
    --- /dev/null
    +++ b/plugins/gh
    diff --git a/plugins/gh/_gh b/plugins/gh/_gh
    new file mode 100644
    index 0000000000000000000000000000000000000000..dfce760b6c84c509d4fe1c67e888dd2f38dcacc3
    --- /dev/null
    +++ b/plugins/gh/_gh
    @@ -0,0 +1,177 @@
    +#compdef _gh gh
    +
    .. cut for brevity ...
    +# don't run the completion function when being source-ed or eval-ed
    +if [ "$funcstack[1]" = "_gh" ]; then
    +	_gh
    +fi
    diff --git a/plugins/poetry b/plugins/poetry
    new file mode 40755
    index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
    --- /dev/null
    +++ b/plugins/poetry
    diff --git a/plugins/poetry/_poetry b/plugins/poetry/_poetry
    new file mode 100644
    index 0000000000000000000000000000000000000000..b297e88d38907f7b28d09bbdfa8d8c806a48c13b
    --- /dev/null
    +++ b/plugins/poetry/_poetry
    @@ -0,0 +1,135 @@
    +#compdef poetry
    +
    ... cut for brevity...
    +_poetry_0083e2c55c594e6f_complete "[email protected]"
    +compdef _poetry_0083e2c55c594e6f_complete /home/lund/.local/share/pypoetry/venv/bin/poetry
    

    Output of chezmoi doctor

    ❯ chezmoi doctor --verbose
    RESULT   CHECK                MESSAGE
    ok       version              v2.7.5, commit 53bb61524468afe3262d6d8089fdc6912dbccb34, built at 2021-11-07T21:20:58Z, built by goreleaser
    ok       os-arch              linux/amd64 (Ubuntu 20.04.3 LTS (Focal Fossa))
    ok       executable           /snap/chezmoi/307/chezmoi
    ok       config-file          no config file found
    ok       source-dir           ~/.local/share/chezmoi is a directory
    ok       suspicious-entries   no suspicious entries
    ok       working-tree         ~/.local/share/chezmoi is a directory
    ok       dest-dir             ~ is a directory
    ok       shell                found /bin/bash
    ok       edit-command         found /usr/bin/vim
    ok       umask                022
    ok       git-command          found /usr/bin/git, version 2.25.1
    ok       merge-command        found /usr/bin/vimdiff
    ok       age-command          age not found in $PATH
    ok       gpg-command          found /usr/bin/gpg, version 2.2.19
    info     pinentry-command     not set
    info     1password-command    op not found in $PATH
    failed   bitwarden-command    found /snap/bin/bw, could not parse version from Warning: Ignoring extra certs from `/usr/local/share/ca-certificates/dyneticsroot.crt`, load failed: error:02001002:system library:fopen:No such file or directory
    1.19.1
    info   gopass-command      gopass not found in $PATH
    info   keepassxc-command   keepassxc-cli not found in $PATH
    info   keepassxc-db        not set
    info   lastpass-command    lpass not found in $PATH
    info   pass-command        pass not found in $PATH
    info   vault-command       vault not found in $PATH
    info   secret-command      not set
    

    Additional context

    I'm pretty sure you can ignore the bitwarden error shown in chezmoi doctor as I have the snap installed which has some permission issues accessing a certificate. Seeing as I'm not currently using bitwarden for this setup, I don't think it affects this issue.

    support 
    opened by jaron-l 18
  • Add option: use symlink to replace destination

    Add option: use symlink to replace destination

    opened by BSDxxxx 18
  • exec format error after creating `run_once_install-packages.sh`

    exec format error after creating `run_once_install-packages.sh`

    What exactly are you trying to do?

    I created a run_once_install-packages.sh file by renaming an existing file using:

    `mv one_time_setup.sh run_once_install-packages.sh

    (I made some modifications to a manual setup file I already had to make it compatible with chezmoi.)

    What have you tried so far?

    Here are the results of running the normal set of commands to apply a change.

    chezmoi status

    R install-packages.sh

    chezmoi apply -nv

    chezmoi: fork/exec /var/folders/tf/t3s0xffn49z7jmhzj82dn6q00000gn/T/1436228616.install-packages.sh: exec format error

    Where else have you checked for solutions?

    Output of any commands you've tried with --verbose flag

    $ chezmoi --verbose $COMMAND
    

    diff --git a/install-packages.sh b/install-packages.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ea52a1da1af9663822f38a3708eb318c7d0867be 100755 --- a/install-packages.sh +++ b/install-packages.sh @@ -0,0 +1,13 @@ +# THIS SCRIPT IS RUN ONCE BY CHEZMOI TO SET UP. + +{{ if eq .chezmoi.os "darwin" -}} +#!/usr/bin/zsh +# Install Chezmoi (Dotfile manager.) +brew install chezmoi + +# Antigen (Package manager for zsh) +brew install antigen + +# Install Vundle (package manager for Vim). +git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim +{{ end -}} chezmoi: fork/exec /var/folders/tf/t3s0xffn49z7jmhzj82dn6q00000gn/T/537353732.install-packages.sh: exec format error

    Output of chezmoi doctor

    $ chezmoi doctor
    

    RESULT CHECK MESSAGE ok version v2.17.1, commit 565cbbe117746aa6bfec5f2cee20ae4cbbb5e645, built at 2022-05-30T08:06:04Z, built by Homebrew ok latest-version v2.17.1 ok os-arch darwin/amd64 ok uname Darwin noahs-mac-pro.lan 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64 ok go-version go1.18.2 (gc) ok executable /usr/local/bin/chezmoi ok upgrade-method replace-executable ok config-file ~/.config/chezmoi/chezmoi.toml ok source-dir ~/.local/share/chezmoi is a directory ok suspicious-entries no suspicious entries ok working-tree ~/.local/share/chezmoi is a directory ok dest-dir ~ is a directory ok shell-command found /bin/zsh ok shell-args /bin/zsh ok cd-command found /bin/zsh ok cd-args /bin/zsh ok edit-command found /usr/bin/vim ok edit-args vim info diff-command not set ok umask 022 ok git-command found /usr/bin/git, version 2.30.1 ok merge-command found /usr/bin/vimdiff info age-command age not found in $PATH info gpg-command gpg not found in $PATH info pinentry-command not set info 1password-command op not found in $PATH info bitwarden-command bw not found in $PATH info gopass-command gopass not found in $PATH info keepassxc-command keepassxc-cli not found in $PATH info keeper-command keeper not found in $PATH info keepassxc-db not set info lastpass-command lpass not found in $PATH info pass-command pass not found in $PATH info vault-command vault not found in $PATH info secret-command not set

    support 
    opened by Noahyt 17
  • Overwrite change handling for `modify_` scripts

    Overwrite change handling for `modify_` scripts

    Is your feature request related to a problem? Please describe.

    When a settings file has changed on the system chezmoi apply will ask if I want to overwrite/diff the changes. This feature isn't available when using modify_ scripts. For example when I use my chezmoi_modify_manager to handle KDE settings files.

    Describe the solution you'd like

    I would like some way to interact with the overwrite-detection logic from modify_ scripts. Or perhaps a way to present my own such prompt (as stdout and stdin is captured by chezmoi this doesn't currently work). Like any programmer I would like to do the least amount of work myself, so I would like to piggyback on what functionality chezmoi has as much as possible. Maybe a way to query if the modified file has changed since chezmoi last applied it and what the change is?

    Describe alternatives you've considered

    I considered implementing all the required machinery in my modify script, but as chezmoi captures stdout this presents some problems with the user interaction. Even if I could use stderr for output, stdin is also redirected by chezmoi making this a non-starter, as I could not interact with the user.

    In addition, such an approach would result in a significant amount of reimplementation of functionality that is already in chezmoi.

    Additional context

    Add any other context or screenshots about the feature request here.

    enhancement 
    opened by VorpalBlade 0
  • [feat] interactive input when `init --apply`

    [feat] interactive input when `init --apply`

    Is your feature request related to a problem? Please describe.

    $ chezmoi init --apply dotfile-repo
    chezmoi: template: dot_XXX.tmpl:XXX:XXX: executing "dot_XXX.tmpl" 
    at <.XXX.XXX>: map has no entry for key "XXX"
    

    Describe the solution you'd like

    Provide interactive input.

    Dotfiles management is very like project kickstarter.

    Project kickstarter yeoman provides beautiful interactive input using inquirer. Tab-able, and input-able, default values, etc.

    I think it would be awesome to got that beautiful interactive input in chezmoi.

    Describe alternatives you've considered

    Additional context

    enhancement 
    opened by loynoir 0
  • Add more config management functions

    Add more config management functions

    Is your feature request related to a problem? Please describe.

    Functions are primarily limited to the Sprig library, which does not handle a lot of common config management functions.

    Describe the solution you'd like

    I'd like to see more functions available to address config management. The main functions here would to:

    • fromToml
    • toToml
    • fromIni
    • toIni
    • replaceRE
    • partial and return
    • comment

    Additionally any merge functionality that may not be covered by Sprig functions. This helps streamline a common use case of overriding default config file values.

    fromToml, toToml, fromIni, and toIni are all pretty self-explanatory. Here are some examples of where those are already implemented in Go.

    1. https://gohugo.io/functions/transform.unmarshal/
    2. https://docs.gomplate.ca/functions/data/
    3. https://github.com/go-ini/ini

    replaceRE is the name of a function in Hugo^1 that allows for proper pipelining^2 and a limit parameter.

    partials are like templates^3, except that you can do pipelining on the results, with an optional return function^4 in the partial template.

    comment is very similar to the indent Sprig functions, and takes inspiration from an Ansible filter^5. This would take either a single or multiline string and adds the specified comment character(s) at the beginning of each newline. A common use case for this is a disclaimer for users that may try editing a file directly outside of the sourceDir:


    .local/share/chezmoi/.chezmoitemplates/disclaimer

    This file is managed by chezmoi. Do not edit!
    To change it, modify {{ joinPath .chezmoi.sourceDir .chezmoi.sourceFile }}
    

    .local/share/chezmoi/private_dot_config/example/exampleconfig.conf.tmpl

    partial "examplepartial" | comment "#"
    

    Describe alternatives you've considered

    I've already to the larger extent implemented these in each file template, but it requires a lot of duplication.

    enhancement 
    opened by mcexit 4
  • Add a way to easily invoke chezmoi non-interactively even if using prompt* functions with answers on the CLI or from a file

    Add a way to easily invoke chezmoi non-interactively even if using prompt* functions with answers on the CLI or from a file

    Is your feature request related to a problem? Please describe.

    To support non-interactive usage of chezmoi when using for example codespaces or devcontainers, you need to manually add logic to run non-interactively to your config file. This is cumbersome and serves as an hurdle for using your dotfiles in this scenario.

    Describe the solution you'd like

    Add a way to work non-interactively even when using prompt* functions by allowing to supply answers on the CLI or by loading an answers file containing them.

    Describe alternatives you've considered

    Keep doing this manually in the config file template, which is no fun.

    Additional context

    I'm not sure devcontainers allow to easily mount such an additional file, so to use answers from a file ATM you might have to commit it to the dotfiles repo.

    enhancement 
    opened by segevfiner 4
  • Inverse of

    Inverse of "overwrite" (i.e. "accept") option for `chezmoi apply`

    Is your feature request related to a problem? Please describe.

    When running chezmoi apply and there has been an external modification to a chezmoi-managed file, chezmoi v2.17.2 will prompt what to do with the file:

    $ chezmoi apply
    .iterm2/com.googlecode.iterm2.plist has changed since chezmoi last wrote it [diff,overwrite,all-overwrite,skip,quit]?
    

    The command reference for "chezmoi apply" doesn't explain which file (the source (chezmoi state) or the target (local state)) gets overwritten when choosing the "overwrite" option, but after testing it I believe it is the target file that gets overwritten from the source.

    For files which are most frequently changed externally, i.e. without use of chezmoi edit (in the example above, the iTerm2 configuration file, which reflects changes the user makes from the app's UI), overwriting the target file is likely to be the opposite of the desired action: it is the source file which should be updated from the target file's state.

    From what I understand, users have to chezmoi add (actually re-add) each file for which they want chezmoi to accept the local state each time it changes. This is cumbersome, especially if there are many of these files.

    Describe the solution you'd like

    I believe adding "accept"/"all-accept" (or any other sensibly-named) prompts to the output of chezmoi apply which allows the target file(s) to overwrite the source file(s) when there are conflicts would be a significant QoL improvement.

    $ chezmoi apply 
    .iterm2/com.googlecode.iterm2.plist has changed since chezmoi last wrote it [diff,overwrite,all-overwrite,accept,all-acceptskip,quit]?
    

    (Also, documenting the semantics of each of these prompt options in the command reference for chezmoi apply would help.)

    Describe alternatives you've considered

    Instead of adding the "accept (all) local modifications" functionality to chezmoi apply, this could also be a new command or part of another command.

    Additional context

    Chances are I'm just misunderstanding how to get chezmoi to accept local changes to managed files, though.

    enhancement patience 
    opened by msewell 2
Releases(v2.20.0)
Kubernetes Virtualization API and runtime in order to define and manage virtual machines.

Kubernetes Virtualization API and runtime in order to define and manage virtual machines.

KubeVirt 3.4k Aug 6, 2022
Dotsync - Dotfiles manager without symlinks

dotsync dotfiles manager without symlinks Getting Started SYNOPSIS $ dotsync rep

KADOTA, Kyohei 1 Feb 12, 2022
Kubernetes is an open source system for managing containerized applications across multiple hosts.

Kubernetes Kubernetes is an open source system for managing containerized applications across multiple hosts. It provides basic mechanisms for deploym

null 0 Nov 25, 2021
VaultOperator provides a CRD to interact securely and indirectly with secrets stored in Hashicorp Vault.

vault-operator The vault-operator provides several CRDs to interact securely and indirectly with secrets. Details Currently only stage 1 is implemente

finleap connect 3 Mar 12, 2022
Command-line tool to remotely execute commands on Windows machines through WinRM

winrm-cli This is a Go command-line executable to execute remote commands on Windows machines through the use of WinRM/WinRS. Note: this tool doesn't

Brice Figureau 142 Jul 21, 2022
The smart virtual machines manager. A modern CLI for Vagrant Boxes.

The smart virtual machines manager Table of Contents: What is Vermin Install Vermin Usage Contributors TODO What is Vermin Vermin is a smart, simple a

Muhammad Hewedy 123 Jul 27, 2022
Infrastructure testing helper for AWS Resources that uses AWS SSM to remotely execute commands on EC2 machines.

Infrastructure testing helper for AWS Resources that uses AWS SSM to remotely execute commands on EC2 machines, to enable infrastructure engineering teams to write tests that validate behaviour.

Ankit Wal 18 Jul 28, 2022
Natural-deploy - A natural and simple way to deploy workloads or anything on other machines.

Natural Deploy Its Go way of doing Ansibles: Motivation: Have you ever felt when using ansible or any declarative type of program that is used for dep

Akilan Selvacoumar 0 Jan 3, 2022
S3pd - CLI utility that downloads multiple s3 objects at a time, with multiple range-requests issued per object

S3 Parallel Downloader CLI utility that downloads multiple s3 objects at a time,

Colin Bookman 2 May 13, 2022
DepCharge is a tool designed to help orchestrate the execution of commands across many directories at once.

DepCharge DepCharge is a tool that helps orchestrate the execution of commands across the many dependencies and directories in larger projects. It als

Andrew LeTourneau 22 Jul 16, 2022
Beagle is a CLI written in Go to search for an specific username across the Internet.

Beagle __ \,--------/_/'--o Use beagle with /_ ___ /~" responsibility. /_/_/ /_/_/ ^^^^^^^^^^^^^^^^^^ Beagle is a CLI w

Daniel 30 Aug 3, 2022
Developer Self-Service Across Clusters

Monoskope (m8) Monoskope (short m8 spelled "mate") implements the management and operation of tenants, users and their roles in a Kubernetes multi-clu

finleap connect 6 Jul 6, 2022
kcount counts Kubernetes (K8s) objects across clusters.

kcount counts Kubernetes (K8s) objects across clusters. It gets the cluster configuration, including cluster name and namespace, from kubeconfig files

Deutsche Telekom Pan-Net 4 Jun 13, 2022
Enforcing per team quota (sum of used resources across all their namespaces) and delegating the per namespace quota to users.

Quota Operator Enforcing per team quota (sum of used resources across all their namespaces) and delegating the per namespace quota to users. Instructi

Snapp Cab Incubators 17 Aug 4, 2022
A Kubernetes operator that allows for automatic provisioning and distribution of cert-manager certs across namespaces

cached-certificate-operator CachedCertificate Workflow When a CachedCertificate is created or updated the operator does the following: Check for a val

Weave Development Lab 3 Jul 1, 2022
Jenkins CLI allows you manage your Jenkins as an easy way

Quick start 简体中文 Jenkins CLI Jenkins CLI allows you manage your Jenkins in an easy way. No matter if you're a plugin developer, administrator or just

Jenkins Chinese Community 331 Aug 7, 2022
Manage your ssh alias configs easily.

manssh manssh is a command line tool for managing your ssh alias config easily, inspired by storm project, powered by Go. Note: This project is actual

Wendell Sun 268 Aug 9, 2022
🐶 Kubernetes CLI To Manage Your Clusters In Style!

K9s - Kubernetes CLI To Manage Your Clusters In Style! K9s provides a terminal UI to interact with your Kubernetes clusters. The aim of this project i

Fernand Galiana 17.4k Aug 4, 2022
A tool that allows you to manage Kubernetes manifests for your services in a Git repository

kuberpult Readme for users About Kuberpult is a tool that allows you to manage Kubernetes manifests for your services in a Git repository and manage t

freiheit.com technologies 12 Jul 28, 2022