0.3.0 • Published 7 months ago

@blastz/redis-busy-box v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Redis Busy Box

Redis busy box to resolve redis problems

Installation

npm install -g @blastz/redis-busy-box

Usage

Get memory usage by pattern

$ rbb memory-usage '*'
Memory usage: 6317 bytes / 6 kb / 0 mb / 0 gb

Get count of keys by pattern

$ rbb count-keys '*'
Count of keys: 14

List keys by pattern

$ rbb list-keys '*' --count 10 --show-values
{ key: 'test:list', type: 'list', value: [ 'a', 'c', 'b', 'a' ] }
{ key: 'test:string', type: 'string', value: 'a' }
{ key: 'test:set', type: 'set', value: [ 'a', 'b', 'c' ] }
? Continue? (Y/n)

Export keys by pattern

$ rbb export-keys 'app:user:*'

Delete keys by pattern

$ rbb delete-keys '*' --count 10 --show-values
{
  key: 'test:zset',
  type: 'zset',
  value: [ 'b', '8', 'a', '10', 'c', '12' ]
}
{
  key: 'test:stream',
  type: 'stream',
  value: [
    [ '1698301369557-0', [ 'name', 'a', 'age', '12' ] ],
    [ '1698301390773-0', [ 'name', 'b', 'age', '14' ] ]
  ]
}
{ key: 'test:hash', type: 'hash', value: { name: 'a', age: '12' } }
? Delete above keys? (y/N)

License

MIT

0.3.0

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago