A simple terminal user interface (TUI) for browsing and managing Redis databases.
lazyredis allows you to connect to one or more Redis instances, explore keys in a tree view, inspect and copy values of different types (string, hash, list, set, sorted set, stream), search/filter keys, delete keys or whole key prefixes, and seed a Redis instance with sample data for testing.
- Interactive key tree view: browse keys grouped by delimiter (default
:) in a folder-like hierarchy. - Multi-type value inspector: view and navigate string, hash, list, set, sorted set (zset), and stream entries.
- Fuzzy search: quickly find keys across the current view using fuzzy matching.
- Profile & DB management: switch between multiple connection profiles and Redis databases (select via
p). - Copy to clipboard: copy key names or values directly to the system clipboard (
y/Y). - Delete keys or prefixes: delete individual keys or entire key folders (with confirmation).
- Pagination & navigation: navigate values with arrow keys, page up/down, and Tab for focus switching.
- Seeding test data: populate a development Redis instance with a large variety of sample keys via
--seed.
brew tap mazdak/lazyredis
brew install lazyredisPre-build Linux Binaries are available on Github: https://github.com/mazdak/lazyredis/releases
- Install Rust and Cargo.
- Clone this repository:
git clone https://github.com/mazdak/lazyredis.git cd lazyredis - Build the release binary:
cargo build --release
Run the TUI:
cargo run --releaseOr use the generated binary:
./target/release/lazyredislazyredis 0.1.0
USAGE:
lazyredis [OPTIONS]
OPTIONS:
--profile <PROFILE> Specify profile name to connect, or to select for seeding/purging (default: first profile)
--seed Seed the Redis instance with test data (dev only)
--purge Purge (delete) all keys in the Redis instance (dev only)
-h, --help Print help information
-V, --version Print version information
When launched normally, lazyredis will:
- Load connection profiles from
~/.config/lazyredis/lazyredis.toml(created automatically on first run). - Connect to the specified profile (via
--profile) or to the first profile and database. - Enter the TUI for browsing keys/values.
| Key/Action | Description |
|---|---|
q |
Quit |
p |
Open profile selector |
j / k / ↓ / ↑ |
Navigate keys or values |
Tab / Shift+Tab |
Switch focus between panels |
Enter |
Enter folder / select key |
Esc / Backspace |
Go up or exit search/delete mode |
/ |
Start fuzzy key search |
y |
Copy selected key name |
Y |
Copy selected key value |
d |
Delete selected key or prefix |
PgUp / PgDn |
Page navigation in value view |
On first run, lazyredis generates a default config file at:
~/.config/lazyredis/lazyredis.toml
on macOS:
~/Library/Application Support/lazyredis/lazyredis.toml
Example lazyredis.toml:
[[connections]]
name = "Default"
url = "redis://127.0.0.1:6379"
db = 0
dev = true
color = "lightgreen"name: Human-readable profile name.url: Redis connection URL.db: Optional database index (0–15).dev: Optional flag to mark development profiles (for--seedand--purge).color: Optional color for the profile (e.g., in the UI). Accepts common color names (like "red", "green", "lightblue") or hex codes (e.g., "#FF0000"). Defaults to white if not specified or invalid.
To add more profiles, append additional [[connections]] tables.
To add more profiles, append additional [[connections]] tables. For instance:
[[connections]]
name = "Local Dev"
url = "redis://127.0.0.1:6379"
db = 0
dev = true
color = "lightgreen" # A nice, light green for local dev
[[connections]]
name = "Staging Server"
url = "redis://staging.example.com:6379"
db = 1
dev = false
color = "#FFA500" # Orange hex code for staging
[[connections]]
name = "Production Read Replica"
url = "redis://prod-replica.example.com:6379"
db = 0
dev = false
color = "red" # Red to indicate caution for productionYou can populate a development Redis instance with sample keys by using:
lazyredis --seed
# Or specify a profile:
lazyredis --profile Default --seedTo purge (delete) all keys in a development Redis instance without seeding, use:
lazyredis --purge
# Or specify a profile:
lazyredis --profile Default --purgeBoth commands will only target profiles marked as dev = true in your configuration.
This generates (only for --seed):
- Simple string keys, nested hierarchies, paths, hashes, lists, sets, sorted sets, streams, and empty types.
Contributions welcome! Please open issues or pull requests on GitHub.