Skip to main content

Config linker for chezmoi and Nextcloud

Project description

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 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.2.tar.gz (8.1 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.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docoli-1.0.2.tar.gz
  • Upload date:
  • Size: 8.1 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.2.tar.gz
Algorithm Hash digest
SHA256 95a1b521910d0804def0ff6ad275b286cf4d73bb13ab4bb8a2dc530bccffe483
MD5 70d318deab1181394b7db062e69792de
BLAKE2b-256 9e6a4806156a05e766db35c2c0dbf9b03960c8f11467a166683a5e0ad55c2a84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docoli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 64b41de72e6b9d98e48ba7714937b7021f51ea2b1504cd4b95278430fa233a83
MD5 3fcf35cbfaa786f1a9c0b505105d7ce3
BLAKE2b-256 74b3b5e0324656b5ef0c8f39a99121c2b40f1db49da57262d4c5e4a1bcdc3f4e

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