<ahref="https://t.me/iredis_users"><imgsrc="https://badgen.net/badge/icon/join?icon=telegram&label=usergroup"alt="Chat on telegram"></a>
<ahref="https://console.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/laixintao/iredis&cloudshell_print=docs/cloudshell/run-in-docker.txt"><imgsrc="https://badgen.net/badge/run/GoogleCloudShell/blue?icon=terminal"alt="Open in Cloud Shell"></a>
</p>
<palign="center">
<imgsrc="./docs/assets/demo.svg"alt="demo">
</p>
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 is an alternative for redis-cli. In most cases, IRedis behaves exactly
the same as redis-cli. Besides, it is safer to use IRedis on production servers
than redis-cli: IRedis will prevent accidentally running dangerous commands,
like `KEYS *` (see
[Redis docs / Latency generated by slow commands](https://redis.io/topics/latency#latency-generated-by-slow-commands)).
## Features
- Advanced code completion. If you run command `KEYS` then run `DEL`, IRedis
will auto-complete your command based on `KEYS` result.
- Command validation. IRedis will validate command while you are typing, and
highlight errors. E.g. try `CLUSTER MEET IP PORT`, IRedis will validate IP and
PORT for you.
- Command highlighting, fully based on redis grammar. Any valid command in
IRedis shell is a valid redis command.
- Human-friendly result display.
- _pipeline_ feature, you can use your favorite shell tools to parse redis'
response, like `get json | jq .`.
- Support pager for long output.
- Support connection via URL, `iredis --url redis://example.com:6379/1`.
- Store server configuration: `iredis -d prod-redis` (see [dsn](#using-dsn) for
more).
-`peek` command to check the key's type then automatically call
`get`/`lrange`/`sscan`, etc, depending on types. You don't need to call the
`type` command then type another command to get the value. `peek` will also
display the key's length and memory usage.
-<kbd>Ctrl</kbd> + <kbd>C</kbd> to cancel the current typed command, this won't
exit IRedis, exactly like bash behaviour. Use <kbd>Ctrl</kbd> + <kbd>D</kbd>
to send a EOF to exit IRedis.
-<kbd>Ctrl</kbd> + <kbd>R</kbd> to open **reverse-i-search** to search through
your command history.
- Auto suggestions. (Like [fish shell](http://fishshell.com/).)
- Support `--encode=utf-8`, to decode Redis' bytes responses.
- Command hint on bottom, include command syntax, supported redis version, and
time complexity.
- Official docs with built-in `HELP` command, try `HELP SET`!
- Written in pure Python, but IRedis was packaged into a single binary with
[PyOxidizer](https://github.com/indygreg/PyOxidizer), you can use cURL to
download and run, it just works, even you don't have a Python interpreter.
- Hide password for `AUTH` command.
- Says "Goodbye!" to you when you exit!
- For full features, please see: [iredis.io](https://www.iredis.io)
## Install
Install via pip:
```
pip install iredis
```
[pipx](https://github.com/pipxproject/pipx) is recommended:
```
pipx install iredis
```
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](https://hub.docker.com/_/redis/) which doesn't