Kevin Veen-Birkenbach f20f8f4f31
Some checks failed
CI + Mark Stable / Test & Lint (push) Has been cancelled
CI + Mark Stable / Mark stable tag (push) Has been cancelled
Release version 1.0.3
2025-12-16 19:33:41 +01:00
2025-12-16 19:32:28 +01:00
2025-12-16 19:19:05 +01:00
2025-12-16 19:19:05 +01:00
2025-12-16 18:20:10 +01:00
2025-12-16 19:33:41 +01:00
2025-12-16 19:19:05 +01:00
2025-12-16 19:25:28 +01:00
2025-12-16 19:29:15 +01:00
2025-12-16 19:33:41 +01:00
2025-12-16 19:32:28 +01:00

dotlinker (doli)

GitHub Sponsors Patreon Buy Me a Coffee PayPal

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 via XDG_CONFIG_HOME)
  • Backends:
    • chezmoi: imports paths via chezmoi add
    • cloud: copies data to a destination directory, creates .bak backups, and links back with symlinks
  • 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, dest is required.

  • cloud creates timestamped backups:

    • destination backups: dest.<timestamp>.bak
    • source backups: src.<timestamp>.bak
  • If src is already a symlink pointing to dest, doli pull is 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/

Description
No description provided
Readme MIT 56 KiB
Languages
Python 95.6%
Makefile 4.4%