A native Neovim Redis browser. Browse keys, filter by pattern, and view/edit values — all without leaving your editor.
┌─ keys ──────────────────────────────────────────┐ ┌─ viewer ─────────────────────────────────────┐
│ redis-nvim │ local 6379/db0 │ rjbank_kb_v1:* │ │ rjbank_kb_v1:abc123 │ string │ ttl: 3600 │
│ [f]filter [R]reload [c]conn [a]add │ │ [e]edit [q]close │
├─────────────────────────────────────────────────┤ ├──────────────────────────────────────────────┤
│ rjbank_kb_v1:abc123 │ │ { │
│ rjbank_kb_v1:def456 │ │ "user": "aaron", │
│ rjbank_kb_v1:ghi789 │ │ "score": 99 │
│ ── load more ── │ │ } │
└─────────────────────────────────────────────────┘ └──────────────────────────────────────────────┘
- Neovim ≥ 0.10
redis-clion$PATHjqon$PATH(optional — used for JSON pretty-printing)
vim.pack.add (Neovim ≥ 0.11)
vim.pack.add("aaronshahriari/redis.nvim")lazy.nvim
{ "aaronshahriari/redis.nvim" }Then call setup somewhere in your config (required, even with no options):
require("redis-nvim").setup():Redis
:Redis myconn " open and switch to a named connectionOr bind it:
vim.keymap.set("n", "<leader>rd", "<cmd>Redis<cr>")Press a in the keys pane and follow the prompts:
Name: local
Host: localhost
Port: 6379
DB: 0
Password: (blank for none)
Connections are saved to ~/.local/share/nvim/redis-nvim/connections.json.
| Key | Action |
|---|---|
<CR> |
Open key value in viewer / trigger load-more |
f |
Set filter pattern (glob, e.g. user:*) |
R |
Reload from scratch |
c |
Pick a different connection |
a |
Add a new connection |
dd |
Delete key under cursor |
| Key | Action |
|---|---|
e |
Enter edit mode |
:w |
Save edits back to Redis |
u |
Undo edits |
q |
Close viewer |
JSON string values are auto pretty-printed if jq is available.
| Redis type | Format shown in viewer |
|---|---|
| string | raw value (JSON pretty-printed if valid) |
| hash | field: value per line |
| list | one element per line |
| set | one member per line |
| zset | member score per line |
Edit in these formats and :w — the plugin writes back using the correct Redis command.
:Redis " prompts via 'a' → add connection with password fieldPasswords are stored in the connections JSON file (chmod 600 recommended).
Alternatively set REDISCLI_AUTH in your environment before starting Neovim.
require("redis-nvim").setup({
page_size = 200, -- keys per SCAN batch
key_win_width = 55, -- width of the key browser pane
keymaps = {
select = "<CR>",
filter = "f",
reload = "R",
delete = "dd",
conn_pick = "c",
conn_add = "a",
edit = "e",
close = "q",
},
})- Keys are loaded via Redis
SCANin batches (page_sizeper page). Press<CR>on── load more ──to fetch the next batch. - Viewing a key fetches
TYPEandTTLconcurrently, then fetches the value with the type-appropriate command (GET,HGETALL,LRANGE,SMEMBERS,ZRANGE WITHSCORES). - Editing writes back with
SET/DEL+HSET/DEL+RPUSH/DEL+SADD/DEL+ZADDdepending on type. - All Redis I/O is async via
vim.fn.jobstart.
- Hash/list/set/zset values containing newlines will not parse correctly on write-back.
- No cluster support.
- Sorted-set member names cannot contain spaces.