Redis
pilotctl appstore install io.pilot.redis About Redis
This app installs the official Redis 8.6.2 server and client on the host and fronts them as typed methods. The bundle is a relocatable build of Redis 8.6.2 (from conda-forge, AGPL-3.0) carrying redis-server, redis-cli, redis-benchmark, redis-check-rdb, redis-check-aof, and redis-sentinel; every binary is sha-pinned and staged at install, and a tiny redis dispatcher routes each method to the right tool. Binaries are fetched from the Pilot artifact registry on macOS and Linux (arm64 + amd64).
Redis is an in-memory data-structure store — strings, hashes, lists, sets, sorted sets, streams, plus pub/sub and transactions. There is no cluster to provision: an agent starts a throwaway local server and uses it as a cache, a fast key-value DB, or a coordination/queue primitive.
Run a Redis locally — the usual flow
1. Start: redis.start { "port": "6399", "dir": "/tmp" } — boots a daemonized server on 127.0.0.1:6399, with pidfile/logfile/RDB under dir. 2. Health: redis.ping { "port": "6399" } → PONG. 3. Use it: redis.set / redis.get, redis.info, redis.dbsize, or any command via redis.exec { "args": ["redis-cli","-p","6399","ZADD","board","100","alice"] }. 4. Stop: redis.stop { "port": "6399" }.
Methods
- redis.start / redis.stop — local server lifecycle (daemonized; per-port pidfile/logfile). - redis.ping — liveness (PONG). redis.info — full server INFO. redis.dbsize — key count. - redis.set / redis.get — string get/set convenience. - redis.exec — run any tool with a verbatim argv (+ optional stdin) — every Redis command, pipelined batches, benchmarks, RDB/AOF checks, sentinel. - redis.cli_help — the complete redis-cli --help. redis.version — the delivered version. redis.help — the self-describing method list.
Configuration
- port — TCP port for the local server (convention 6399). Bound to 127.0.0.1. - dir — an existing writable directory for the pidfile, logfile, and RDB snapshot; pass /tmp for a throwaway server, or a path you control for persistence (the RDB lives at <dir>/dump.rdb). - Persistence — redis.stop does SHUTDOWN NOSAVE; run redis.exec with SAVE/BGSAVE first if you need the dataset on disk. Any redis.conf directive is reachable as a --flag via redis.exec (redis-server --port ... --maxmemory 256mb --maxmemory-policy allkeys-lru ...). - Auth — local servers are open by default; set --requirepass (via redis.exec on start) and pass the password through the REDISCLI_AUTH env var (forwarded to the child) or -a on redis.exec.
Good to know
- Output returns verbatim where it is already clean; on a non-zero exit the reply is
{stdout, stderr, exit}. - Free and open source under the AGPL-3.0 license (Redis 8.x). Repackaged unmodified from conda-forge.
## redis-cli / redis-server help ``` Redis CLI help — redis-cli and redis-server ===========================================
Redis is an in-memory data-structure store (cache, database, message broker). This app fronts the Redis server + redis-cli as agent methods: start a local server, then SET/GET/PING/INFO or run any command via redis.exec.
------------------------------------------------------------------------------ redis-cli --help ------------------------------------------------------------------------------ redis-cli 8.6.2
Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]] -h <hostname> Server hostname (default: 127.0.0.1). -p <port> Server port (default: 6379). -t <timeout> Server connection timeout in seconds (decimals allowed). Default timeout is 0, meaning no limit, depending on the OS. -s <socket> Server socket (overrides hostname and port). -a <password> Password to use when connecting to the server. You can also use the REDISCLI_AUTH environment variable to pass this password more safely (if both are used, this argument takes precedence). --user <username> Used to send ACL style 'AUTH username pass'. Needs -a. --pass <password> Alias of -a for consistency with the new --user option. --askpass Force user to input password with mask from STDIN. If this argument is used, '-a' and REDISCLI_AUTH environment variable will be ignored. -u <uri> Server URI on format redis://user:password@host:port/dbnum User, password and dbnum are optional. For authentication without a username, use username 'default'. For TLS, use the scheme 'rediss'. -r <repeat> Execute specified command N times. -i <interval> When -r is used, waits <interval> seconds per command. It is possible to specify sub-second times like -i 0.1. This interval is also used in --scan and --stat per cycle. and in --bigkeys, --memkeys, --keystats, and --hotkeys per 100 cycles. -n <db> Database number. --name <name> Set the client name. -2 Start session in RESP2 protocol mode. -3 Start session in RESP3 protocol mode. -x Read last argument from STDIN (see example below). -X Read <tag> argument from STDIN (see example below). -d <delimiter> Delimiter between response bulks for raw formatting (default: \n). -D <delimiter> Delimiter between responses for raw formatting (default: \n). -c Enable cluster mode (follow -ASK and -MOVED redirections). -e Return exit error code when command execution fails. -4 Prefer IPv4 over IPv6 on DNS lookup. -6 Prefer IPv6 over IPv4 on DNS lookup. --tls Establish a secure TLS connection. --sni <host> Server name indication for TLS. --cacert <file> CA Certificate file to verify with. --cacertdir <dir> Directory where trusted CA certificates are stored. If neither cacert nor cacertdir are specified, the default system-wide trusted root certs configuration will apply. --insecure Allow insecure TLS connection by skipping cert validation. --cert <file> Client certificate to authenticate with. --key <file> Private key file to authenticate with. --tls-ciphers <list> Sets the list of preferred ciphers (TLSv1.2 and below) in order of preference from highest to lowest separated by colon (":"). See the ciphers(1ssl) manpage for more information about the syntax of this string. --tls-ciphersuites <list> Sets the list of preferred ciphersuites (TLSv1.3) in order of preference from highest to lowest separated by colon (":"). See the ciphers(1ssl) manpage for more information about the syntax of this string, and specifically for TLSv1.3 ciphersuites. --raw Use raw formatting for replies (default when STDOUT is not a tty). --no-raw Force formatted output even when STDOUT is not a tty. --quoted-input Force input to be handled as quoted strings. --csv Output in CSV format. --json Output in JSON format (default RESP3, use -2 if you want to use with RESP2). --quoted-json Same as --json, but produce ASCII-safe quoted strings, not Unicode. --show-pushes <yn> Whether to print RESP3 PUSH messages. Enabled by default when STDOUT is a tty but can be overridden with --show-pushes no. --stat Print rolling stats about server: mem, clients, ... --latency Enter a special mode continuously sampling latency. If you use this mode in an interactive session it runs forever displaying real-time stats. Otherwise if --raw or --csv is specified, or if you redirect the output to a non TTY, it samples the latency for 1 second (you can use -i to change the interval), then produces a single output and exits. --latency-history Like --latency but tracking latency changes over time. Default time interval is 15 sec. Change it using -i. --latency-dist Shows latency as a spectrum, requires xterm 256 colors. Default time interval is 1 sec. Change it using -i. --vset-recall <key> Enable VSIM recall test mode for the specified key (that must be a vector set). Random vectors are created mixing components from other elements. A VSIM is then executed and checked against ground truth. --vset-recall-count <count> How many top elements to fetch per query. --vset-recall-ef <ef> HSNW EF (search effort) to use. Default 500. --vset-recall-ele <count> Number of elements used to compose query vectors Default 1. --lru-test <keys> Simulate a cache workload with an 80-20 distribution. --replica Simulate a replica showing commands received from the master. --rdb <filename> Transfer an RDB dump from remote server to local file. Use filename of "-" to write to stdout. --functions-rdb <filename> Like --rdb but only get the functions (not the keys) when getting the RDB dump file. --pipe Transfer raw Redis protocol from stdin to server. --pipe-timeout <n> In --pipe mode, abort with error if after sending all data. no reply is received within <n> seconds. Default timeout: 30. Use 0 to wait forever. --bigkeys Sample Redis keys looking for keys with many elements (complexity). --memkeys Sample Redis keys looking for keys consuming a lot of memory. --memkeys-samples <n> Sample Redis keys looking for keys consuming a lot of memory. And define number of key elements to sample --keystats Sample Redis keys looking for keys memory size and length (combine bigkeys and memkeys). --keystats-samples <n> Sample Redis keys looking for keys memory size and length. And define number of key elements to sample (only for memory usage). --cursor <n> Start the scan at the cursor <n> (usually after a Ctrl-C). Optionally used with --keystats and --keystats-samples. --top <n> To display <n> top key sizes (default: 10). Optionally used with --keystats and --keystats-samples. --hotkeys Sample Redis keys looking for hot keys. only works when maxmemory-policy is *lfu. --scan List all keys using the SCAN command. --pattern <pat> Keys pattern when using the --scan, --bigkeys, --memkeys, --keystats or --hotkeys options (default: *). --count <count> Count option when using the --scan, --bigkeys, --memkeys, --keystats or --hotkeys (default: 10). --quoted-pattern <pat> Same as --pattern, but the specified string can be quoted, in order to pass an otherwise non binary-safe string. --intrinsic-latency <sec> Run a test to measure intrinsic system latency. The test will run for the specified amount of seconds. --eval <file> Send an EVAL command using the Lua script at <file>. --ldb Used with --eval enable the Redis Lua debugger. --ldb-sync-mode Like --ldb but uses the synchronous Lua debugger, in this mode the server is blocked and script changes are not rolled back from the server memory. --cluster <command> [args...] [opts...] Cluster Manager command and arguments (see below). --verbose Verbose mode. --no-auth-warning Don't show warning message when using password on command line interface. --help Output this help and exit. --version Output version and exit.
Cluster Manager Commands: Use --cluster help to list all available cluster manager commands.
Examples: redis-cli -u redis://default:PASSWORD@localhost:6379/0 cat /etc/passwd | redis-cli -x set mypasswd redis-cli -D "" --raw dump key > key.dump && redis-cli -X dump_tag restore key2 0 dump_tag replace < key.dump redis-cli -r 100 lpush mylist x redis-cli -r 100 -i 1 info | grep used_memory_human: redis-cli --quoted-input set '"null-\x00-separated"' value redis-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3 redis-cli --scan --pattern '*:12345*' redis-cli --scan --pattern '*:12345*' --count 100
(Note: when using --eval the comma separates KEYS[] from ARGV[] items)
When no command is given, redis-cli starts in interactive mode. Type "help" in interactive mode for information on available commands and settings.
------------------------------------------------------------------------------ redis-server --help ------------------------------------------------------------------------------ Usage: ./redis-server [/path/to/redis.conf] [options] [-] ./redis-server - (read config from stdin) ./redis-server -v or --version ./redis-server -h or --help ./redis-server --test-memory <megabytes> ./redis-server --check-system
Examples: ./redis-server (run the server with default conf) echo 'maxmemory 128mb' | ./redis-server - ./redis-server /etc/redis/6379.conf ./redis-server --port 7777 ./redis-server --port 7777 --replicaof 127.0.0.1 8888 ./redis-server /etc/myredis.conf --loglevel verbose - ./redis-server /etc/myredis.conf --loglevel verbose
Sentinel mode: ./redis-server /etc/sentinel.conf --sentinel ```
Methods · 11
redis.start redis.stop redis.ping redis.set redis.get redis.info redis.dbsize redis.exec redis.cli_help redis.version redis.help What’s New
- Released v8.6.2