A simple and convenient commandline tool and REPL for leveldb
.
- REPL with colorized tab-completion and zsh/fish style key suggestions
- REPL automatically saves and reloads REPL history
$ npm install -g lev
$ lev path/to/db
Use upper or lower case for the following commands.
Get a key from the database.
Put a value into the database. If you have keyEncoding
or valueEncoding
set to json
, these values will be parsed from strings into json
.
Delete a key from the database.
Get all the keys in the current range.
Defines the start of the current range. You can also use GT
or GTE
.
Defines the end of the current range. You can also use LT
or LTE
.
Limit the number of records in the current range (defaults to 5000).
Reverse the records in the current range.
These all match the parameters used with
levelup
. The default encoding
for the database is set to json
.
Specify the start of the current range. You can also use gt
or gte
.
Specify the end of the current range. You can also use lt
and lte
.
Only list the all of the values in the current range. Emit as a new-line delimited stream of json.
Only list all of the keys in the current range. Will tabularize the output.
Specify the encoding for the keys.
Specify the encoding for the values.
Limit the number of records emitted in the current range.
Reverse the stream.