An open API service indexing awesome lists of open source software.

https://github.com/pd4d10/memcached-cli

A simple memcached CLI tool with SASL support
https://github.com/pd4d10/memcached-cli

cli memcached sasl-support

Last synced: about 1 year ago
JSON representation

A simple memcached CLI tool with SASL support

Awesome Lists containing this project

README

          

# memcached-cli

[![npm](https://img.shields.io/npm/v/memcached-cli.svg)](https://www.npmjs.com/package/memcached-cli)

A simple memcached CLI tool, with SASL supported. Built upon [`memjs`](https://github.com/alevy/memjs).

## Installation

```sh
npm install -g memcached-cli
```

You can also use `npx memcached-cli` to run it directly.

## Usage

Run

```sh
> memcached-cli host:port
```

to enter interactive shell. If `host` and `port` is not specified, `localhost:11211` will be used.

If you use SASL auth, run

```sh
> memcached-cli username:password@host:port
```

| Method | Description | Command |
| --------- | ----------------------------------------------- | -------------------------------------- |
| get | Get the value of a key | `> get ` |
| set | Set the value of a key, default expires(s) is 0 | `> set [expires]` |
| add | Set the value of a key, fail if key exists | `> add [expires]` |
| replace | Overwrite existing key, fail if key not exists | `> replace [expires]` |
| increment | Increment the value of a key by amount | `> increment [expires]` |
| decrement | Decrement the value of a key by amount | `> decrement [expires]` |
| delete | Delete a key | `> delete ` |
| flush | Flush all data | `> flush` |
| stats | Show statistics | `> stats` |

`memcached-cli` is built upon `memjs`. Visit [memjs documentation](https://memjs.netlify.com/) for more information.

## License

MIT