Skip to content
/ sdm Public

A lightweight command-line tool for managing dotfiles by creating and managing symbolic links from a configuration file.

License

Notifications You must be signed in to change notification settings

batrdn/sdm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdm - Simple Dotfiles Manager

A lightweight command-line tool for managing dotfiles by creating and managing symbolic links from a configuration file.

Installation

cargo install sdm

Alternatively, if you have the source code, you can build and install it locally:

cargo build --release
cargo install --path .

Usage

Configuration

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).

Commands

Sync

Synchronize dotfiles by creating symbolic links:

sdm sync

This 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 --dry

Status

Check the status of all configured dotfiles:

sdm status

The 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

Example Workflow

  1. Create a dotfiles repository:

    mkdir ~/dotfiles
    cd ~/dotfiles
  2. Create your sdm.toml:

    [dotfiles]
    ".vimrc" = "~/.vimrc"
    ".zshrc" = "~/.zshrc"
  3. Check status:

    sdm status
  4. Sync your dotfiles:

    sdm sync
  5. Or test with a dry run first:

    sdm sync --dry

About

A lightweight command-line tool for managing dotfiles by creating and managing symbolic links from a configuration file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages