CLI tool
laixintao/iredis avatar
laixintao/iredis

IRedis: a Redis terminal client with auto-completion and syntax highlighting

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

2,754 stars121 forksPythonBSD-3-Clause

At a glance

What is it?
IRedis is a Python-based alternative to redis-cli that validates commands as you type, guards against dangerous ones, and formats replies for humans. It is aimed at developers and operators who spend real time in an interactive Redis session.
Who is it for?
Adopt IRedis if you type Redis commands interactively, especially against shared or production servers where a stray KEYS * is expensive, and if you want completion driven by the keys you just listed. Do not adopt it if you need a single static binary: the README states the PyOxidizer build stopped after v1.15.2, so anything newer needs a Python 3.10 to 3.14 interpreter.
Can I use it commercially?
Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 9 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 24, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What IRedis changes about the redis-cli session

redis-cli is a thin pipe between your terminal and the server. It sends what you type and prints what comes back, with little interpretation in between. IRedis keeps the same command vocabulary, and the README states that in most cases it behaves exactly the same as redis-cli, but it inserts a layer that knows the Redis grammar. That layer does three things: it completes arguments, it checks a command while you are still typing and highlights errors, and it renders replies in a format meant for reading rather than parsing.

The audience is narrow and specific. If you open a Redis session to run one PING from a script, IRedis adds nothing. If you sit in a session for twenty minutes inspecting keys, its value is the loop between listing keys and acting on them. The README's example is concrete: run KEYS, then start typing DEL, and IRedis completes the argument from the KEYS result. That is state carried between commands, which redis-cli does not keep.

The safety argument is the other half. The README says IRedis will prevent accidentally running dangerous commands such as KEYS *, citing the Redis documentation page on latency generated by slow commands. That is a deliberate divergence from redis-cli, and it is the reason someone would put IRedis on a production box rather than a laptop.

Completion, validation and the peek command

The completion engine is grammar-driven. IRedis parses what you have typed against the Redis command set, so the suggestions are valid continuations rather than a flat word list. Validation runs on the same parse: the README gives CLUSTER MEET IP PORT as the example, where IRedis checks that the argument in the IP position is an IP and the one in the PORT position is a port. Catching that before the round trip is the point.

peek is the feature that most changes day-to-day use. Rather than calling TYPE and then choosing GET, LRANGE or SSCAN yourself, peek inspects the key's type and issues the appropriate read. The README adds that it also displays the key's length and memory usage. For an operator triaging an unfamiliar keyspace, that collapses three commands into one.

The shell integration is the pipeline mode. The README shows get json | jq ., meaning the response can be piped into ordinary shell tools instead of being trapped inside the client. Long output goes to a pager. Ctrl+C cancels the current typed command without exiting the session, matching bash, and Ctrl+D sends EOF to leave. Ctrl+R opens reverse-i-search over command history. None of this is exotic, but the combination is what separates an interactive client from a transport.

Installing IRedis and running a first command

The README lists several install paths. The two Python ones are pip and pipx, and the README recommends pipx, which is the sensible choice for a CLI application because it isolates the dependency tree from your project environments.

bash
pipx install iredis

After that, iredis is on your PATH. Mac users can install through Homebrew instead, and Linux users can use a distribution package manager: the README notes apt on Ubuntu, with availability only on Ubuntu 21.04 and later.

bash
brew install iredis

To connect, IRedis accepts options in the same shape as redis-cli: -h for the server host, -p for the port, -a for the password. The README's own help output shows the default host as 127.0.0.1 and the default port as 6379. A URL form exists as well, and the README gives the example below, with IREDIS_URL named as the environment variable that can carry the same value.

bash
iredis --url redis://example.com:6379/1

For a single command rather than a session, pass the command as an argument. The README shows this form, including the redirect, which matters because IRedis otherwise reads from piped stdin when stdin is not a terminal.

bash
iredis PING </dev/null

Once inside, HELP is built in and backed by the official Redis documentation. The README suggests trying HELP SET. Command hints appear at the bottom of the screen and include the command syntax, the Redis version that supports it, and its time complexity.

Where IRedis stops being the right tool

The single-binary story has an expiry date, and it is the clearest limitation in the README. IRedis was packaged into one executable with PyOxidizer, which made it usable on machines without a Python interpreter, including the official Redis Docker image. The README states that the single binary build only supports up to v1.15.2, because PyOxidizer is no longer maintained, and that IRedis no longer produces that build. The download command in the README still points at the v1.15.2 release asset. Anyone who needs a self-contained binary is therefore pinned to that version, and the Dockerfile in the repository takes the other route: it starts from a redis-stack-server image, installs python3 and pip, builds the package with poetry, and installs the resulting tarball.

