MCPcopy Index your code
hub / github.com/Dhravya/radish

github.com/Dhravya/radish @0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.1 ↗ · + Follow
98 symbols 249 edges 12 files 8 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Go-Redis

License: MIT

Super fast drop-in replacement of the in memory key-value store redis in golang


Contributor Covenant Try it out instantly

👀 What is this? Why?

go-redis is a super fast drop-in replacement of the in memory key-value store redis, built with golang.

Why? Redis recently (Last week, as of Mar 25 2024) changed their license to a dual 'source-available' license - which means that it can't be used for commercial purposes without paying for a license. Everyone hated it. This is a problem for many companies and developers who use redis in their projects.

And, I was kinda bored and wanted to learn golang properly, so I built this.

Should you use this in production? Probably, probably not. It's not battle tested yet, but i (as a single person team) have tried to do my best to make it as reliable as possible.

I even made a cute mascot (Godis crushing Redis)

Annddd all i ask in return is a little ⭐ so that i dont have to rely on twitter for my dopamine hit.

Godis

📜 Features

Feature Redis Go-Redis
In-memory key-value store
Strings
Lists
Sets
Sorted sets
Hashes
Streams
HyperLogLogs
Bitmaps
Persistence
Pub/Sub
Transactions
Lua scripting
LRU eviction
TTL 😅
Clustering
Auth

Available commands

For now, these commands are available (more to come)

MISC

INFO PING FLUSHALL SHUTDOWN SAVE BGSAVE

Keys

DEL EXISTS KEYS EXPIRE TTL

Strings

SET GET APPEND INCR INCRBY DECR DECRBY MSET MGET

Lists

LPUSH LPOP RPUSH RPOP LRANGE LLEN

Hashes

HSET HGET HMSET HMGET HGETALL HDEL

Sets

SADD SMEMBERS SISMEMBER SREM

Sorted Sets

ZADD ZRANGE ZREM

Pub/Sub

SUBSCRIBE PUBLISH UNSUBSCRIBE

Transactions

MULTI EXEC DISCARD

Installation

Using docker

To get it up and running instantly, you can use the docker image

docker run -d -p 6379:6379 dhravyashah/go-redis

Using go

go get github.com/dhrvyashah/go-redis

and then just build and run the binary

Using the binary

Download the binary executables from ./bin/go-redis.

Click here to get it instantly.

Having fun

This IS compatible with the existing redis tooling and client libraries! Try it out with some of them.

For eg.

npm i -g redis-cli

(make sure the server is running - docker is the easiest and fastest way)

❯ rdcli
127.0.0.1:6379> incr mycounter
(integer) 1
127.0.0.1:6379> incr mycounter
(integer) 2
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
bar
127.0.0.1:6379> get bar
(nil)

Contributing

Go-redis is completely open source. If you want to contribute, please create an issue on the repo and I will assign the task to someone (or you).

Steps to contribute: 1. Clone the repo

git clone https://github.com/dhravya/go-redis
  1. Create a new branch

  2. Make sure to build and test the code before creating a PR

go build -o ./bin
  1. Create a PR

Help and the community

If you need any help, or want to ask questions, or suggest features, please feel free to DM me on twitter - https://dm.new/dhravya or create an issue on the repo.

You can also join our Discord server where we have a community of developers ready to help you out.

License

Unlike redis, go-redis is licensed under the MIT license. You can use it for commercial purposes without any restrictions. Go wild!

Core symbols most depended-on inside this repo

Write
called by 38
redisproto/writer.go
send_command
called by 26
tests/clientconnect.py
Flush
called by 10
redisproto/writer.go
Error
called by 5
redisproto/parser.go
ArgCount
called by 4
redisproto/parser.go
readSome
called by 4
redisproto/parser.go
requireNBytes
called by 4
redisproto/parser.go
discardNewLine
called by 4
redisproto/parser.go

Shape

Function 47
Method 40
Struct 10
TypeAlias 1

Languages

Go80%
Python20%

Modules by API surface

redisproto/parser.go19 symbols
redisproto/writer.go14 symbols
tests/test.py13 symbols
redisproto/fmt.go12 symbols
main.go9 symbols
tests/clientconnect.py7 symbols
pubsub.go7 symbols
persistence.go6 symbols
transactions.go5 symbols
redisproto/writer_test.go3 symbols
utils.go2 symbols
redisproto/cmd/roller/fmttest.go1 symbols

For agents

$ claude mcp add radish \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact