Skip to main content

Save your dotfiles once, deploy them everywhere

Project description


Tests Status Doc Status License: GPL v3 Coverage Status Language grade: Python

PyPI version AUR Python


Save your dotfiles once, deploy them everywhere

Dotdrop makes the management of dotfiles between different hosts easy. It allows to store your dotfiles on git and automagically deploy different versions of the same file on different setups.

It also allows to manage different sets of dotfiles. For example you can have a set of dotfiles for your home laptop and a different set for your office desktop. Those sets may overlap and different versions of the same dotfiles can be deployed on different predefined profiles. Or you may have a main set of dotfiles for your everyday’s host and a sub-set you only need to deploy to temporary hosts (cloud VM, etc) that may be using a slightly different version of some of the dotfiles.


  • Sync once every dotfile on git for different usages
  • Allow dotfiles templating by leveraging jinja2
  • Dynamically generated dotfile contents with pre-defined variables
  • Comparison between deployed and stored dotfiles
  • Handling multiple profiles with different sets of dotfiles
  • Easy import and update dotfiles
  • Handle files and directories
  • Support symlink of dotfiles
  • Associate actions to the deployment of specific dotfiles
  • Associate transformations for storing encrypted/compressed dotfiles
  • Provide solutions for handling dotfiles containing sensitive information

Check also the blog post, the example, the documentation or how people are using dotdrop for more.

Quick start:

mkdir dotfiles && cd dotfiles
git init
git submodule add
pip3 install -r dotdrop/requirements.txt --user
./ --help

A mirror of this repository is available on gitlab under

Why dotdrop ?

There exist many tools to manage dotfiles however not many allow to deploy different versions of the same dotfile on different hosts. Moreover dotdrop allows to specify the set of dotfiles that need to be deployed on a specific profile.

See the example for a concrete example on why dotdrop rocks.

Table of Contents


There are multiple ways to install and use dotdrop. It is recommended to install dotdrop as a submodule to your dotfiles git tree. Having dotdrop as a submodule guarantees that anywhere you are cloning your dotfiles git tree from you’ll have dotdrop shipped with it.

Below instructions show how to install dotdrop as a submodule. For alternative installation instructions (with virtualenv, pypi, aur, snap, etc) see the installation documentation.

Dotdrop is also available on * pypi: * aur (stable): * aur (git version): * snapcraft:

As a submodule

The following will create a git repository for your dotfiles and keep dotdrop as a submodule:

## create the repository
$ mkdir dotfiles; cd dotfiles
$ git init

## install dotdrop as a submodule
$ git submodule add
$ pip3 install -r dotdrop/requirements.txt --user
$ ./dotdrop/

## use dotdrop
$ ./ --help

For MacOS users, make sure to install realpath through homebrew (part of coreutils).

Using dotdrop as a submodule will need you to work with dotdrop by using the generated script at the root of your dotfiles repository. Note that this script updates the submodule automatically, unless called with the environment variable DOTDROP_AUTOUPDATE set to no.

To ease the use of dotdrop, it is recommended to add an alias to it in your shell (/.bashrc,/.zshrc, etc) with the config file path, for example

alias dotdrop='<> --cfg=<path-to-your-config.yaml>'

Completion scripts exist for bash, zsh and fish, see the related doc.

Getting started

Create a new repository to store your dotfiles with dotdrop. Init or clone that new repository and install dotdrop.

Then import any dotfiles (files or directories) you want to manage with dotdrop. You can either use the default profile (which resolves to the hostname of the host you are running dotdrop on) or provide it specifically using the switch -p --profile.

Import dotfiles on host home

$ dotdrop import ~/.vimrc ~/.xinitrc ~/.config/polybar

Dotdrop does two things:

  • Copy the dotfiles in the dotpath directory (defined in config.yaml, defaults to dotfiles)
  • Create the associated entries in the config.yaml file (in the dotfiles and profiles entries)

Your config file will look something similar to this

  backup: true
  banner: true
  create: true
  dotpath: dotfiles
  ignoreempty: false
  keepdot: false
  longkey: false
  showdiff: false
  workdir: ~/.config/dotdrop
    dst: ~/.config/polybar
    src: config/polybar
    dst: ~/.vimrc
    src: vimrc
    dst: ~/.xinitrc
    src: xinitrc
    - f_vimrc
    - f_xinitrc
    - d_polybar

For a description of the different fields and their use, see the config doc.

Commit and push your changes with git.

Then go to another host where your dotfiles need to be managed as well, clone the previously setup repository and compare the local dotfiles with the ones stored in dotdrop:

$ dotdrop compare --profile=home

Now you might want to adapt the config.yaml file to your likings on that second host. Let’s say for example that you only want d_polybar and f_xinitrc to be deployed on that second host. You would then change your config to something like this (considering that the second host’s hostname is office):

    - f_vimrc
    - f_xinitrc
    - d_polybar
    - f_xinitrc
    - d_polybar

Then adapt any dotfile using the templating feature (if needed). For example you might want different fonts sizes on polybar for the different hosts:

edit <dotpath>/config/polybar/config

{%@@ if profile == "home" @@%}
font0 = sans:size=10;0
{%@@ elif profile == "office" @@%}
font0 = sans:size=14;0
{%@@ endif @@%}
font1 = "Material Design Icons:style=Regular:size=14;0"
font2 = "unifont:size=6;0"

Also the home computer is running awesomeWM and the office computer bspwm. The ~/.xinitrc file will therefore be different while still sharing some lines.

edit <dotpath>/xinitrc


# load Xresources
if [ -f "$userresources" ]; then
      xrdb -merge "$userresources" &

# launch the wm
{%@@ if profile == "home" @@%}
exec awesome
{%@@ elif profile == "office" @@%}
exec bspwm
{%@@ endif @@%}

The if branch on above template examples will define which part is deployed based on the hostname of the host on which dotdrop is run from (or the selected profile).

When done, you can install your dotfiles using

$ dotdrop install

If you are unsure, you can always run dotdrop compare to see how your local dotfiles would be updated by dotdrop before running install or run install with --dry.

That’s it, a single repository with all your dotfiles for your different hosts.

You can then

For more options see dotdrop --help and the documentation.


Dotdrop’s documentation is hosted on readthedocs.

Thank you

If you like dotdrop, buy me a coffee.


If you are having trouble installing or using dotdrop, open an issue.

If you want to contribute, feel free to do a PR (please follow PEP8). Have a look at the contribution guidelines


This project is licensed under the terms of the GPLv3 license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dotdrop, version 1.5.4
Filename, size File type Python version Upload date Hashes
Filename, size dotdrop-1.5.4-py3-none-any.whl (70.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dotdrop-1.5.4.tar.gz (68.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page