sdm

Crates.iosdm
lib.rssdm
version0.1.1
created_at2025-12-13 12:58:15.70573+00
updated_at2025-12-16 20:38:21.775082+00
descriptionA lightweight command-line tool for managing dotfiles by creating and managing symbolic links from a configuration file
homepage
repository
max_upload_size
id1982896
size30,652
Bataa (batrdn)

documentation

README

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
    
Commit count: 0

cargo fmt