<commit_before>LevelDB-CLI: a simple utility for debugging LevelDB
===========
Command-line utility for working with levelDB.
This utility is useful for debugging applications using the database LevelDB


![Demo GIF](https://raw.githubusercontent.com/liderman/leveldb-cli/master/docs/live-demo.gif)

Installation and build
----------------------

```
go get github.com/liderman/leveldb-cli
go install
```

Requirements
------------
 * `go1.5` or newer.

Usage
-----

```
# ./leveldb-cli
```

```
» open testdb
Database not exist! Create new database.
Success
testdb» set key100 value100
Success
testdb» set key200 value200
Success
testdb» set key300 value300
Success
testdb» show prefix key
Key	| Value
key100	| value100
key200	| value200
key300	| value300

testdb» show range key2 key3
Key	| Value
key200	| value200

testdb» close
Success
» exit
```

Commands
--------

### open
> open `DATABASE_NAME`

Opens database.
If the database does not exist, it is created.
You can use this method to create a new database.
 * `DATABASE_NAME` - The database name or path

### close
> close

It closes a previously opened database.

### set
> set `KEY` `VALUE`

Set the value of for a key.
 * `KEY` - The key
 * `VALUE` - The value

### delete
> delete `KEY`

Delete the record by key.
 * `KEY` - The key

### show
> show prefix `KEY_PREFIX` [`FORMAT`]

Displays all values the keys that begin with the prefix.
 * `KEY_PREFIX` - The prefix to list of keys
 * `FORMAT` - Data Display Format (Optional)

> show range `START` `LIMIT` [`FORMAT`]

Displays all values, the keys of which are in the range between "START" and "LIMIT".
 * `START` - The key or key prefix indicating the beginning of the range<commit_msg>Added new command - "get"<commit_after>LevelDB-CLI: a simple utility for debugging LevelDB
===========
Command-line utility for working with levelDB.
This utility is useful for debugging applications using the database LevelDB


![Demo GIF](https://raw.githubusercontent.com/liderman/leveldb-cli/master/docs/live-demo.gif)

Installation and build
----------------------

```
go get github.com/liderman/leveldb-cli
go install
```

Requirements
------------
 * `go1.5` or newer.

Usage
-----

```
# ./leveldb-cli
```

```
» open testdb
Database not exist! Create new database.
Success
testdb» set key100 value100
Success
testdb» set key200 value200
Success
testdb» set key300 value300
Success
testdb» show prefix key
Key	| Value
key100	| value100
key200	| value200
key300	| value300

testdb» show range key2 key3
Key	| Value
key200	| value200

testdb» close
Success
» exit
```

Commands
--------

### open
> open `DATABASE_NAME`

Opens database.
If the database does not exist, it is created.
You can use this method to create a new database.
 * `DATABASE_NAME` - The database name or path

### close
> close

It closes a previously opened database.

### set
> set `KEY` `VALUE`

Set the value of for a key.
 * `KEY` - The key
 * `VALUE` - The value

### delete
> delete `KEY`

Delete the record by key.
 * `KEY` - The key

### get
> get `KEY` [`FORMAT`]

Display value by key.
 * `KEY` - The key
 * `FORMAT` - Data Display Format (Optional)

### show
> show prefix `KEY_PREFIX` [`FORMAT`]

Displays all values the keys that begin with the prefix.
 * `KEY_PREFIX` - The prefix to list of keys
 * `FORMAT` - Data Display Format (Optional)

> show range `START` `LIMIT` [`FORMAT`]

Displays all values, the keys of which are in the range between "START" and "LIMIT".
 * `START` - The key or key prefix indicating the beginning of the range
{'fraction_non_alphanumeric': 0.1294150890081944, 'fraction_numerical': 0.025996044080248658, 'mean_word_length': 3.475347661188369, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '271237', 'n_tokens_mistral': 1186, 'n_tokens_neox': 1105, 'n_words': 464}