Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 1.38 KB

README.md

File metadata and controls

83 lines (55 loc) · 1.38 KB

Clever Cloud's Materia KV Go CLI

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.

How to use it

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

Build

make

Build & Install

make install

or

go install github.com/davlgd/mkv-cli/

Remove

make clean

or

make uninstall

License

This project is licensed under the MIT License - see the LICENSE file for details.