The dependency footprint is the second trade-off. pyproject.toml requires Python ^3.10 and pulls in prompt_toolkit, Pygments, mistune, configobj, click, packaging and python-dateutil, plus redis constrained to >=5.0.0,<8.0.0. That upper bound is worth noticing: when a Redis client library major version lands outside that range, IRedis needs a release before it can use it.

Finally, IRedis is not a scripting interface. It is an interactive shell that can also execute one command. If your workflow is a loop of a thousand commands driven by application logic, the redis-py client that IRedis itself depends on is the correct layer, not a terminal client.

IRedis against redis-cli and a Python client

The honest comparison is with redis-cli, because IRedis presents itself as an alternative to it. The difference is where the intelligence sits. redis-cli forwards bytes and lets the server be the only thing that validates anything; its output is designed to be stable and scriptable. IRedis parses locally, so it can reject a malformed CLUSTER MEET before the network is touched, complete a DEL from a previous KEYS, and refuse KEYS * outright. That last behaviour is a real behavioural difference, not a cosmetic one: a command that works in redis-cli will be blocked here, and if you genuinely need it you are fighting your own tool.

The comparison with redis-py is a comparison of layers. redis-py is a library you import; IRedis is a program you run. They share a dependency relationship, since pyproject.toml lists redis as a runtime requirement, but they solve different problems. redis-py gives you connection pooling and typed results inside an application; IRedis gives you a prompt, history, hints and a pager. Choosing between them is not a judgement about quality, it is a question of whether a human or a program is issuing the command.

Maintenance, licence and what an upgrade costs

The repository is not archived. The last push was on 2026-09-21, and the most recent release listed is v1.16.0 from 2026-02-20, with v1.15.2 before it in 2025. pyproject.toml carries version 1.16.1, so the working tree is ahead of the last tagged release. The project classifies itself as Development Status :: 4 - Beta, which is worth reading literally: the interface is stable enough to use daily, but the maintainer has not declared it finished.

The licence declared in pyproject.toml is BSD-3-Clause, and the repository has a LICENSE file. One inconsistency is visible in the same file: the classifiers list License :: OSI Approved :: MIT License while the license field says BSD-3-Clause. If licence terms matter to your organisation, read the LICENSE file rather than the classifier. This is a description of what the metadata says, not legal advice.

Upgrade cost is dominated by Python version support. The README states support for Python 3.10 through 3.14, with 3.15 prereleases tested in an experimental CI job whose failures do not block changes. The redis library is pinned below 8.0.0. Those two constraints, plus the end of single-binary builds, define what an upgrade actually involves.

Editorial conclusion

Adopt IRedis if you type Redis commands interactively, especially against shared or production servers where a stray KEYS * is expensive, and if you want completion driven by the keys you just listed. Do not adopt it if you need a single static binary: the README states the PyOxidizer build stopped after v1.15.2, so anything newer needs a Python 3.10 to 3.14 interpreter. Before rolling it out, verify your Redis version against the -u username flag, which the README says is ignored below Redis 6, and check that your client-side tooling tolerates the pipeline mode, since the README's get json | jq . example assumes shell tools downstream.

Frequently asked questions

How do I install IRedis?

The README lists pip and pipx, with pipx recommended, plus Homebrew for Mac and distribution packages such as apt on Ubuntu 21.04 and later. There was also a downloadable single binary, but the README states that build stopped after v1.15.2.

Does IRedis replace redis-cli?

The README presents IRedis as an alternative to redis-cli and says that in most cases it behaves exactly the same. The deliberate difference is that IRedis will prevent accidentally running dangerous commands such as KEYS *.

Can IRedis connect to a Redis cluster?

Yes. The README states that IRedis supports cluster mode and will automatically reissue a command when it receives a MOVED response. It also documents a --natmap option for NAT mapping, taking remoteHost:remotePort:localHost:localPort and accepting comma-separated values for multiple nodes.

What Python versions does IRedis support?

The README states support for Python 3.10 through 3.14, and pyproject.toml requires ^3.10. CI also runs an experimental job against Python 3.15 prereleases, where failures do not block changes.

What does the peek command do in IRedis?

peek checks the key's type and then calls the matching read command, such as get, lrange or sscan, so you do not have to run type first. The README adds that it also displays the key's length and memory usage.

Official sources

  1. laixintao/iredis on GitHub
  2. License: BSD-3-Clause
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/laixintao-iredis.svg)](https://hysenlabs.com/projects/laixintao-iredis)