| Crates.io | xdg-config-stow |
| lib.rs | xdg-config-stow |
| version | 0.1.6 |
| created_at | 2026-01-24 19:12:03.677158+00 |
| updated_at | 2026-01-24 23:54:56.501477+00 |
| description | XDG-centric GNU stow replacement for dotfile management |
| homepage | https://github.com/josefaidt/xdg-config-stow |
| repository | https://github.com/josefaidt/xdg-config-stow |
| max_upload_size | |
| id | 2067282 |
| size | 90,291 |
An XDG-centric GNU stow replacement for managing dotfiles, written in Rust.
.config/ directory to XDG_CONFIG_HOME (or $HOME/.config).stowignore files using gitignore-style patterns--rm flagInstall from crates.io:
cargo install xdg-config-stow
Or build from source:
cargo build --release
# Binary will be in target/release/xdg-config-stow
Run xdg-config-stow from your dotfiles repository root (the directory containing .config/).
Link all files from .config/fish to $HOME/.config/fish:
xdg-config-stow fish
Remove symlinks for a previously stowed package:
xdg-config-stow --rm fish
Preview what changes would be made without actually making them. Output uses colored diff-like syntax with + for additions and - for removals:
# See what would be stowed
xdg-config-stow --dry-run fish
# Output:
# DRY RUN: No changes will be made
#
# + config.fish -> /path/to/dotfiles/.config/fish/config.fish
# + functions/ -> /path/to/dotfiles/.config/fish/functions
# See what would be removed
xdg-config-stow --rm --dry-run fish
# Output:
# DRY RUN: No changes will be made
#
# - config.fish
# - functions/
Create a .stowignore file inside your package directory (e.g., .config/fish/.stowignore) using gitignore syntax:
# Ignore completions directory
completions/
# Ignore specific files
fish_variables
Note: If you add a .stowignore file after initially stowing a package, simply re-run the stow command to automatically update the symlinks:
xdg-config-stow fish # Automatically migrates and respects new ignore rules
my-dotfiles-repo/
.config/
fish/
config.fish
functions/
.stowignore
nvim/
init.lua
lua/
README.md
setup.sh
.config/ directory in your current working directoryXDG_CONFIG_HOME or falls back to $HOME/.config.stowignore files for excluding specific pathsXDG_CONFIG_HOME or $HOME/.configThe project includes comprehensive unit and integration tests:
# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
# Run specific test
cargo test test_stow_single_file
See TESTS.md for detailed test coverage information.
Contributions are welcome! Before submitting a pull request:
cargo fmtcargo clippy -- -D warningscargo testTo automatically run these checks before every commit, you can set up git hooks:
./scripts/setup-hooks.sh
This will install a pre-commit hook that runs formatting checks, clippy, and tests before allowing commits. You can bypass the hook when needed with git commit --no-verify.
MIT