@telecraft/store-sh

1.0.0-beta.5 • Public • Published

@telecraft/store-sh

store-sh for @telecraft/store.

Installation

npm install --global @telecraft/store-sh

You probably want to install the same version of store-sh as your store, similar to @telecraft/store-sh@1.0.0-alpha1

Usage

This shell is specifically written to work with the reference implementation of Telecraft's Store plugin based on leveldb. If more implementations of Telecraft Store come up in the future, we'll rethink this package.

Navigate to the root folder of your @telecraft/store instance and run store-sh, or store-sh /path/to/root-folder.

The database shell should show up. First you need to choose a store before you can do anything else. This is typically the plugin you want to inspect.

> open test_store
'open': store 'test_store'

$test_store > 

The store will be created if it doesn't already exist. Now that you've opened a store, you can inspect the store.

$test_store > get MKRhere
{ userId: 1234 }

$test_store > set MKRhere { "userId": 1200 }
'set': MKRhere

$test_store > find { "userId": 1200 }
'find': found '[ 'MKRhere', { userId: 1200 } ]'

$test_store > list
{ key: 'MKRhere', value: '{ "userId": 1200 }' }

$test_store > del MKRhere
'del': MKRhere

$test_store > clear
This will clear the entire store. Proceed? (y/n)y
'clear': success

$test_store >

Package Sidebar

Install

npm i @telecraft/store-sh

Weekly Downloads

0

Version

1.0.0-beta.5

License

MIT

Unpacked Size

16.5 kB

Total Files

9

Last publish

Collaborators

  • mkrhere