A tiny module to store and retrieve arbitrary JSON data. Data is stored in ~/.config/shtore
by default. You may set the SHTORE_HOME
environment variable to override this.
If used without a tty (piped e.g.) the output will not be prettified (printed in a single line)
var shtore = require('shtore');
Saves the data at the given path.
Returns the data for a path as a javascript object (or string etc.)
Returns all available data as one big json object.
Set data for a given path.
Get data for a path. Prints it in json format to stdout.
Get all available data and output it as one json object.
A path is a dot delimited string. Use it like you would for any normal property access:
shtore set colors.red '"red"'