Skip to main content

Tools to distribute dotfiles to multiple locations when provisioning a new machine.

Project description

Project: License

Package: PyPI - Python Version PyPI - Version PyPI - Downloads

Development: uv ruff ty pytest CI Code Coverage GitHub commit activity

Contents

Overview

dbrownell_Dotter is a declarative dotfile management tool that helps you install, synchronize, and manage configuration files across your system. It supports:

  • File installation via copying, symlinking, or template rendering
  • Jinja2 templating for dynamic configuration files
  • Variable substitution from command-line arguments or environment variables
  • Regex-based substitutions for modifying existing files in-place
  • Reverse synchronization to push manual changes back to source files

Configuration is defined in YAML or JSON5 files, making it easy to version control and share your dotfile setup. See davidbrownell/dotfiles for an example of such a configuration.

How to use dbrownell_Dotter

Basic Commands

Install dotfiles:

uvx dbrownell_Dotter Install <config_file(s)> [OPTIONS]

Reverse sync changes back to source:

uvx dbrownell_Dotter ReverseSync <config_file(s)> [OPTIONS]

Common options:

  • --var key=value - Pass template variables (can be used multiple times)
  • --dry-run - Preview changes without modifying files
  • --verbose - Show verbose output
  • --debug - Show debug information

Variables

Variables can be used in configuration files and jinja templates.

Variable Type Format
Environment Variable ${VAR_NAME}
Command Line Variable {{ VAR_NAME }}

Configuration File Format

variable_definitions:
  username: "Your username (ex: `john`)"
  email: "Your email address (ex: `john@example.com`)"

entries:
  # Simple file copy/link
  - source: my_config.txt
    dest: ~/.config/myapp/config.txt

  # Jinja2 template (auto-detected by .jinja, .jinja2, or .j2 extension)
  - source: bashrc.jinja
    dest: ~/.bashrc

  # Regex substitution on existing file
  - source: null
    dest: /etc/myapp/config.conf
    substitutions:
      - pattern: "^EMAIL=.*$"
        replacement: "EMAIL={{ email }}"

Examples

Install with variables:

uvx dbrownell_Dotter Install config.yaml --var username=john --var email=john@example.com

Preview changes before installing:

uvx dbrownell_Dotter Install config.yaml --dry-run

Sync manual edits back to source files:

uvx dbrownell_Dotter ReverseSync config.yaml --var username=john

Installation

Note that these steps are not required when invoking dbrownell_Dotter via uvx.

Installation Method Command
Via uv uv add dbrownell_Dotter
Via pip pip install dbrownell_Dotter

Verifying Signed Artifacts

Artifacts are signed and verified using py-minisign and the public key in the file ./minisign_key.pub.

To verify that an artifact is valid, visit the latest release and download the .minisign signature file that corresponds to the artifact, then run the following command, replacing <filename> with the name of the artifact to be verified:

uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>'); print('The file has been verified.')"

Development

Please visit Contributing and Development for information on contributing to this project.

Additional Information

Additional information can be found at these locations.

Title Document Description
Code of Conduct CODE_OF_CONDUCT.md Information about the norms, rules, and responsibilities we adhere to when participating in this open source community.
Contributing CONTRIBUTING.md Information about contributing to this project.
Development DEVELOPMENT.md Information about development activities involved in making changes to this project.
Governance GOVERNANCE.md Information about how this project is governed.
Maintainers MAINTAINERS.md Information about individuals who maintain this project.
Security SECURITY.md Information about how to privately report security issues associated with this project.

License

dbrownell_Dotter is licensed under the MIT license.

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

dbrownell_dotter-0.6.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

dbrownell_dotter-0.6.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file dbrownell_dotter-0.6.1.tar.gz.

File metadata

  • Download URL: dbrownell_dotter-0.6.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbrownell_dotter-0.6.1.tar.gz
Algorithm Hash digest
SHA256 4bb769aee8ce42ebdfe13c63c04976b4ee64cab135d4a0f3eea5c2a96ac0cdf8
MD5 773206f62bd1a0b1ab99e5ad2ef862ab
BLAKE2b-256 c5bca7c8466161cfeb053e51527f45674cc4dfce255e67183a8e6fab96fef0b4

See more details on using hashes here.

File details

Details for the file dbrownell_dotter-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: dbrownell_dotter-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dbrownell_dotter-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d94494c1702435742af22ee286f9aac94d1df4d4f869ca8bc8760c849da1477
MD5 53c08dee68eb2f8c46bcd4f7bcf2fb4d
BLAKE2b-256 edb5ec19d9f4ecb586b3390b3bd62fdc184dd0b3521a02f4b967d8658cf7aeb8

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