This project shows how to connect to create a CLI for Materia serverless key-value store from Clever Cloud. It authenticates you with a biscuit-based token, sends commands and prints responses using the Redis protocol. It's a demonstration application using Go-Redis client.
You need Go language, to create a Materia KV add-on on Clever Cloud and set the KV_TOKEN
environment variable to connect. Then, to get/set a key:
mkv-cli get <key>
mkv-cli set <key> <value>
To increment/decrement a key:
mkv-cli incr <key>
mkv-cli decr <key>
To list all keys:
mkv-cli keys "*"
To delete a key:
mkv-cli del <key>
To list supported commands:
mkv-cli commands
You can also execute any supported command with the raw
feature:
mkv-cli raw "<command>"
For more information, you can use the help command:
mkv-cli --help
make
make install
or
go install github.com/davlgd/mkv-cli/
make clean
or
make uninstall
This project is licensed under the MIT License - see the LICENSE file for details.