#dotfiles #manager #toml #config #setting

app sinc

A cross-platform dotfiles manager written in Rust

10 releases (5 breaking)

0.7.1 Apr 1, 2023
0.7.0 Mar 26, 2023
0.6.3 Mar 20, 2023
0.5.0 Mar 5, 2023
0.2.0 Feb 23, 2023

#133 in Configuration

23 downloads per month

MIT license

457 lines


A cross-platform dotfiles manager


This repository is still development. Use at your own lisk.


$ cargo install sinc

Getting started

Config file

Sing looks for the config file in the following location:

  • $SINC_CONFIG_DIR/sinc/sinc.toml
  • $XDG_CONFIG_HOME/sinc/sinc.toml
  • $HOME/.config/sinc/sinc.toml

Minimal config

The following is the minimal config:

dir = "~/.dotfiles"
sync_type = "symlink"

path = "sinc"
target = "~/.config/sinc"

If you run the sinc command in this state, a symbolic link is created from ~/.dotfiles/sinc to ~/.config/sinc.
In other words, the config files mentioned earlier have been moved to ~/.dotfiles/sinc and a symbolic link has been created to the original location.

(dir + path)         (sync_type)            (target)
 │                    │                    │
 V                    V                    V
~/.dotfiles/sinc  <<== symbolic link ==>>  ~/.config/sinc

Now, this config does not support applications that have different location for their config file depending on the OS.

To solve this, you can use sys(os) instead of specifying the value directly.

path = "bat"
  default = "~/.config/bat"
  windows = "~/AppData/Roaming/bat"

Configration value


Key Value type
default Table
dotfiles Array of Tables


Key Value type
dir String
sync_type SyncType


Key Value type Default value
dir String Config.default.dir
sync_type SyncType Config.default.sync_type
target String or Array<String>
path String
enable Boolean true
hook_add String ""

The value set in hook_* will be executed as a command at the specified timing.

flowchart LR
Start([start]) ===> enable
enable{enable} ===> |true| sync
enable ---> |false| End
sync[[sync]] ===> |success| hook_add
hook_add[[hook_add]] ===> End
sync ---> |fail| End([End])


Value Description
"symlink" If you are using Windows, you need administrator rights
"junction" Windows only / used to link to folder
"hardlink" Behave like the original file / used to link to file
"copy" Just copy


Name Key Key example
sys(os) os_info::Type (lower case) arch linux
sys(os_type) std::env::consts::OS linux
sys(os_family) std::env::consts::FAMILY unix
dir = "~/.dotfiles"
sync_type."sys(os)" = { default = "symlink", windows = "junction" }

path = "bat"
  default = "~/.config/bat"
  windows = "~/AppData/Roaming/bat"

path = ".gitconfig"
target = "~/.gitconfig"
  default = "symlink"
  windows = "hardlink"


Name Key
which(COMMAND) path to COMMAND or "" to be selected if COMMAND does not exist
path = "neofetch"
target = "~/.config/neofetch"
  # Enabled if the "neofetch" executable exists somewhere in $PATH.
  default = true
  "" = false

path = "hyprland"
target = "~/.config/hypr"
  # Enabled if the "wrappedhl" executable exists in "~/bin/wrappedhl" in $PATH.
  default = false
  "~/bin/wrappedhl" = true




~178K SLoC