KEYDB-CLI(1)
π KEYDB-CLI π
okay so this is the manual page for keydb-cli β that's section 1 of the manual, the User commands girlies π
β and bestie, you're gonna eat this up.
β¨ NAME β¨
keydb-cli β the KeyDB client, aka your lil bestie that talks to the server π«Ά
πΈ SYNOPSIS πΈ
keydb-cli [ options ] [cmd [arg [arg ...]]]
π¦ DESCRIPTION π¦
okay so KeyDB?? it's an open source (BSD licensed π) in-memory data structure store β like, it does database, cache, and message broker duties all at once, main character energy fr fr. You can find it at https://docs.keydb.dev/ β¨
And keydb-cli? It's a command line client to keydb-server. That's the whole vibe. It's the little remote control for your server bestie π
π OPTIONS π
-hhostname β which server hostname we're pulling up to (default:127.0.0.1). Home sweet localhost π-pport β server port (default:6379).-ssocket β server socket. Heads up bestie: this one overrides hostname and port. It's giving "I'm the priority now" π-apassword β the password you use when connecting to the server π-rrepeat β run the specified command N times. Spam it, queen π£-iinterval β when-ris in play, it waits interval seconds per command. And yes, sub-second times are a thing β like-i 0.1. We love precision π«-ndb β database number.-xβ read the last argument from STDIN. Sneaky, lowkey iconic.-ddelimiter β multi-bulk delimiter in for raw formatting (default:0.-cβ enable cluster mode. It follows-ASKand-MOVEDredirections like the loyal bestie it is π§--rawβ use raw formatting for replies. (This is the default when STDOUT is not a tty.)--no-rawβ force formatted output even when STDOUT is not a tty. No raw here, we're being fancy β¨--csvβ output in CSV format.--statβ print rolling stats about the server: mem, clients, ...--latencyβ enter a special mode continuously sampling latency β±οΈ--latency-historyβ like--latencybut it tracks latency changes over time. Default time interval is15sec, and you change it using-i.--latency-distβ shows latency as a spectrum. Requires xterm 256 colors π Default time interval is1sec, change it using-i.--lru-testβ simulate a cache workload with an 80-20 distribution π--slaveβ simulate a slave, showing commands received from the master π--rdbfilename β transfer an RDB dump from a remote server to a local file π¦--pipeβ transfer raw KeyDB protocol from stdin to the server π°--pipe-timeoutn β in--pipemode, abort with error if, after sending all data, no reply is received within n seconds. Default timeout:30. Use0to wait forever β³--bigkeysβ sample KeyBD keys looking for big keys π--scanβ list all keys using theSCANcommand.--patternpat β useful with--scanto specify a SCAN pattern π―--intrinsic-latencysec β run a test to measure intrinsic system latency. The test runs for the specified amount of seconds.--evalfile β send anEVALcommand using the Lua script at file π§ββοΈ--ldbβ used with--eval, enables the KeyDB Lua debugger.--ldb-sync-modeβ like--ldbbut uses the synchronous Lua debugger. In this mode the server is blocked and script changes are are not rolled back from the server memory. > π¨ bestie, read that again β blocked server, no rollback. Be careful out here.--helpβ output this help and exit.--versionβ output version and exit.
π EXAMPLES π
cat /etc/passwd | keydb-cli -x set mypasswd
keydb-cli get mypasswd
keydb-cli -r 100 lpush mylist x
keydb-cli -r 100 -i 1 info | grep used_memory_human:
keydb-cli --eval myscript.lua key1 key2 , arg1 arg2 arg3
keydb-cli --scan --pattern '*:12345*'
look at that pipeline in the fourth one π the way it just works.
π BUGS π
Found a lil bug? Same, we're all just doing our best. Go here: https://docs.keydb.dev/ and https://github.com/JohnSully/KeyDB.git/issues π
π COPYRIGHT π
Copyright Β© 2006-2016 Salvatore Sanfilippo Copyright Β© 2019- John Sully
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Redis nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
that's the whole page bestie, no cap π and yeah, this came out under KeyDB, dated 2019, for KEYDB-CLI(1) β you're welcome, go slay πβ¨
π¦ where this page comes from
- epel 10: keydb 6.3.4-4.el10_0 Β· BSD-3-Clause AND BSD-2-Clause AND MIT
- epel 9: keydb 6.3.4-3.el9 Β· BSD-3-Clause AND BSD-2-Clause AND MIT
- fedora 43: keydb 6.3.4-6.fc43 Β· BSD-3-Clause AND BSD-2-Clause AND MIT
- fedora 44: keydb 6.3.4-7.fc44 Β· BSD-3-Clause AND BSD-2-Clause AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms