DotDeck is a dotfile manager: it keeps your personal configuration files (shell configs, editor settings, Git configs, etc.) version‑controlled in one place, and then symlinks them into the right spots on your system. That way:
- You can edit configs in one central repo
- Changes propagate instantly to your live environment
- You can sync updates across multiple machines using Git
- Go 1.18 or later
- Make (for build automation)
- I also recommend using a NerdFont for better experience.
Clone the repository:
git clone https://github.com/rivethorn/DotDeck.git
cd DotDeckBuild the project:
make buildOr install to your GOPATH:
make installCreate a config.toml file in the directory where you want to keep your dotfiles.
(e.g. ~/dotdeck)
Example:
[files]
# Symlink directories
"nvim/" = "~/.config/nvim/"
# Symlink files
"tmux/.tmux.conf" = "~/.tmux.conf"| Command | What it does |
|---|---|
deck link |
Reads config.toml, backs up any existing files, and creates symlinks from your repo copies to their destinations. |
deck unlink |
Removes those symlinks and restores your previous backups. |
deck sync |
Pulls in changes from your live environment back into the repo, commits them, merges/pulls from remote, and pushes if there’s something new. |
--dry-run |
Available on link/unlink/sync — shows exactly what would happen without making changes. |
--verbose |
Gives you a play‑by‑play log of every decision and action. |
-
Config mapping
You keep aconfig.tomlwith lines like:[files] "bash/.bashrc" = "~/.bashrc" "git/.gitconfig" = "~/.gitconfig"
This is the “source → destination” map for all files.
-
Safe linking
- Before making a link, DotDeck checks if the target exists.
- If it does, it moves it to a
.deckbakbackup file. - Then it creates the symlink.
-
Unlink + restore
- Detects whether the target is a symlink created by DotDeck.
- Removes it, then restores your
.deckbakif available.
-
Syncing
- Compares live files with dotfiles directory copies.
- If they differ and Git marks them dirty (unless
--force), it copies live changes into the dotfiles directory. - Stages, commits, pulls the latest from remote, resolves via fast‑forward merge, and pushes if ahead.
- Uses interactive
git fetch/pull/pushso SSH passphrases can be entered right in your terminal.
cmd/– CLI command implementationsinternal/– Internal utilities, config loader, and interactive runnerassets/– Project assets (e.g., images)
Contributions are welcome! Please open issues or submit pull requests for improvements and bug fixes.
This project is licensed under the MIT License.
Made with Go and ❤️ by rivethorn
