Complete LevelDB management for your terminal.
- A Terminal User Interface
- REPL with colorized auto-complete and key suggestions
- REPL automatically saves and reloads REPL history
- Scriptable from the command line
- Connect to local or network enabled instances
$npm install lev -g
This is the mode entered when you type lev
with no arguments.
I recommend a modern terminal program like iTerm2 on OSX or
[urxvt] on Linux.
On the left you have a list of keys, on the right you have the
selected value. You can edit the selected value by clicking on it.
Save the modified value by pressing control+s
.
The CLI
mode is useful for bash scripting. Here's an example
where we get the first 10 keys in the database.
$ lev path/to/db --keys --limit 10
Get the first ten records starting at bazz
and ending at zomg
.
$ lev path/to/db --limit 10 --start 'bazz' --end 'zomg'
Get the key welcome
from inside the 2 sublevels deep
lev ./db --cd greetings/en --get 'welcome'
For connecting to a multilevel enabled instance, specify the
port
and manifest
parameters...
lev --manifest path/to/manifest.json -a 127.0.0.1:1337 --keys ...
Provide just a path and no flags to start the REPL.
$lev path/to/db
Sets the start of the current range. When createReadStream()
is
created on the current sublevel (or root) it will use this value
as a parameter.
Sets the lower bound of the current range
Limits the number of results in the current range
Reverse the results in the current range
Get a value from the current range
Set the current sublevel
Supports cd ..
to navigate down a level. cd /
to navigate to the
root of the database. And supports paths cd foo/bar/bazz
.
A .lev
file will be created in your home directory. You can manage this
with the TUI or by hand.
{
"query": {
"start": "",
"end": "",
"reverse": false,
"limit": 1000
},
"key": null,
"connections": {
"Default":{
"path":"",
"keyEncoding":"utf8",
"valueEncoding":"json",
"local":true,
"compression":true,
"cacheSize":8388608
}
}
}
MIT