Deno CLI utility for pretty printing Redis sort sets.
Recommended usage is to alias
the deno run
command with restricted access to Redis only, as follows:
alias redisz='deno run -q --allow-net=127.0.0.1:6379 https://raw.githubusercontent.com/evanx/deno-redisz/v0.0.1/main.ts'
Then this redisz
alias can be used relatively securely as follows:
redisz <command> <sorted set key, prefix or pattern> <start> <stop>
- supported commands:
zrevrange zrange zrevrangebyscore rangebyscore
- commands are case-insensitive
- the default command is
zrevrange
- the default
start
andstop
are0
and9
- If no key is specified, then the util will scan, filter and print keys i.e. via
SCAN
- If the key includes the '*' wildcard character, then it is considered a pattern for
SCAN
- If no key matches exactly, then the util will treat it as a prefix and add a wildcard
Deno will download the versioned dependencies into its cache, and run the utility with the restricted permissions specified in the alias
command.
See the redisz
CLI utility demo'ed in the "Terminal" in the following Visual Code screenshot:
- 2021-09-05 v0.0.1 defaults to ZREVRANGE also supports ZRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE
https://twitter.com/evanxredis