본문 바로가기

좋아하는 것_매직IT/96.IT 핫이슈

iRedis - 인터랙티브 Redis 터미널 클라이언트를 소개합니다.(github.com/laixintao)

반응형

iRedis - 인터랙티브 Redis 터미널 클라이언트를 소개합니다.(github.com/laixintao)

웹페이지에서는 아래와 같이 소개하고 있네요..
 - IRedis is a terminal client for redis with auto-completion and syntax highlighting. IRedis lets you type Redis commands smoothly, and displays results in a user-friendly format.

한마디로 IRedis 를 요약하자면 아래와 같습니다. 
 -  인터랙티브 Redis 터미널 클라이언트라고요...

(개인적으로 써보니..신통방통하네요~~ㅎㅎㅎ)

iRedis의 특징을 잠시 정리하자면 아래와 같습니다. 
- 자동 완성, 자동 추천 및 구문 강조 지원
- 입력한 코맨드 검증 기능
- 읽기 쉬운 결과 출력
- 파이프라인 가능
- URL로 원격 Redis 연결 가능
- Python 오픈 소스 

제가정리한 특징외에도 웹페이지에서는 아래와 같이 엄청난 특징을 기술하고 있습니다.

참고로 설치방법은 아래와 같습니다. 

Install

Pip

Install via pip:

pip install iredis

pipx is recommended:

pipx install iredis

Brew

For Mac users, you can install iredis via brew 🍻

brew install iredis

Linux

You can also use your Linux package manager to install IRedis, like apt in Ubuntu (Only available on Ubuntu 21.04+).

apt install iredis

Download Binary

Or you can download the executable binary with cURL(or wget), untar, then run. It is especially useful when you don't have a python interpreter(E.g. the official Redis docker image which doesn't have Python installed.):

wget  https://github.com/laixintao/iredis/releases/latest/download/iredis.tar.gz \
 && tar -xzf iredis.tar.gz \
 && ./iredis

(Check the release page if you want to download an old version of 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:password@staging-redis.example.com:6379/1

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

그외에 자세한 사항은 아래 github 페이지를 참고하시면 될것 같네요~~

오늘의 블로그는 여기까지고요..

항상 믿고봐주셔서 감사합니다.

300x250