@varasto/cli
v1.0.1
Published
Command line interface for Varasto storage
Readme
@varasto/cli
Command-line interface for Varasto storages.
Installation
Use npm global install to install the CLI:
$ npm install -g @varasto/cliOr alternatively use npx to run the CLI directly:
$ npx @varasto/cliUsage
The CLI takes an URL or name of directory as an argument, that will be used for retrieving/storing data. For example:
$ varasto-cli http://user:pass@localhost:8080/
$ varasto-cli sqlite:database.sqlite
$ varasto-cli /some/directoryYou can also pass command you wish to execute as the second argument. If this omitted, an REPL will be launched instead.
$ varasto-cli sqlite:database.sqlite "set foo bar { value: 5 }"
$ varasto-cli sqlite:database.sqlite "get foo bar"The inputted data is expected to be in ordinary JSON or the more human friendly JSON5 format.
Commands
| Command | Description | | ------- | ----------------------------------------- | | delete | Deletes an entry from namespace. | | get | Retrieves an entry from namespace. | | help | Displays information about commands. | | keys | Lists all keys of entries in a namespace. | | list | Lists all entries in a namespace. | | quit | Exits the CLI. | | set | Inserts an entry. | | update | Updates existing entry. |
