npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kingdis

v0.2.0

Published

A CLI utility to work with redis

Downloads

4

Readme

kingdis

A CLI utility to work with redis

oclif Version Build Status Downloads/week License

Usage

$ npm install -g kingdis
$ kingdis COMMAND
running command...
$ kingdis (-v|--version|version)
kingdis/0.2.0 win32-x64 node-v10.11.0
$ kingdis --help [COMMAND]
USAGE
  $ kingdis COMMAND
...

Commands

kingdis help [COMMAND]

display help for kingdis

USAGE
  $ kingdis help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

kingdis lpush [OPTIONS]

lpush to a redis list from a file

USAGE
  $ kingdis lpush [OPTIONS]

OPTIONS
  -H, --host=host                  [default: 127.0.0.1] redis host
  -L, --list=list                  (required) the list where push the values
  -d, --db=db                      redis db
  -f, --file=file                  (required) the file to push. Each line will be a message

  -l, --line-handler=line-handler  a js file that must export a map function that receive a line in input and return a
                                   string

  -n, --pick=pick                  print the message payload every <pick> messages pushed. 0 to turn off

  -p, --port=port                  [default: 6379] redis port

  -u, --url=url                    redis:// URL connection

  -w, --password=password          redis auth password

DESCRIPTION
  ...
  checkout push command help for more info

EXAMPLES
  LPUSH a file to redis at port 6970:
    $ lpush -p 6970 -L my-list -f myFile.csv
  LPUSH a file and show the payload that is being processed by the line handler:
    $ lpush -f myFile.csv -L my-list --pick 1 -l ./script/my-transformation.js

See code: src\commands\lpush.js

kingdis publish [OPTIONS]

publish to a redis channel a file

USAGE
  $ kingdis publish [OPTIONS]

OPTIONS
  -H, --host=host                  [default: 127.0.0.1] redis host
  -c, --channel=channel            (required) the channel(s) where to publish the messages
  -d, --db=db                      redis db
  -f, --file=file                  (required) the file to publish. Each line will be a message

  -l, --line-handler=line-handler  a js file that must export a map function that receive a line in input and return a
                                   string

  -n, --pick=pick                  print the message payload every <pick> messages published. 0 to turn off

  -p, --port=port                  [default: 6379] redis port

  -u, --url=url                    redis:// URL connection

  -w, --password=password          redis auth password

DESCRIPTION
  ...
  Each line of the file will be read and submitted as-is in the redis' channels.

  Additionally you can transform each line with the line-handler. It must be a JavaScript file
  that export a sync function that receive the string line in input and must return a string:

  module.exports = function handler (line) {
     return JSON.stringify({ line })
  }

ALIASES
  $ kingdis pub

EXAMPLES
  Publish a file to redis at port 6970:
    $ publish -p 6970 -c my-channel -f myFile.csv
  Publish a file to multiple redis channels and show the payload that is being processed by the line handler:
    $ publish -c one -c two --pick 1 -f myFile.csv -l ./script/my-transformation.js

See code: src\commands\publish.js

kingdis push [OPTIONS]

push to a redis list from a file

USAGE
  $ kingdis push [OPTIONS]

OPTIONS
  -H, --host=host                  [default: 127.0.0.1] redis host
  -L, --list=list                  (required) the list where push the values
  -S, --side=right|left            [default: right] the list side where push. Will direct RPUSH or LPUSH
  -d, --db=db                      redis db
  -f, --file=file                  (required) the file to push. Each line will be a message

  -l, --line-handler=line-handler  a js file that must export a map function that receive a line in input and return a
                                   string

  -n, --pick=pick                  print the message payload every <pick> messages pushed. 0 to turn off

  -p, --port=port                  [default: 6379] redis port

  -u, --url=url                    redis:// URL connection

  -w, --password=password          redis auth password

DESCRIPTION
  ...
  Each line of the file will be read and pushed as-is in the redis' list.

  Additionally you can transform each line with the line-handler. It must be a JavaScript file
  that export a sync function that receive the string line in input and must return a string:

  module.exports = function handler (line) {
     return JSON.stringify({ line })
  }

EXAMPLES
  Push a file to redis at port 6970:
    $ push -p 6970 -L my-list -f myFile.csv
  Push a file with LPUSH to redis:
    $ push -S left -L my-list -f myFile.csv
  Push a file and show the payload that is being processed by the line handler:
    $ push -f myFile.csv -L my-list --pick 1 -l ./script/my-transformation.js

See code: src\commands\push.js

kingdis rpush [OPTIONS]

rpush to a redis list from a file

USAGE
  $ kingdis rpush [OPTIONS]

OPTIONS
  -H, --host=host                  [default: 127.0.0.1] redis host
  -L, --list=list                  (required) the list where push the values
  -d, --db=db                      redis db
  -f, --file=file                  (required) the file to push. Each line will be a message

  -l, --line-handler=line-handler  a js file that must export a map function that receive a line in input and return a
                                   string

  -n, --pick=pick                  print the message payload every <pick> messages pushed. 0 to turn off

  -p, --port=port                  [default: 6379] redis port

  -u, --url=url                    redis:// URL connection

  -w, --password=password          redis auth password

DESCRIPTION
  ...
  checkout push command help for more info

EXAMPLES
  RPUSH a file to redis at port 6970:
    $ rpush -p 6970 -L my-list -f myFile.csv
  RPUSH a file and show the payload that is being processed by the line handler:
    $ rpush -f myFile.csv -L my-list --pick 1 -l ./script/my-transformation.js

See code: src\commands\rpush.js

kingdis subscribe [OPTIONS]

subscribe to a redis channel and look inside of it

USAGE
  $ kingdis subscribe [OPTIONS]

OPTIONS
  -H, --host=host          [default: 127.0.0.1] redis host
  -c, --channel=channel    (required) the channel(s) to subscribe
  -d, --db=db              redis db
  -i, --interval=interval  [default: 1000] show how many messages a channel received in <interval> time
  -n, --pick=pick          print the message payload every <pick> messages received. 0 to turn off
  -p, --port=port          [default: 6379] redis port
  -s, --save               append the messages received to the file in cwd: %{ISO date}-%{channel name}.bak
  -u, --url=url            redis:// URL connection
  -w, --password=password  redis auth password

ALIASES
  $ kingdis sub

EXAMPLES
  Show the payload every 10 message received:
    $ subscribe -H 192.169.99.100 -p 6970 --pick 10 -c my-channel
  Show how many messages are published by redis in 10 seconds:
    $ subscribe -c my-channel --interval 10000
  Save all the messages to a file:
    $ subscribe -c my-channel --save

See code: src\commands\subscribe.js

Why this name?

redis starts with re that in italian means king.. so: kingdis!

License

Copyright Manuel Spigolon, Licensed under MIT.