Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions catalogue/apps/io.pilot.redis/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"schema_version": 1,
"id": "io.pilot.redis",
"display_name": "Redis",
"tagline": "Run Redis from an agent — start a local in-memory store and run any command with redis-cli",
"description_md": "# Redis (server + redis-cli) — native CLI for agents\n\nThis app installs the official **Redis 8.6.2** server and client on the host and fronts them as\ntyped methods. The bundle is a relocatable build of Redis 8.6.2 (from conda-forge, AGPL-3.0)\ncarrying `redis-server`, `redis-cli`, `redis-benchmark`, `redis-check-rdb`, `redis-check-aof`, and\n`redis-sentinel`; every binary is sha-pinned and staged at install, and a tiny `redis` dispatcher routes\neach method to the right tool. Binaries are fetched from the Pilot artifact registry on **macOS and Linux**\n(arm64 + amd64).\n\nRedis is an **in-memory data-structure store** — strings, hashes, lists, sets, sorted sets, streams, plus\npub/sub and transactions. There is no cluster to provision: an agent starts a throwaway local server and\nuses it as a cache, a fast key-value DB, or a coordination/queue primitive.\n\n## Run a Redis locally — the usual flow\n\n1. **Start:** `redis.start` `{ \"port\": \"6399\", \"dir\": \"/tmp\" }` — boots a daemonized server on\n `127.0.0.1:6399`, with pidfile/logfile/RDB under `dir`.\n2. **Health:** `redis.ping` `{ \"port\": \"6399\" }` → `PONG`.\n3. **Use it:** `redis.set` / `redis.get`, `redis.info`, `redis.dbsize`, or **any** command via\n `redis.exec` `{ \"args\": [\"redis-cli\",\"-p\",\"6399\",\"ZADD\",\"board\",\"100\",\"alice\"] }`.\n4. **Stop:** `redis.stop` `{ \"port\": \"6399\" }`.\n\n## Methods\n\n- `redis.start` / `redis.stop` — local server lifecycle (daemonized; per-port pidfile/logfile).\n- `redis.ping` — liveness (PONG). `redis.info` — full server INFO. `redis.dbsize` — key count.\n- `redis.set` / `redis.get` — string get/set convenience.\n- `redis.exec` — run any tool with a verbatim argv (+ optional stdin) — every Redis command, pipelined\n batches, benchmarks, RDB/AOF checks, sentinel.\n- `redis.cli_help` — the complete `redis-cli --help`. `redis.version` — the delivered version.\n `redis.help` — the self-describing method list.\n\n## Configuration\n\n- **`port`** — TCP port for the local server (convention `6399`). Bound to `127.0.0.1`.\n- **`dir`** — an existing writable directory for the pidfile, logfile, and RDB snapshot; pass `/tmp` for a\n throwaway server, or a path you control for persistence (the RDB lives at `\u003cdir\u003e/dump.rdb`).\n- **Persistence** — `redis.stop` does `SHUTDOWN NOSAVE`; run `redis.exec` with `SAVE`/`BGSAVE` first if you\n need the dataset on disk. Any redis.conf directive is reachable as a `--flag` via\n `redis.exec` (`redis-server --port ... --maxmemory 256mb --maxmemory-policy allkeys-lru ...`).\n- **Auth** — local servers are open by default; set `--requirepass` (via `redis.exec` on start) and pass the\n password through the `REDISCLI_AUTH` env var (forwarded to the child) or `-a` on `redis.exec`.\n\n## Good to know\n\n- Output returns verbatim where it is already clean; on a non-zero exit the reply is `{stdout, stderr, exit}`.\n- Free and open source under the **AGPL-3.0** license (Redis 8.x). Repackaged unmodified from conda-forge.\n\n## redis-cli / redis-server help\n```\nRedis CLI help — redis-cli and redis-server\n===========================================\n\nRedis is an in-memory data-structure store (cache, database, message broker).\nThis app fronts the Redis server + redis-cli as agent methods: start a local\nserver, then SET/GET/PING/INFO or run any command via redis.exec.\n\n------------------------------------------------------------------------------\nredis-cli --help\n------------------------------------------------------------------------------\nredis-cli 8.6.2\n\nUsage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]\n -h \u003chostname\u003e Server hostname (default: 127.0.0.1).\n -p \u003cport\u003e Server port (default: 6379).\n -t \u003ctimeout\u003e Server connection timeout in seconds (decimals allowed).\n Default timeout is 0, meaning no limit, depending on the OS.\n -s \u003csocket\u003e Server socket (overrides hostname and port).\n -a \u003cpassword\u003e Password to use when connecting to the server.\n You can also use the REDISCLI_AUTH environment\n variable to pass this password more safely\n (if both are used, this argument takes precedence).\n --user \u003cusername\u003e Used to send ACL style 'AUTH username pass'. Needs -a.\n --pass \u003cpassword\u003e Alias of -a for consistency with the new --user option.\n --askpass Force user to input password with mask from STDIN.\n If this argument is used, '-a' and REDISCLI_AUTH\n environment variable will be ignored.\n -u \u003curi\u003e Server URI on format redis://user:password@host:port/dbnum\n User, password and dbnum are optional. For authentication\n without a username, use username 'default'. For TLS, use\n the scheme 'rediss'.\n -r \u003crepeat\u003e Execute specified command N times.\n -i \u003cinterval\u003e When -r is used, waits \u003cinterval\u003e seconds per command.\n It is possible to specify sub-second times like -i 0.1.\n This interval is also used in --scan and --stat per cycle.\n and in --bigkeys, --memkeys, --keystats, and --hotkeys per 100 cycles.\n -n \u003cdb\u003e Database number.\n --name \u003cname\u003e Set the client name.\n -2 Start session in RESP2 protocol mode.\n -3 Start session in RESP3 protocol mode.\n -x Read last argument from STDIN (see example below).\n -X Read \u003ctag\u003e argument from STDIN (see example below).\n -d \u003cdelimiter\u003e Delimiter between response bulks for raw formatting (default: \\n).\n -D \u003cdelimiter\u003e Delimiter between responses for raw formatting (default: \\n).\n -c Enable cluster mode (follow -ASK and -MOVED redirections).\n -e Return exit error code when command execution fails.\n -4 Prefer IPv4 over IPv6 on DNS lookup.\n -6 Prefer IPv6 over IPv4 on DNS lookup.\n --tls Establish a secure TLS connection.\n --sni \u003chost\u003e Server name indication for TLS.\n --cacert \u003cfile\u003e CA Certificate file to verify with.\n --cacertdir \u003cdir\u003e Directory where trusted CA certificates are stored.\n If neither cacert nor cacertdir are specified, the default\n system-wide trusted root certs configuration will apply.\n --insecure Allow insecure TLS connection by skipping cert validation.\n --cert \u003cfile\u003e Client certificate to authenticate with.\n --key \u003cfile\u003e Private key file to authenticate with.\n --tls-ciphers \u003clist\u003e Sets the list of preferred ciphers (TLSv1.2 and below)\n in order of preference from highest to lowest separated by colon (\":\").\n See the ciphers(1ssl) manpage for more information about the syntax of this string.\n --tls-ciphersuites \u003clist\u003e Sets the list of preferred ciphersuites (TLSv1.3)\n in order of preference from highest to lowest separated by colon (\":\").\n See the ciphers(1ssl) manpage for more information about the syntax of this string,\n and specifically for TLSv1.3 ciphersuites.\n --raw Use raw formatting for replies (default when STDOUT is\n not a tty).\n --no-raw Force formatted output even when STDOUT is not a tty.\n --quoted-input Force input to be handled as quoted strings.\n --csv Output in CSV format.\n --json Output in JSON format (default RESP3, use -2 if you want to use with RESP2).\n --quoted-json Same as --json, but produce ASCII-safe quoted strings, not Unicode.\n --show-pushes \u003cyn\u003e Whether to print RESP3 PUSH messages. Enabled by default when\n STDOUT is a tty but can be overridden with --show-pushes no.\n --stat Print rolling stats about server: mem, clients, ...\n --latency Enter a special mode continuously sampling latency.\n If you use this mode in an interactive session it runs\n forever displaying real-time stats. Otherwise if --raw or\n --csv is specified, or if you redirect the output to a non\n TTY, it samples the latency for 1 second (you can use\n -i to change the interval), then produces a single output\n and exits.\n --latency-history Like --latency but tracking latency changes over time.\n Default time interval is 15 sec. Change it using -i.\n --latency-dist Shows latency as a spectrum, requires xterm 256 colors.\n Default time interval is 1 sec. Change it using -i.\n --vset-recall \u003ckey\u003e Enable VSIM recall test mode for the specified key\n (that must be a vector set). Random vectors are created\n mixing components from other elements. A VSIM is then\n executed and checked against ground truth.\n --vset-recall-count \u003ccount\u003e How many top elements to fetch per query.\n --vset-recall-ef \u003cef\u003e HSNW EF (search effort) to use. Default 500.\n --vset-recall-ele \u003ccount\u003e Number of elements used to compose query vectors\n Default 1.\n --lru-test \u003ckeys\u003e Simulate a cache workload with an 80-20 distribution.\n --replica Simulate a replica showing commands received from the master.\n --rdb \u003cfilename\u003e Transfer an RDB dump from remote server to local file.\n Use filename of \"-\" to write to stdout.\n --functions-rdb \u003cfilename\u003e Like --rdb but only get the functions (not the keys)\n when getting the RDB dump file.\n --pipe Transfer raw Redis protocol from stdin to server.\n --pipe-timeout \u003cn\u003e In --pipe mode, abort with error if after sending all data.\n no reply is received within \u003cn\u003e seconds.\n Default timeout: 30. Use 0 to wait forever.\n --bigkeys Sample Redis keys looking for keys with many elements (complexity).\n --memkeys Sample Redis keys looking for keys consuming a lot of memory.\n --memkeys-samples \u003cn\u003e Sample Redis keys looking for keys consuming a lot of memory.\n And define number of key elements to sample\n --keystats Sample Redis keys looking for keys memory size and length (combine bigkeys and memkeys).\n --keystats-samples \u003cn\u003e Sample Redis keys looking for keys memory size and length.\n And define number of key elements to sample (only for memory usage).\n --cursor \u003cn\u003e Start the scan at the cursor \u003cn\u003e (usually after a Ctrl-C).\n Optionally used with --keystats and --keystats-samples.\n --top \u003cn\u003e To display \u003cn\u003e top key sizes (default: 10).\n Optionally used with --keystats and --keystats-samples.\n --hotkeys Sample Redis keys looking for hot keys.\n only works when maxmemory-policy is *lfu.\n --scan List all keys using the SCAN command.\n --pattern \u003cpat\u003e Keys pattern when using the --scan, --bigkeys, --memkeys,\n --keystats or --hotkeys options (default: *).\n --count \u003ccount\u003e Count option when using the --scan, --bigkeys, --memkeys,\n --keystats or --hotkeys (default: 10).\n --quoted-pattern \u003cpat\u003e Same as --pattern, but the specified string can be\n quoted, in order to pass an otherwise non binary-safe string.\n --intrinsic-latency \u003csec\u003e Run a test to measure intrinsic system latency.\n The test will run for the specified amount of seconds.\n --eval \u003cfile\u003e Send an EVAL command using the Lua script at \u003cfile\u003e.\n --ldb Used with --eval enable the Redis Lua debugger.\n --ldb-sync-mode Like --ldb but uses the synchronous Lua debugger, in\n this mode the server is blocked and script changes are\n not rolled back from the server memory.\n --cluster \u003ccommand\u003e [args...] [opts...]\n Cluster Manager command and arguments (see below).\n --verbose Verbose mode.\n --no-auth-warning Don't show warning message when using password on command\n line interface.\n --help Output this help and exit.\n --version Output version and exit.\n\nCluster Manager Commands:\n Use --cluster help to list all available cluster manager commands.\n\nExamples:\n redis-cli -u redis://default:PASSWORD@localhost:6379/0\n cat /etc/passwd | redis-cli -x set mypasswd\n redis-cli -D \"\" --raw dump key \u003e key.dump \u0026\u0026 redis-cli -X dump_tag restore key2 0 dump_tag replace \u003c key.dump\n redis-cli -r 100 lpush mylist x\n redis-cli -r 100 -i 1 info | grep used_memory_human:\n redis-cli --quoted-input set '\"null-\\x00-separated\"' value\n redis-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3\n redis-cli --scan --pattern '*:12345*'\n redis-cli --scan --pattern '*:12345*' --count 100\n\n (Note: when using --eval the comma separates KEYS[] from ARGV[] items)\n\nWhen no command is given, redis-cli starts in interactive mode.\nType \"help\" in interactive mode for information on available commands\nand settings.\n\n\n------------------------------------------------------------------------------\nredis-server --help\n------------------------------------------------------------------------------\nUsage: ./redis-server [/path/to/redis.conf] [options] [-]\n ./redis-server - (read config from stdin)\n ./redis-server -v or --version\n ./redis-server -h or --help\n ./redis-server --test-memory \u003cmegabytes\u003e\n ./redis-server --check-system\n\nExamples:\n ./redis-server (run the server with default conf)\n echo 'maxmemory 128mb' | ./redis-server -\n ./redis-server /etc/redis/6379.conf\n ./redis-server --port 7777\n ./redis-server --port 7777 --replicaof 127.0.0.1 8888\n ./redis-server /etc/myredis.conf --loglevel verbose -\n ./redis-server /etc/myredis.conf --loglevel verbose\n\nSentinel mode:\n ./redis-server /etc/sentinel.conf --sentinel\n```\n",
"vendor": {
"name": "Pilot Protocol",
"url": "https://pilotprotocol.network",
"contact": "apps@pilotprotocol.network",
"publisher_pubkey": "ed25519:QXvscnyXJ5L/Bmy7oCo5dPC1HrEOGa7WFWBfH5ktejM="
},
"homepage": "https://redis.io",
"source_url": "https://github.com/redis/redis",
"license": "AGPL-3.0",
"categories": [
"database",
"cache",
"data",
"kv"
],
"keywords": [
"redis",
"cache",
"key-value",
"in-memory",
"database",
"kv",
"redis-cli",
"pubsub",
"streams",
"nosql"
],
"size": {
"bundle_bytes": 5354616,
"installed_bytes": 9625086
},
"compat": {
"min_pilot_version": "1.0.0",
"runtimes": [
"go"
]
},
"methods": [
{
"name": "redis.start",
"summary": "Start a local Redis server, daemonized, listening on 127.0.0.1:`port`. Writes its pidfile, logfile, and RDB snapshot under `dir`; returns once the server has forked into the background. After this, use redis.ping/redis.set/redis.get/redis.exec against the same `port`. This is `redis-server --port \u003cport\u003e --dir \u003cdir\u003e --daemonize yes --pidfile \u003cdir\u003e/redis-\u003cport\u003e.pid --logfile \u003cdir\u003e/redis-\u003cport\u003e.log`."
},
{
"name": "redis.stop",
"summary": "Stop the local server on 127.0.0.1:`port` (no final save — use redis.exec with SAVE/BGSAVE first if you need to persist). This is `redis-cli -p \u003cport\u003e SHUTDOWN NOSAVE`."
},
{
"name": "redis.ping",
"summary": "Liveness check: PING the server on 127.0.0.1:`port` (returns PONG). This is `redis-cli -p \u003cport\u003e PING`."
},
{
"name": "redis.set",
"summary": "Set string `key` to `value`. This is `redis-cli -p \u003cport\u003e SET \u003ckey\u003e \u003cvalue\u003e`."
},
{
"name": "redis.get",
"summary": "Get the value of string `key` (empty if missing). This is `redis-cli -p \u003cport\u003e GET \u003ckey\u003e`."
},
{
"name": "redis.info",
"summary": "Return the server's INFO (version, memory, clients, persistence, stats, replication, keyspace) as plain text — a full health/inventory snapshot. This is `redis-cli -p \u003cport\u003e INFO`."
},
{
"name": "redis.dbsize",
"summary": "Number of keys in the current database. This is `redis-cli -p \u003cport\u003e DBSIZE`."
},
{
"name": "redis.exec",
"summary": "Run any bundled Redis tool with a verbatim argv — the full surface beyond the curated methods. Payload is {\"args\":[\u003ctool\u003e, ...]} where the first element is the tool (redis-cli, redis-server, redis-benchmark, redis-check-rdb, redis-check-aof, redis-sentinel) and the rest are its args; optional {\"stdin\":\"...\"} is piped to it. This is how you run ANY Redis command: {\"args\":[\"redis-cli\",\"-p\",\"6399\",\"LPUSH\",\"mylist\",\"a\",\"b\",\"c\"]}, {\"args\":[\"redis-cli\",\"-p\",\"6399\",\"-n\",\"1\",\"HSET\",\"h\",\"f\",\"v\"]}, a pipelined script via stdin {\"args\":[\"redis-cli\",\"-p\",\"6399\"],\"stdin\":\"SET a 1\\nINCR a\\nGET a\"}, or a benchmark {\"args\":[\"redis-benchmark\",\"-p\",\"6399\",\"-n\",\"1000\",\"-q\"]}. The REDISCLI_AUTH env var is passed through for password auth."
},
{
"name": "redis.cli_help",
"summary": "Return the complete `redis-cli --help` (every option of the Redis command-line client) straight from the delivered binary — the reference for what redis.exec accepts. This is `redis-cli --help`."
},
{
"name": "redis.version",
"summary": "Print the delivered client version, e.g. \"redis-cli 8.6.2\". Needs no server. This is `redis-cli --version`."
},
{
"name": "redis.help",
"summary": "Discovery: every method with params, kind, and latency class."
}
],
"changelog": [
{
"version": "8.6.2",
"notes": [
"Released v8.6.2"
]
}
],
"links": [
{
"label": "Source",
"url": "https://github.com/redis/redis"
},
{
"label": "Website",
"url": "https://redis.io"
}
]
}
Loading
Loading