A lightweight command-line tool for managing dotfiles by creating and managing symbolic links from a configuration file.
cargo install sdmAlternatively, if you have the source code, you can build and install it locally:
cargo build --release
cargo install --path .Create a sdm.toml file in your current directory with the following format:
[dotfiles]
".vimrc" = "~/.vimrc"
".zshrc" = "~/.zshrc"
".gitconfig" = "~/.gitconfig"
".config/nvim/init.vim" = "~/.config/nvim/init.vim"The left side is the source file path (relative to where you run the command), and the right side is the destination path where the symlink will be created. Destination paths support shell expansion (e.g., ~ for home directory).
Synchronize dotfiles by creating symbolic links:
sdm syncThis will create symlinks from your source files to the destination paths specified in sdm.toml.
Dry Run Mode:
To preview what changes would be made without actually creating symlinks:
sdm sync --dryCheck the status of all configured dotfiles:
sdm statusThe following information are shown:
- Source: The source file path
✓ LINKED- Symlink exists and points to the correct source✗ MISSING- Source file doesn't exist⚠ BROKEN- Symlink exists but points to an invalid location○ NOT LINKED- Destination exists but is not a symlink
-
Create a dotfiles repository:
mkdir ~/dotfiles cd ~/dotfiles
-
Create your
sdm.toml:[dotfiles] ".vimrc" = "~/.vimrc" ".zshrc" = "~/.zshrc"
-
Check status:
sdm status
-
Sync your dotfiles:
sdm sync
-
Or test with a dry run first:
sdm sync --dry