Skip to content

jirkapinkas/redisdoc

Repository files navigation

redisdoc = Redis documentation console

Why this project exists? Because there is currently no such tool and I needed to document my Redis database. So I created a console that mimics Redis console functionality (because I suppose if you need to document Redis database, you already use Redis and you shouldn't be forced to learn something radically new), but redisdoc contains commands specific for documenting your Redis database.

How to download & run:

Download contents of bin directory:
  • redisdoc.jar: Java executable file
  • redisdoc.properties: configuration

Run this application in terminal / cmd: java -jar redisdoc.jar

Why Java application?

Because I'm a Java programmer :) And also because I use several different operating systems and this application must run on all of them.

Functionality:

Available commands:

help show help for all commands

help <command> show help for specific command

quit or exit quit application

dinfoset set database information - author, database name and description

dinfoget get database information - author, database name and description

select <number> select redis database with your keys

dselect <number> select redis database for documentation

keys <pattern> select keys using pattern

dset <doc-name (pattern)> <description> set documentation key (pattern) with description

ddel <doc-name> deletes documentation key

dkeys <pattern> list documentation keys using pattern

dget <doc-name> documentation key detail. Contains several optional parameters, which can be combined

dget --type <doc-name> show keys with their types

dget --detail <doc-name> show keys with their values or length

dget --ttl <doc-name> show keys with ttl

dundkeys retrieves undocumented keys from your database. Contains several optional parameters, which can be combined

dundkeys --type show undocumented keys with their types

dundkeys --detail show undocumented keys with their values or length

dundkeys --ttl show undocumented keys with ttl

Usage

I have following Redis database, where are Java news stories. Each news story has some tags (for example news story "Java 8" has tags java, breaking news, java 8):


news:hello-world-java
news:java-8
news:java-summer-fun
tag:java
tag:java-8
tag:breaking-news
news-tags:java-8

Description

  • Keys starting with "news" contain news story detail
  • Keys starting with "tag" contain tag detail (full name)
  • Keys starting with "news-tags" contain tags set for particular news story

Documenting database


// list all commands
press <TAB>, for detailed information run command "help"
// set info about database
dinfoset tags "Jiri Pinkas" "news tags database"
// see info about database
dinfoget
// show all undocumented keys
dundkeys
// document keys
dset news:* "news story detail"
dset tag:* "tag detail (full name)"
dset news-tags:* "tags set for particular news story"
// see current documentation detail
dkeys *
// DONE! EASY, RIGHT?

My other projects:

githalytics.com alpha

About

redis documentation console

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages