Skip to main content

Config linker for chezmoi and Nextcloud

Project description

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/

Project details


Download files

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

Source Distribution

docoli-1.0.3.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docoli-1.0.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file docoli-1.0.3.tar.gz.

File metadata

  • Download URL: docoli-1.0.3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for docoli-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a6070ffdf8c4747938fc8b0cc994fff7654ec1242aea62bdb54d4a2a79eeed42
MD5 e94d685640deac710b04e5e6f4b766dd
BLAKE2b-256 73d7a48d55edcad3841a60494054006829e104014de7b9f353be842f5c3fc176

See more details on using hashes here.

File details

Details for the file docoli-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: docoli-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for docoli-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d684827d5faa3f8af8537409bc980448739ba7a47ea0734f08be5b2a00dd73a3
MD5 e9442890c969460840c969144ba2c2b4
BLAKE2b-256 b6f37c5ca819904a8066b144df47a7bfaad7c585874cb0cbb45f136445373315

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page