{"id":19388733,"url":"https://github.com/eoinkelly/memc","last_synced_at":"2026-07-11T23:30:17.668Z","repository":{"id":145655834,"uuid":"298942009","full_name":"eoinkelly/memc","owner":"eoinkelly","description":"A minimal Memcached CLI for scripting and debugging","archived":false,"fork":false,"pushed_at":"2020-10-03T00:02:23.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-07T08:48:42.316Z","etag":null,"topics":["cli","client","memcache","memcached","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eoinkelly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-27T03:02:20.000Z","updated_at":"2023-02-13T18:57:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"32b9c931-e8a3-4f6f-9d01-47c1609ef681","html_url":"https://github.com/eoinkelly/memc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoinkelly%2Fmemc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoinkelly%2Fmemc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoinkelly%2Fmemc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eoinkelly%2Fmemc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eoinkelly","download_url":"https://codeload.github.com/eoinkelly/memc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240549434,"owners_count":19819131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","client","memcache","memcached","ruby"],"created_at":"2024-11-10T10:13:35.068Z","updated_at":"2026-07-11T23:30:17.637Z","avatar_url":"https://github.com/eoinkelly.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# memc : A minimal Memcached CLI for scripting and debugging\n\nA memcached CLI for developers trying to debug caching issues.\n\n![CI](https://github.com/eoinkelly/memc/workflows/CI/badge.svg)\n\n## Overview\n\n* A single Ruby script.\n* Uses Ruby core \u0026 standard library only - no gems required!\n* Designed to be easy to \"install\" (via `curl`) onto whatever server/container can reach the memcached server you care about.\n* Runs under Ruby 2.0.0 or later so should run on old Linux distros\n* Designed to lean on, and play nicely with standard unix tools e.g. `memc` does not implement filtering because `grep`/`sed`/`awk` already provide that.\n* MIT licensed\n\n## Installation\n\n`memc` is designed to be easy to install for \"casual\" use e.g. you need it in your VM/container to debug some issues but you don't want the hassle of installing it \"properly\". Of course, you are welcome to install it \"properly\" if you wish :smile:\n\n```bash\n$ cd path/to/where/you/want/to/put/this\n$ curl -O https://raw.githubusercontent.com/eoinkelly/memc/main/memc\n$ chmod u+x ./memc\n$ ./memc\n```\n\n## Usage\n\n```plain\nmemc SERVER_HOST:SERVER_PORT help        # show help\nmemc SERVER_HOST:SERVER_PORT ls          # list all keys\nmemc SERVER_HOST:SERVER_PORT ls-l        # list all keys and their sizes (in bytes)\nmemc SERVER_HOST:SERVER_PORT get KEYNAME # get the value associated with KEYNAME\nmemc SERVER_HOST:SERVER_PORT stats       # show human readable stats\nmemc SERVER_HOST:SERVER_PORT all-stats   # show all stats (raw format)\n```\n\n## Examples\n\n```bash\n# See human readable stats about the server\n$ memc localhost:11211 stats\n\n# See a list of all keys on the server\n$ memc localhost:11211 ls\n\n# Find all keys which contain 'aaa' and do not contain 'bbb'\n$ memc localhost:11211 ls | grep \"aaa\" | grep -v \"bbb\"\n\n# List key names and their size in bytes (separated by whitespace)\n$ memc localhost:11211 ls-l\n\n# show 10 largest keys\n$ memc localhost:11211 ls-l | sort -n -k 2,2 | tail\n\n# show 10 smallest keys\n$ memc localhost:11211 ls-l | sort -n -k 2,2 | head\n\n# Get the value associated with a key\n$ memc localhost:11211 get some-key-name\n\n# Save the value associated with a key into the 'output.txt' file\n$ memc localhost:11211 get some-key-name \u003e output.txt\n```\n\n## Alternatives\n\nMemcached has client libraries for almost every programming stack but not many clients designed for use on the command line. I was able to find the following:\n\n* [memcached-cli](https://www.npmjs.com/package/memcached-cli)\n    * Interactive use only\n    * Written in JS, install via `npm`\n    * Has more features than this script\n* [memclient](https://github.com/jorisroovers/memclient)\n    * Written in Go\n    * Install binary via `curl`/`wget`\n    * Has more features than this script\n    * As of 2020-10-03 it doesn't seem to be under active development/maintenance\n\nThis script is functional and meets my needs but you may prefer to use one of those, especially if your environments don't already have Ruby installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoinkelly%2Fmemc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feoinkelly%2Fmemc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoinkelly%2Fmemc/lists"}