Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Corei13/redis-protocol

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-protocol

Node.js package to encode a sequence of Redis commands into Redis protocol, suitable for mass insertion.

Adapted from redis-mass.

Installation

npm install -g redis-protocol-cli

Usage

Mass insertion on Redis

$ redis-protocol /path/to/input-file | redis-cli --pipe
# Or
$ cat /path/to/input-file | redis-protocol | redis-cli --pipe

Output to console

$ redis-protocol /path/to/input-file

Output to file

$ redis-protocol /path/to/input-file -o /path/to/output-file

Examples

Input file (Redis Commands)

SET key1 value1
SADD key2 value1 "value2" "value3"
ZADD "key3" 1 "value3"
*3
$3
SET
$4
key1
$6
value1
*5
$4
SADD
$4
key2
$6
value1
$6
value2
$6
value3
*4
$4
ZADD
$4
key3
$1
1
$6
value3

About

Node.js package to encode a sequence of Redis commands into Redis protocol, suitable for mass insertion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.