CLI reference

Reference for the RDI CLI commands

redis-di is the command line tool that manages Redis Data Integration (RDI). It is a thin client over the RDI REST API, so it works the same way for all installation types: VM, Kubernetes, and Redis Cloud. Use it to deploy pipelines, manage secrets, inspect status and metrics, and read rejected records.

Connecting to the API

Most commands connect to the RDI API, which you specify with the --api-url option (or the RDI_API_URL environment variable). Because the API is served over HTTPS, you can also supply --cacert to trust a private or self-signed certificate, or --insecure to skip TLS verification.

The CLI supports three authentication modes, selected by the credentials you provide:

  • User authentication (JWT): when you set a --user, the CLI logs in with that user and a password from --password, the RDI_PASSWORD environment variable, or an interactive prompt. This is the usual mode for VM and Kubernetes installations.
  • Redis Cloud authentication: when you set an --account-key, the CLI authenticates to the Redis Cloud API gateway with that account key and a user key from --user-key, the RDI_USER_KEY environment variable, or an interactive prompt. This is the mode for RDI running in Redis Cloud.
  • No authentication: when you set neither a user nor an account key, the CLI connects without authenticating, which is the mode to use when authentication is disabled in the API.

Setting both --user and --account-key is an error, as is setting both --cacert and --insecure. Passwords and user keys are secrets and are never stored on disk.

Contexts

Instead of passing the connection options on every command, you can save them in a context. Contexts are stored in a ~/.redis-di file that holds a map of named contexts and the active one, similar to a kubeconfig file. Each context sets an api-url, an optional user or account-key, and either a cacert or insecure: true. Secrets (the password and user key) are never stored, so you still supply them per session.

# ~/.redis-di
current-context: prod
contexts:
  prod:
    api-url: https://rdi.example.com
    user: default
    cacert: /etc/rdi/ingress-ca.crt
  dev:
    api-url: https://localhost:8443
    insecure: true

Use the set-context and use-context commands to create and select contexts rather than editing the file by hand.

Commands

Pipeline-scoped commands take the pipeline name as an optional positional argument that defaults to default, for example redis-di start [pipeline]. Sub-resource commands (for a secret, DLQ, or job) take their own key or name as the positional argument and target the pipeline with the -p / --pipeline option, which also defaults to default.

The commands group as follows:

On VM installations, the CLI also exposes the configure-rdi and dump-support-package administration commands.

See the redis-di page for the global options that apply to every command.

Output formats

The list and get commands print an aligned, column-based table by default. Pass -o / --output with json or yaml to emit the underlying data instead, which is useful for scripting and for tools such as jq. The describe commands always print a human-readable, sectioned layout.

RATE THIS PAGE
Back to top ↑