Caligari
"...I must become Caligari!"
Description
caligari installs configuration files by symbolically linking all of the
files from the given paths directly to the current user's home directory with
the same relative file structure, creating any requisite directories as-needed.
Usage
caligari allows you to exclude files matching a given fnmatch pattern with
the --exclude/-x flag. For example, the following may be used to exclude
all backup files and vim swap files:
caligari --exclude '**/*~' '**/*.swp'
By default, caligari will simply skip over any files which already exist in
the current user's home directory; however, you can force caligari to
overwrite existing files with the --force/-f flag:
caligari --force
caligari is normally silent except for warnings and errors; if you want more
explicit output about the operations caligari performs, simply use the
--verbose/-V flag. This flag will report all of the file system operations
caligari performs, each with an appropriate label:
- ln for created symbolic links
- path for created directory paths
- rm for unlinked files
- err for any errors encountered
caligari reports operations in this way so that they may be filtered in
whichever way the user desires. For example, you could print a list of the
files removed by a forceful caligari run like so:
caligari --force --verbose | awk '/^rm:/ { print $2 }'
You may also simulate the actions caligari would normally take upon the file
system by passing the --simulate/-s flag. This implies the --verbose
flag, allowing you to inspect which actions caligari would take if run:
$ caligari --simulate --force
rm: /home/user/do-not-remove
ln: /home/user/do-not-remove
Configuration
caligari may be configured by editing the system-wide configuration file
(defined by default as /etc/xdg/caligari.yml) or the per-user configuration
file (defined by default as ~/.config/caligari.yml). These configuration
files are simple YAML files which define the default exclusion patterns used
by caligari.
Example ~/.config/caligari.yml to automatically exclude the .git directory
and all README.md files:
---
:exclude:
- "**/.git"
- "**/README.md"
Installation
gem install caligari
Development
Just clone the git repository and run bundle install to install the
development and runtime dependencies:
git clone https://github.com/vthrenody/caligari.git
cd caligari
bundle install
You can run Caligari locally for development purposes by running it directly
from the repository like so:
bin/caligari
To install a local copy of Caligari, simply run rake install.
License
Caligari is made available under the terms of the MIT Expat license. See the
included LICENSE file for more information.