Dotfile Manager
A flexible, Python-based tool for managing, synchronizing, and linking your dotfiles across systems using a manifest-driven approach.
Features
- Manifest-based configuration: Supports TOML, YAML, and JSON formats.
- Git integration: Synchronize dotfiles with remote repositories.
- Automatic linking: Create symlinks for dotfiles as specified in the manifest.
- System import: Generate manifests from your current dotfiles.
- Orphaned file detection: Find and manage unmanaged files in your dotfiles directory.
- Customizable: Easily extendable and configurable.
Goals
Check pending features at goals.md
Installation
Clone the repository and install dependencies:
git clone https://github.com/yourusername/dotfile-manager.git
cd dotfile-manager
pip install -e .
Usage
All commands are available via the CLI app:
dfman <command> [options]
Commands Overview
Below are the main commands with usage and examples.
init
Initialize the dotfile manager and create a manifest.
dfman init
- Prompts for manifest format, root directory, repository URL, and other settings.
- Creates a manifest file and initializes the dotfiles directory.
check
Print the current manifest in a human-readable format.
dfman check
sync
Synchronize dotfiles with the remote repository (pull and/or push changes).
dfman sync --pull --save --m "Sync message"
--pull: Pull changes from remote (default: True)--save: Push local changes (default: True)--m: Commit message
review
Show the current status of the dotfiles git repository.
dfman review
link
Create symlinks for dotfiles as specified in the manifest.
dfman link
dfman link ~/.bashrc ~/.vimrc
- If no files are specified, links all dotfiles in the manifest.
from-system
Import dotfiles from your system into the manifest and dotfiles directory.
dfman from-system
dfman from-system ~/.bashrc ~/.vimrc
- Moves/copies files from your home directory into the managed directory and updates the manifest.
download
Clone a remote dotfiles repository and set up the manifest.
dfman download --repository-url <url> --branch main
- Downloads the repository and links the manifest file.
edit-file
Edit a file using your preferred editor and add it to the manifest.
dfman edit-file ~/.bashrc --editor nvim
- Opens the file in the specified editor, creates a symlink, and updates the manifest.
edit-manifest
Edit the manifest file directly in your editor.
dfman edit-manifest --editor nvim
unlink
Remove symlinks for specified dotfiles (or all if none specified).
dfman unlink
dfman unlink ~/.bashrc
remove
Remove dotfiles from the manifest and unlink them.
dfman remove ~/.bashrc ~/.vimrc
list-dotfiles
List all dotfiles in the manifest.
dfman list-dotfiles
map-orphaned-files
Find and map orphaned files in the dotfiles directory (files not tracked in the manifest).
dfman map-orphaned-files
log
Show the git log of the dotfiles repository.
dfman log --limit 20
exec
Execute a command on a dotfile (e.g., open with an editor or print contents).
dfman exec ~/.bashrc --with-command nvim
dfman exec ~/.bashrc
save-changes
Save changes to the manifest and optionally push them to the remote repository.
dfman save-changes --m "Commit message" --save
--m: Commit message for the changes.--save: Push changes to the remote (default: True). If not set, only commits locally.
Manifest Example
[dotfile_manager]
root = "~/dotfiles"
repository_url = "git@github.com:yourusername/dotfiles.git"
repository_branch = "main"
dotfiles = [
{ name = ".bashrc", location = ".bashrc" },
{ name = ".vimrc", location = ".vimrc" }
]
Project Structure
dotfile_manager/
app.py # CLI entrypoint
utils.py # Utilities and helpers
linker/ # Symlink logic
manifest/ # Manifest schema, loader, and format logic
syncer/ # Git integration
Requirements
- Python 3.13+
- escudeiro
- gitpython
- termcolor
- ruamel.yaml
- tomlkit
- orjson
- cyclopts
- questionary
License
Apache License
Contributions welcome! Send your pull requests.
Metadata
Release files for dfman 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dfman-0.1.2.tar.gz | 24.0 kB | Without provenance | Details for dfman-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dfman-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for dfman-0.1.2-py3-none-any.whl |
Total release size: 52.0 kB
Release files / dfman-0.1.2.tar.gz
| Download URL | dfman-0.1.2.tar.gz |
|---|---|
| Size | 24.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97d5232c0a9a746a8313768afc093c87062894603bf8010126e0e7caec709cf9
|
|
BLAKE2b-256 checksum How to use checksums |
6e248fbafdc863f9d37c95436adb87b68ff3d96f8163afe078cc6750a32cab6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / dfman-0.1.2-py3-none-any.whl
| Download URL | dfman-0.1.2-py3-none-any.whl |
|---|---|
| Size | 28.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d8e21f3c148c1ddb5e2506cc7689f86d62714a35ab447290edce7c9b2e7884d
|
|
BLAKE2b-256 checksum How to use checksums |
770ef058775f28ac3297062f6a482c55375f4915a65d55aa3061d7bac10f41fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for dfman 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.