# dotsync dotfiles manager without symlinks [![Actions Status][actions-image]][actions-url] [![Coverage Status][coveralls-image]][coveralls-url] [actions-image]: https://github.com/lufia/dotsync/workflows/Test/badge.svg?branch=main [actions-url]: https://github.com/lufia/dotsync/actions?workflow=Test [coveralls-image]: https://coveralls.io/repos/github/lufia/dotsync/badge.svg [coveralls-url]: https://coveralls.io/github/lufia/dotsync ## Getting Started ## SYNOPSIS ```console $ dotsync repo [-w path] $ dotsync install [-f] source [...] dest $ dotsync changes $ dotsync pull [-n] $ dotsync uninstall [-f] [path ...] $ dotsync export ``` `dotsync repo` gets the source root path. If *-w* option is passed, it updates source root with *path*. `dotsync install` links *source* to *dest* to manage changes. When *-f* option is passed, it overwrites *dest* even if file is already exists. `dotsync uninstall` unlink and remove *path*. When *-f* option is passed, it removes *path* even if file is locally modified. `dotsync changes` prints locally changed filenames. `dotsync pull` applies all updates from sources. If *-n* option is passed, it prints filenames but it don't update them. ## FILES *dotsync* manages both sources root and state files as a repository where is stored under **~/.local/state/dotsync** directory. The source root is a path to the top of sources, all dotfiles will be copied from that directory. Typically it is managed by Git or other SCMs. Every state file is named as a relative path from the source root of the source file. These are stored under **store** directory in the repository, and these contains three values: SHA256 hash of the source file, permission and destination path. For example, if you link **~/src/dotfiles/dot.bashrc** to **~/.bashrc** and **~/src/dotfiles/lib/plumbing** to **~/lib/plumbing**, then the repository will be figured out: ```console % tree ~/.local/state/dotsync dotsync─┬─repo └─store─┬─dot.bashrc └─lib───plumbing % cat ~/.local/state/dotsync/repo /home/xxx/src/dotfiles % cat ~/.local/state/dotsync/store/dot.bashrc 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 644 /home/xxx/.bashrc ```