| Crates.io | redito |
| lib.rs | redito |
| version | 0.1.0 |
| created_at | 2025-11-05 03:34:35.8568+00 |
| updated_at | 2025-11-05 03:34:35.8568+00 |
| description | Redis Toolkit |
| homepage | |
| repository | https://github.com/felipou/redito |
| max_upload_size | |
| id | 1917370 |
| size | 86,202 |
redito is a command-line utility for working with Redis in a structured and
extensible way. It’s designed to support multiple Redis operations through modular
subcommands — starting with some tools for working with Redis Streams.
I frequently work with Redis streams, and Redis in general, and often wish I had some tools that could make my life easier here and there. Couple with a desired to code in Rust, and to get some experience maintaining a solid CLI tool, I decided to lay the foundation for an extensible tool that should be useful to me, and could be useful for others too.
REDITO_)/etc/redito.toml, ./.redito.toml, redito.toml, or local_config.toml)stream-tail — follow a stream like tail -fstream-copy — copy entries between Redis instancesYou can build from source:
cargo install --path .
Or:
cargo install redito
redito loads configuration in this order (later entries override earlier ones):
/etc/redito.toml./.redito.toml./redito.tomllocal_config.tomlREDITO_I intend to use this tool both as an everyday cli tool, and as an automation helper to be configured in cronjobs and such, which is why I'm putting some effort into it being configurable through config files, environment variables, and command-line arguments all at once.
[redis]
host = "localhost"
port = 6379
db = 0
tls = false
You can override any of these via CLI or environment variables. For example:
REDITO_REDIS__HOST=redis.example.com redito stream-tail --stream mystream
stream-tailTails a Redis Stream, continuously reading new entries (similar to tail -f).
redito --host localhost stream-tail --stream mystream
Options:
| Option | Description | Default |
|---|---|---|
--stream |
Stream name to read from | (required) |
--plaintext |
Print values as plain text | false |
--raw-key |
Specific field to print instead of full entry | None |
--group |
Consumer group name | None |
--consumer |
Consumer name within group | None |
--block-ms |
Milliseconds to block waiting for new messages | 5000 |
--count |
Number of entries to fetch per request | 1000 |
--start-id |
Stream ID to start reading from | $ |
--retry-when-empty |
Retry when no messages are found | false |
stream-copyCopies entries from a source Redis stream to a target Redis instance.
redito --host src.redis.local stream-copy --stream mystream \
--target-host dst.redis.local
Options:
| Option | Description | Default |
|---|---|---|
--stream |
Source stream name | (required) |
--target-host |
Target Redis hostname | (required) |
--target-port |
Target Redis port | 6379 |
--target-username |
Target Redis username | None |
--target-password |
Target Redis password | None |
--target-db |
Target Redis DB index | 0 |
--target-tls |
Use TLS for target connection | false |
--target-sentinel |
Use Redis Sentinel for target | false |
--target-sentinel-master |
Sentinel master name | None |
--group |
Source group name | None |
--consumer |
Source consumer name | None |
--block-ms |
Block duration while polling | 5000 |
--count |
Number of entries per fetch | 1000 |
--start-id |
Start ID in stream | $ |
--retry-when-empty |
Retry on empty reads | false |
redito recognizes any setting as an environment variable, using the prefix REDITO_.
Nested fields (like Redis connection options) use double underscores __.
Example:
export REDITO_REDIS__HOST=redis.example.com
export REDITO_REDIS__PASSWORD=secret
redito stream-tail --stream mystream
Dual-licensed under Apache 2.0 or MIT.