Coder Social home page Coder Social logo

scrubjay's Introduction

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.

scrubjay's People

Contributors

jdanford avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.