Dotzilla
A powerful, Git-inspired dotfiles manager with symbolic linking capabilities.
Table of Contents
Overview
Dotzilla is a command-line tool designed to help you manage your dotfiles with a workflow inspired by Git. It allows you to track, stage, and link dotfiles between a central repository and their original locations on your system.
Features
- Repository Management: Initialize and maintain a centralized dotfiles repository
- Tracking System: Add and track dotfiles in your repository
- Staging Workflow: Stage files before linking, similar to Git's staging area
- Symbolic Linking: Create symlinks from your repository to system locations
- Diff Support:
- Compare tracked dotfiles with their system originals
- Support for both file and directory diffs
- Word-by-word diff option
- Integration with external diff tools (vimdiff, meld, kdiff3, VS Code)
- Status Reporting: View the status of your tracked and staged dotfiles
- Shell Completion: Support for bash, zsh, fish, and other shells
Installation
From Source
# Clone the repository
# Build the project
# The binary will be available at target/release/dotzilla
# Optionally, move it to a directory in your PATH
Using Cargo
Usage
Initialize a Repository
Create a new dotfiles repository:
Adding Dotfiles
Add a dotfile to tracking:
This copies the file to your dotfiles repository and begins tracking it.
Staging Files
Stage a dotfile for linking:
Unstaging Files
Remove a file from the staging area:
Creating Symlinks
Link all staged dotfiles to their original locations:
This creates symbolic links from your dotfiles repository to the original locations.
Viewing Status
Check the status of your dotfiles:
Listing Tracked Files
List all tracked dotfiles:
Comparing Files
Compare a tracked dotfile with its system original:
# Basic diff
# Word-by-word diff
# Using an external diff tool
# Directory diff
Command Reference
| Command | Description |
|---|---|
init [path] |
Initialize a new dotfiles repository |
add <path> |
Add a dotfile to tracking |
stage <name> |
Stage a dotfile for linking |
unstage <name> |
Unstage a dotfile |
link |
Link all staged dotfiles to their target locations |
status |
Show the status of tracked and staged dotfiles |
list |
List all tracked dotfiles |
diff <name> [--word] [--tool <tool>] |
Show differences between tracked and local dotfiles |
completion <shell> |
Generate shell completion scripts |
Example Workflow
-
Initialize your dotfiles repository:
-
Add some dotfiles:
-
Check their status:
-
Stage files you want to link:
-
Create symlinks:
-
Later, if you make changes to files in their original locations, compare them:
-
Add the updated file to incorporate changes:
Shell Completion
Dotzilla supports shell completion for various shells, making it easier to use the command-line interface.
Generate shell completion scripts:
# For Bash
# For Zsh
# For Fish
Make sure the respective directories exist and are in your shell's completion path.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.