- Why memtui?
- Highlights
- Installation
- Quick Start
- Use Cases
- Keyboard Shortcuts
- Features
- Configuration
- Built With
- Contributing
- Support
- License
Ever tried to debug Memcached data? Traditional tools like telnet or nc make it painful to browse keys, understand data formats, or safely edit values.
memtui brings the developer experience you expect from modern tools:
- Browse all keys in a tree — Uses
lru_crawler metadumpto enumerate keys (requires Memcached 1.4.31+) - Auto-detect data formats — Recognizes JSON, gzip/zlib, and binary data automatically
- Edit with conflict detection — CAS support detects concurrent modifications during edits
- Hierarchical Key Navigation — Browse keys organized in a tree structure with folder-like grouping
- Smart Value Viewer — Auto-detect and format JSON, with syntax highlighting
- VS Code-style Command Palette — Quick access to all commands with
Ctrl+P - Real-time Key Filtering — Fuzzy search through thousands of keys instantly
- Safe Operations — Confirmation dialogs for destructive operations
- Vim-style Keybindings — Navigate with
j/k, familiar to terminal users
brew install nnnkkk7/tap/memtuigo install github.com/nnnkkk7/memtui/cmd/memtui@latestgit clone https://github.com/nnnkkk7/memtui.git
cd memtui
go build -o memtui ./cmd/memtui| Requirement | Version | Note |
|---|---|---|
| Go | 1.25+ | For building from source |
| Memcached | 1.4.31+ | Required for lru_crawler metadump support |
- Start Memcached:
# Using Docker
docker run -d -p 11211:11211 memcached:latest- Run memtui:
memtui # Connect to localhost:11211 (default)
memtui -addr localhost:11211 # Specify address
memtui --help # Show help- Debugging — Quickly inspect cached values during development
- Data Migration — View and verify data before/after migrations
- Cache Analysis — Understand key naming patterns and data distribution
- Incident Response — Rapidly inspect cache state during outages
Navigation
| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
Enter |
Select key / Expand folder |
Tab |
Switch between key list and viewer |
Esc |
Return to key list / Close dialog |
Commands
| Key | Action |
|---|---|
Ctrl+P |
Open command palette |
/ |
Filter keys (fuzzy search) |
r |
Refresh key list |
n |
Create new key |
e |
Edit selected key's value |
d |
Delete selected key |
c |
Copy value to clipboard |
? |
Show help |
q |
Quit |
In Value Viewer
| Key | Action |
|---|---|
j / ↓ |
Scroll down |
k / ↑ |
Scroll up |
g |
Go to top |
G |
Go to bottom |
J |
JSON view mode |
H |
Hex view mode |
T |
Text view mode |
A |
Auto view mode |
Keys are automatically organized into a hierarchical tree based on common delimiters (:, /, .). For example:
user:1001:profile ─┐
user:1001:session ─┼→ user/
user:1002:profile ─┘ ├── 1001/
cache:api:users ─┐ │ ├── profile
cache:api:posts ─┘ │ └── session
├── 1002/
│ └── profile
cache/
└── api/
├── users
└── posts
The viewer automatically detects and formats:
- JSON — Pretty-printed with syntax highlighting
- Compressed data — Detects gzip/zlib (displayed as hex in auto mode)
- Binary data — Displays hex dump
- Plain text — Shows as-is
Press Ctrl+P to open the VS Code-style command palette for quick access to all features with fuzzy search.
Configuration file location: ~/.config/memtui/config.yaml
# Connection settings
connection:
default_address: localhost:11211 # Default server address
# UI settings
ui:
theme: dark # dark or light
key_delimiter: ":" # Key hierarchy delimiter (e.g., ":", "/", ".")CLI flags override config file settings:
memtui -addr localhost:11212 # Overrides connection.default_address- Bubble Tea — TUI framework based on The Elm Architecture
- Bubbles — Common Bubble Tea components
- Lip Gloss — Style definitions for terminal apps
- gomemcache — Memcached client for Go
Contributions are welcome! Here's how you can help:
If you find memtui useful, please consider giving it a star on GitHub! It helps others discover the project and motivates continued development.
This project is licensed under the MIT License - see the LICENSE file for details.
