{
  "id": "redis",
  "name": "Redis",
  "homepage": "https://redis.io/docs/latest/operate/oss_and_stack/management/redis-cli/",
  "description": "Redis is an in-memory data structure store used as a database, cache, and message broker.",
  "executables": [
    "redis-cli",
    "redis-server"
  ],
  "dotfiles": {
    "paths": [
      "~/.redisclirc"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Query a Redis server",
    "description": "Connect redis-cli to a server and optionally run one command, scan keys or sample latency. Passwords are left out of the form; use REDISCLI_AUTH or the interactive AUTH. TLS, cluster manager and bulk-transfer options are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/redis/redis/blob/unstable/src/redis-cli.c",
        "revision": "unstable 2026-10-27",
        "evidence": "Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]\n  -h <hostname>      Server hostname (default: 127.0.0.1).\n  -p <port>          Server port (default: 6379).\n  -s <socket>        Server socket (overrides hostname and port).\n  --user <username>  Used to send ACL style 'AUTH username pass'. Needs -a.\n  --askpass          Force user to input password with mask from STDIN.\n  -u <uri>           Server URI on format redis://user:password@host:port/dbnum\n  -n <db>            Database number.\n  -c                 Enable cluster mode (follow -ASK and -MOVED redirections).\n  --raw              Use raw formatting for replies (default when STDOUT is not a tty).\n  --csv              Output in CSV format.\n  --json             Output in JSON format (default RESP3, use -2 if you want to use with RESP2).\n  --stat             Print rolling stats about server: mem, clients, ...\n  --latency          Enter a special mode continuously sampling latency.\n  --bigkeys          Sample Redis keys looking for keys with many elements (complexity).\n  --scan             List all keys using the SCAN command.\n  --pattern <pat>    Keys pattern when using the --scan, --bigkeys, --memkeys,\n"
      }
    ],
    "field": [
      {
        "id": "host",
        "label": "Host",
        "type": "string",
        "option": [
          "-h"
        ],
        "suggestions": [
          {
            "value": "127.0.0.1",
            "label": "127.0.0.1"
          }
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "port",
        "label": "Port",
        "type": "integer",
        "option": [
          "-p"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "socket",
        "label": "Unix socket",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "uri",
        "label": "Server URI",
        "description": "redis://user:password@host:port/dbnum. A password typed here lands in shell history.",
        "type": "string",
        "option": [
          "-u"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "user",
        "label": "ACL username",
        "type": "string",
        "option": [
          "--user"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "askpass",
        "label": "Prompt for password",
        "type": "boolean",
        "option": [
          "--askpass"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "db",
        "label": "Database number",
        "type": "integer",
        "option": [
          "-n"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "cluster",
        "label": "Cluster mode",
        "type": "boolean",
        "option": [
          "-c"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "raw",
        "label": "Raw output",
        "type": "boolean",
        "option": [
          "--raw"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "csv",
        "label": "CSV output",
        "type": "boolean",
        "option": [
          "--csv"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "json",
        "label": "JSON output",
        "type": "boolean",
        "option": [
          "--json"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "scan",
        "label": "List all keys (SCAN)",
        "type": "boolean",
        "option": [
          "--scan"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "pattern",
        "label": "Key pattern",
        "description": "Used with --scan and --bigkeys.",
        "type": "string",
        "option": [
          "--pattern"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "bigkeys",
        "label": "Find big keys",
        "type": "boolean",
        "option": [
          "--bigkeys"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "stat",
        "label": "Rolling server stats",
        "type": "boolean",
        "option": [
          "--stat"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "latency",
        "label": "Sample latency",
        "type": "boolean",
        "option": [
          "--latency"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "command",
        "label": "Command and arguments",
        "description": "Optional, e.g. GET key. Leave empty for an interactive session.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Run one command",
        "fields": [
          "host",
          "port",
          "db",
          "command"
        ],
        "required": [
          "command"
        ]
      },
      {
        "id": "scan",
        "label": "List keys",
        "fields": [
          "host",
          "port",
          "db",
          "scan",
          "pattern"
        ],
        "required": [
          "scan"
        ],
        "set": {
          "scan": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "host",
          "port",
          "db",
          "command",
          "scan",
          "pattern"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "socket",
          "uri",
          "user",
          "askpass",
          "cluster",
          "raw",
          "csv",
          "json",
          "bigkeys",
          "stat",
          "latency"
        ]
      }
    ]
  }
}
