A simple key-value pair database for your shell functions.
And by "database" I mean a plain json file in a directory somewhere in your system. This is basically a helper that does some CRUD operations to a json file.
- Easiest:
Go to the release page and download the zip file that corresponds to your operating system. Then put the executable somewhere in your PATH.
- From source:
You'll need to install v-lang's compiler (at least version 0.2.2 commit: 90292ce
). After that follow these steps:
git clone https://github.com/VonHeikemen/store.v.git
cd store.v
v -prod store.v
You'll end up with a store
executable in the root directory. Add that to your PATH.
store [document] [command] [args]
Prints help information. If command
is provided it will you a more detailed usage of a command.
Prints version information.
Creates an empty json file in your "data folder."
Extract the value of an entry.
Show all the entries of a document.
Creates a new entry in the document.
Change the value of an entry.
Deletes an entry from the document.
Show the file path to the document.
Set the STORE_V_FOLDER
environment variable to specify the path to the "data folder" where documents will be saved.
All this examples use a document called bookmark
but this of course could be anything you want.
Create a document:
store bookmark create
Add an entry to a document:
store bookmark add ddg "https://duckduckgo.com/"
Extract the value of an entry:
store bookmark query ddg
List all entries in a document:
store bookmark list
Change the value of an entry:
store bookmark update ddg "https://lite.duckduckgo.com/lite/"
Delete an entry from a document:
store bookmark remove ddg
show path to the document:
store bookmark location
If your interested there is version of this tool which is a script written in POSIX compliant shell syntax (mostly): store-json.
If you find this tool useful and want to support my efforts, buy me a coffee ☕.