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
- Host: GitHub
- URL: https://github.com/pd4d10/memcached-cli
- Owner: pd4d10
- License: mit
- Created: 2016-11-29T16:29:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-08-17T09:27:08.000Z (almost 7 years ago)
- Last Synced: 2025-03-20T00:11:22.583Z (over 1 year ago)
- Topics: cli, memcached, sasl-support
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 16
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# memcached-cli
[](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