PHPackages                             wizarot/redis-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wizarot/redis-cli

ActiveLibrary

wizarot/redis-cli
=================

redis 命令行工具

1.3.2(6y ago)02MITPHP

Since May 31Pushed 6y agoCompare

[ Source](https://github.com/jungeFight/redis-cli)[ Packagist](https://packagist.org/packages/wizarot/redis-cli)[ RSS](/packages/wizarot-redis-cli/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (1)Versions (7)Used By (0)

PHP 写的简单 Redis 客户端
==================

[](#php-写的简单-redis-客户端)

是什么
---

[](#是什么)

[![image](doc/pic1.jpg)](doc/pic1.jpg)

- 简单操作redis的命令行工具
- 简单不用每次查文档
- 查看更直观,之前打算用Electron开发桌面版,但不熟. 所以还是先做一个命令行版本拿来用

为什么
---

[](#为什么)

- 原因1: 每次做点简单的Redis操作都要翻手册,嫌麻烦. 所以把基本功能做了下简化
- 原因2: Medis客户端收费了,同事想用发现找个简单操作的没有. 吹牛说自己写一个,于是填坑.

安装方法
----

[](#安装方法)

1. clone项目代码: git clone
2. 进入文件件: cd redis-cli
3. 切换到当前最新版本tag: git checkout v1.3.2
4. 使用composer安装依赖包: composer update

使用方法
----

[](#使用方法)

- 启动: ./redis-cli
- windows启动: redis-cli.bat (可能需要自行编辑一下,手动修改php.exe文件的路径)
- 输入redis连接: host port (可以启用auth输入密码,如果有需要自己去src/RedisCommand.php -&gt; connRedis() 修改 )
- help 或者 随意输入别的,显示帮助列表
- exit 或者 ctrl+D 退出
- 需要php安装redis扩展. 如果实在没有那考虑自己引入pRedis bundle然后改一下 connRedis()函数就能用了,不会提issue.我抽空处理
- 可以自定义样式,复制config/style.php 到 config/customStyle.php 自己修改相应颜色
- 可用颜色: \[default, black, red, green, yellow, blue, magenta, cyan, white\]

特性 (如果有需求或者其他想法可以提issue)
------------------------

[](#特性-如果有需求或者其他想法可以提issue)

- (v1.2新特性)输入模仿Linux可以记录命令历史和自动帮助,上下箭头查看历史记录. (小功能但是方便了很多!)
- 用ls列出当前数据key和对应数据类型
- select 切换数据库,默认在 0 库
- ls ?/\* 支持通配符搜索key
- ttl key 查看生存时间
- ttl key second 设定生存时间
- persist key 设定生存时间为永久
- mv name new\_name 将key改名
- rm key 删除key
- config 获取redis 配置信息
- get key 获取值和对应信息(主要功能)
- set key 设置值/新增也可以. 操作流程有待优化,但是已经可用

其他
--

[](#其他)

啰嗦下,这东西毕竟是花了些心思弄出来的.如果大家有什么想法和bug可以提issue. 我会抽时间处理. 使用上有什么问题也可以随时问.

TODO
----

[](#todo)

- 用scan代替get \* 防止出现查死数据库的情况
- 完善自动填写功能,如果没有考虑自己加一个
- 完善上下箭头访问命令历史功能
- 完善windows命令行可执行文件使用 (有待测试和调整)
- 把显示颜色样式从项目中抽象出来放到配置文件中,方便用户自己微调

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~56 days

Total

6

Last Release

2301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db1d05b9cd03b0352f97ab6965a7ef1e2c16f561f9262e34822547b5927b5bc3?d=identicon)[jungeFight](/maintainers/jungeFight)

---

Top Contributors

[![wizarot](https://avatars.githubusercontent.com/u/4525203?v=4)](https://github.com/wizarot "wizarot (28 commits)")[![junler](https://avatars.githubusercontent.com/u/18376611?v=4)](https://github.com/junler "junler (2 commits)")

### Embed Badge

![Health badge](/badges/wizarot-redis-cli/health.svg)

```
[![Health](https://phpackages.com/badges/wizarot-redis-cli/health.svg)](https://phpackages.com/packages/wizarot-redis-cli)
```

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
