Skip to main content

Crate kevy_cli

Crate kevy_cli 

Source
Expand description

CLI-shaped Reply formatter for the kevy-cli REPL.

Only format_reply lives here — the protocol pieces (TCP connect, request loop) live in the kevy-resp-client crate so they’re reusable by integration tests / scripts / other tools. This file is the CLI-specific bit (how a redis-cli user expects bulk strings quoted, arrays numbered, nil shown as (nil)).

use kevy_cli::{DEFAULT_HOST, format_reply};
let mut client = kevy_resp_client::RespClient::connect(DEFAULT_HOST, port)?;
client.request_borrowed(&[b"RPUSH", b"langs", b"rust", b"zig"])?;
let reply = client.request_borrowed(&[b"LRANGE", b"langs", b"0", b"-1"])?;
assert_eq!(format_reply(&reply, 0), "1) \"rust\"\n2) \"zig\"");

Modules§

backfill_keys
backfill-keys — the union of every structure that can name an item.
backup
Backup / restore container support. See backup::pack and backup::unpack. kevy-cli backup / kevy-cli restore subcommands.
bulk
Prefix bulk ops + diagnostics (copy-prefix / delete-prefix / digest / diff / inspect). Prefix bulk ops + diagnostics: copy-prefix / delete-prefix (token-bucket rate limit, --dry-run), digest, diff, inspect.
doctor
doctor — every table’s VERIFY counters, turned into an exit code a cron can act on. doctor — run every table’s VERIFY and turn the counters into an exit code.
link
The connection a kevy-cli tool talks through.
lint
lint — the two questions worth asking about a shape, before and after the table exists.
migrate
Migration toolchain (export / import). See migrate::run_export and migrate::run_import. Migration toolchain: export / import.
rcli
kevy-cli [options] [command]: the redis-cli half of the binary.
shadow
shadow — run the old query and the new one side by side and report where they disagree, in membership AND in order.

Enums§

Reply
A parsed RESP reply (server → client) — the client-side counterpart of the crate’s encode_* functions (server-side encoders).

Constants§

DEFAULT_HOST
Where a subcommand connects when the caller says nothing. Shared rather than repeated: two copies of a default is a drift waiting to be reported as a bug.
DEFAULT_PORT
The port half of the same default.

Functions§

format_reply
Pretty-print a reply roughly the way redis-cli does. Arrays are numbered + indented; bulk strings are quoted; nil shows as (nil).