Sign inSign up

barisgece/iredis

By barisgece

•Updated almost 5 years ago

Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.

Image
0

212

barisgece/iredis repository overview

⁠IRedis

⁠Usage

Once you install IRedis, you will know how to use it. Just remember, IRedis supports similar options like redis-cli, like -h for redis-server's host and -p for port.

$ iredis --help

Usage:  [OPTIONS] [CMD]...

  IRedis: Interactive Redis

  When no command is given, IRedis starts in interactive mode.

  Examples:
    - iredis
    - iredis -d dsn
    - iredis -h 127.0.0.1 -p 6379
    - iredis -h 127.0.0.1 -p 6379 -a <password>
    - iredis --url redis://localhost:7890/3

  Type "help" in interactive mode for information on available commands and
  settings.

Options:
  -h TEXT                   Server hostname (default: 127.0.0.1).
  -p TEXT                   Server port (default: 6379).
  -s, --socket TEXT         Server socket (overrides hostname and port).
  -n TEXT                   Database number.(overwrites dsn/url's db number)
  -a, --password TEXT       Password to use when connecting to the server.
  --url TEXT                Use Redis URL to indicate connection(Can set with
                            env `IREDIS_URL`), Example:
                            redis://[[username]:[password]]@localhost:6379/0
                            rediss://[[username]:[password]]@localhost:6379/0
                            unix://[[username]:[password]]@/path/to/socket.soc
                            k?db=0

  -d, --dsn TEXT            Use DSN configured into the [alias_dsn] section of
                            iredisrc file. (Can set with env `IREDIS_DSN`)

  --newbie / --no-newbie    Show command hints and useful helps.
  --iredisrc TEXT           Config file for iredis, default is ~/.iredisrc.
  --decode TEXT             decode response, default is No decode, which will
                            output all bytes literals.

  --client_name TEXT        Assign a name to the current connection.
  --raw / --no-raw          Use raw formatting for replies (default when
                            STDOUT is not a tty). However, you can use --no-
                            raw to force formatted output even when STDOUT is
                            not a tty.

  --rainbow / --no-rainbow  Display colorful prompt.
  --shell / --no-shell      Allow to run shell commands, default to True.
  --pager / --no-pager      Using pager when output is too tall for your
                            window, default to True.

  --version                 Show the version and exit.
  --help                    Show this message and exit.
⁠Using DSN

IRedis support storing server configuration in config file. Here is a DSN config:

[alias_dsn]
dev=redis://localhost:6379/4
staging=redis://username:[email protected]:6379/1

Put this in your iredisrc then connect via iredis -d staging or iredis -d dev.

⁠Configuration

IRedis supports config files. Command-line options will always take precedence over config. Configuration resolution from highest to lowest precedence is:

  • Options from command line
  • $PWD/.iredisrc
  • ~/.iredisrc (this path can be changed with iredis --iredisrc $YOUR_PATH)
  • /etc/iredisrc
  • default config in IRedis package.

You can copy the self-explained default config here:

https://raw.githubusercontent.com/laixintao/iredis/master/iredis/data/iredisrc⁠

And then make your own changes.

(If you are using an old versions of IRedis, please use the config file below, and change the version in URL):

https://raw.githubusercontent.com/laixintao/iredis/v1.0.4/iredis/data/iredisrc⁠

Tag summary

Content type

Image

Digest

Size

347.4 MB

Last updated

almost 5 years ago

docker pull barisgece/iredis:0.0.4