4a858a0800b50be40d5f30a01bbe69993f481f5b
dotlinker (doli)
dotlinker (CLI: doli) helps you persist and synchronize configuration across multiple systems by
linking local config paths to either:
- chezmoi (Git-based dotfiles management)
- Nextcloud (file-sync based persistence)
It is designed to be simple, deterministic, and safe by default (with timestamped backups).
Features
- Default config path:
~/.config/dotlinker/config.yaml(XDG-aware viaXDG_CONFIG_HOME) - Backends:
- chezmoi: imports paths via
chezmoi add - cloud: copies data to a destination directory, creates
.bakbackups, and links back with symlinks
- chezmoi: imports paths via
- Unit tests via
unittest - Makefile target:
make test
Installation
pip install .
Or editable install for development:
pip install -e .
Usage
Show help:
doli --help
doli
Add a mapping (non-interactive):
doli add -N zshrc -b chezmoi -s ~/.zshrc
doli add -N nvim -b cloud -s ~/.config/nvim -d ~/Nextcloud/dotfiles/.config/nvim
Run the linking/import process:
doli pull
Use a custom config path:
doli -c ./my-config.yaml add -N nvim -b cloud -s ~/.config/nvim -d ~/Nextcloud/dotfiles/.config/nvim
doli -c ./my-config.yaml pull
Configuration format
~/.config/dotlinker/config.yaml
mappings:
- name: zshrc
backend: chezmoi
src: ~/.zshrc
- name: nvim
backend: cloud
src: ~/.config/nvim
dest: ~/Nextcloud/dotfiles/.config/nvim
Notes
-
For
backend: cloud,destis required. -
cloudcreates timestamped backups:- destination backups:
dest.<timestamp>.bak - source backups:
src.<timestamp>.bak
- destination backups:
-
If
srcis already a symlink pointing todest,doli pullis a NOOP.
Development
Run tests:
make test
Run tests verbosely:
make test-verbose
License
MIT License. See LICENSE.
Author
Kevin Veen-Birkenbach https://www.veen.world/
Languages
Python
95.6%
Makefile
4.4%