Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Calemsy/Cedis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRDIS - Command Line Redis Interface

A simple but powerful command-line interface for Redis, written in C++.

Features

  • Display all Redis keys with their types in a formatted table
  • Search keys using patterns
  • Get values of any Redis data type
  • Special handling for hash type values with table formatting
  • Delete keys
  • View database statistics and server information
  • Web interface for Redis management (port 8080)

Web Interface

CRDIS provides a web interface for managing Redis through your browser:

  • Access the web interface at http://localhost:8080
  • RESTful API endpoints for Redis operations
  • View and manage Redis data through a web browser
  • Default port: 8080 (configurable)

Commands

  1. keys - List all keys
  2. type <key> - Get type of a key
  3. search <pattern> - Search keys by pattern
  4. get <key> - Get value of a key
  5. hget <key> <field> - Get hash field value
  6. del <key> - Delete a key
  7. count - Get total key count
  8. dbsize - Get database size
  9. info - Show server information
  10. clear - Clear screen
  11. help - Show help message
  12. quit - Exit program

Building

Prerequisites

  • C++17 compiler
  • CMake 3.10 or higher
  • hiredis library

Build Steps

mkdir build
cd build
cmake ..
make

Usage

./crdis

By default, it connects to Redis on localhost:6379.

Examples

# List all keys
> keys
+----------------+--------+
| Key            | Type   |
+----------------+--------+
| test_key       | string |
| user:1         | hash   |
| products       | list   |
+----------------+--------+

# Get hash field
> hget user:1 name
Field value: John Doe

# Show database info
> info
=== Server ===
redis_version: 6.2.6
redis_mode: standalone
os: Darwin 21.6.0 arm64
...

License

MIT License

Get type of a key

type mykey

Search keys with pattern

search user:*

Get value of a key

get mykey

About

web and command-line interface for Redis created by windsurf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published