Skip to content

A little tool to keep your config files all nice and orderly

License

Notifications You must be signed in to change notification settings

jdanford/scrubjay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrubjay

A little tool to keep your config files all nice and orderly, named after a cool bird that's really good at caching acorns and retrieving them.

Scrub jay carrying acorn

It is inspired by GNU Stow and written in Rust, leaning heavily on BurntSushi's handy ignore crate. At the moment, it has been tested minimally and probably doesn't work on your machine. ✨

Purpose

It is often desirable to keep configuration files centralized, so that they can be managed with version control or backup software. Instead of symlinking such files manually, you can use Scrubjay as sort of a local package manager, reducing the tedium while also supporting install/uninstall hooks and other nice customizations.

Installation

The binary name for Scrubjay is sj. Prebuilt binaries aren't available yet, and the crate hasn't been published, but if you have Rust and Cargo then you can install it with cargo install --git https://github.com/jdanford/scrubjay.

Usage

sj [install|reinstall|uninstall] [FLAGS] <PACKAGE>...

Flags

  • -n/--dry-run: Simulates actions without making any changes
  • -f/--force: Allows existing files to be overwritten or deleted
  • -h/--help: Prints help information
  • -v/--verbose: Enables verbose output

Package configuration

As this tool is local and minimal, a "package" is just a directory tree with some (optional) configuration. At the moment, the only method of configuration is a .scrubjay.toml file (TOML spec) located at the package root, with the following contents:

Top-level keys

  • target: The directory where this package's file will be installed (tildes and environment variables will be expanded)

Sections

  • hooks.pre_install
  • hooks.post_install
  • hooks.pre_uninstall
  • hooks.post_uninstall

Each of these sections can specify a script (a path relative to the package root) and/or a command (a string to be executed with sh -c), which will be run at the appropriate point in the install/uninstall process.

Ignoring files

.gitignore and .ignore files at the package root or higher will be respected, including any configured global .gitignore file, but it might help to include Git-specific file patterns in ~/.ignore, as they aren't usually present in a .gitignore file.

About

A little tool to keep your config files all nice and orderly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages