dot-linker
symlink's your dots
Features
A simple, GNU Stow-like utility for managing your configuration files (dotfiles) by creating symbolic links. It allows you to keep your dotfiles in a version-controlled directory and link them to their proper locations.
- Link & Unlink: Easily create and remove symbolic links.
- Dry Run Mode: See what changes will be made without actually performing any actions (
--no-symlink). - Interactive Confirmation: Ask for confirmation before creating or removing each link (
--visual). - Flexible: Link an entire directory or just specific files.
- Ignore Files: Supports
.gitignore-style patterns to exclude files from linking. - Customizable: Specify source and target directories, making it useful for more than just dotfiles.
Installation
Currently, you need the Rust toolchain to build the project.
# Clone the repository
# Build the release binary
# The binary will be at target/release/dot-linker
Usage
The command-line interface provides all the options you need to manage your links.
Configuration
dot-linker can be configured using an ignore file to prevent certain files or patterns from being linked.
The application looks for an ignore file in the following order:
- A path specified with the
-c, --configoption. $XDG_CONFIG_HOME/dotlinker/dotignore(e.g.,~/.config/dotlinker/dotignore).- The base directory being linked from (e.g.,
~/dotfiles/.dotlinker/dotignore).
If no ignore file is found, a default one will be created at ~/.config/dotlinker/dotignore with the following content:
# This file is used to ignore files when symlinking
.git*
README.md
LICENSE
Examples
Assume your dotfiles are stored in ~/dotfiles.
1. Link all files to your home directory
This will link files like ~/dotfiles/.zshrc to ~/.zshrc.
# The target directory defaults to $HOME/.config if not provided
# and the source directory defaults to the current directory.
# Or, more explicitly:
2. Unlink all files
This removes the symlinks from your home directory. Your original files in ~/dotfiles are safe.
3. See what would happen (Dry Run)
Simulate linking to see which files would be created, without making any changes.
4. Link with interactive confirmation
Prompt for a (y/n) confirmation before creating each symlink.
5. Link only specific files
Link only your niri and foot configurations into ~/.config.
5. passing files to be ignored
Link eveything other than niri and foot configurations into ~/.config.
License
This project is licensed under the MIT License. See the LICENSE file for details.