DiceDB is a redis-compliant, in-memory, real-time, and reactive database optimized for modern hardware and for building and scaling truly real-time applications. This is a command line interface for it.
sudo su
curl -sL https://raw.githubusercontent.com/DiceDB/dicedb-cli/refs/heads/master/install.sh | sh
To run DiceDB CLI for local development or running from source, you will need
- Golang
- Any of the below supported platform environments:
- Linux based environment
- OSX (Darwin) based environment
- WSL under Windows
git clone https://github.com/dicedb/dicedb-cli
cd dicedb-cli
go run main.go
Run the executable to start the interactive prompt
$ dicedb-cli
You should see
Connected to DiceDB. Type 'exit' or press Ctrl+D to exit.
dicedb>
You can execute any DiceDB command directly:
dicedb> SET k1 v1
OK
dicedb> GET k1
v1
dicedb> DEL k1
1
To use
.WATCH
commands, make sure your DiceDB server is running with the flag--enable-watch --enable-multithreading
.
Receive updated results of supported commands using their .WATCH
variants. These commands keep the prompt in a persistent state, displaying updates when the monitored data changes. Start watching a key:
dicedb> GET.WATCH k1
The prompt changes to indicate watch mode:
dicedb(get.watch)>
In other terminal, connect the CLI to the same database and fire
dicedb> SET k1 v2
As the value of key k1
changes, the new value is emitted to the client connected on the first terminal in real-time.
Command: GET
Fingerprint: 2402418009
Data: "v2"
To exit the watch mode, use the corresponding .UNWATCH
command:
dicedb(get.watch)> GET.UNWATCH 2402418009
Output
OK
dicedb>
Type exit
or press Ctrl+D
to exit the CLI:
dicedb> exit
This project is licensed under the MIT License - see the LICENSE file for details.