{"id":17054,"library":"redis-cli","title":"Node.js Redis Command-Line Interface","description":"redis-cli is a Node.js-based command-line interface tool designed for interacting with Redis servers, offering an alternative to the official C-based Redis CLI. It allows users to connect to Redis instances, including those in cluster mode, and execute Redis commands directly from their terminal. The package is currently at version 2.1.2, though the provided release history primarily details updates up to version 1.4.0, which included bug fixes and blocking mode support, as well as vulnerability patches in earlier 1.3.x releases. While it mirrors many features of the official CLI, such as host, port, authentication, and TLS connection options, its key differentiator is its JavaScript/TypeScript implementation, potentially appealing to Node.js developers seeking a pure-JS ecosystem tool or a CLI that could be more easily extended within a Node.js project. Its release cadence appears infrequent based on the visible history, suggesting a maintenance-focused development approach.","status":"maintenance","version":"2.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/lujiajing1126/redis-cli","tags":["javascript","redis","cil"],"install":[{"cmd":"npm install redis-cli","lang":"bash","label":"npm"},{"cmd":"yarn add redis-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add redis-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"$ npm install -g redis-cli\n\n# Connect to default Redis instance (127.0.0.1:6379)\n$ rdcli\n\n# Connect to a specific host and port\n$ rdcli -h 10.4.23.235 -p 6380\n\n# Connect in cluster mode\n$ rdcli -c -h my-cluster-host","lang":"shell","description":"Demonstrates global installation and basic command-line usage for connecting to Redis instances, including cluster mode."},"warnings":[{"fix":"Upgrade to the latest available version: `npm install -g redis-cli@latest`","message":"Version 1.3.1 included fixes for security vulnerabilities. Users running versions older than 1.3.1 are strongly advised to upgrade immediately to a more recent secure version.","severity":"breaking","affected_versions":"<1.3.1"},{"fix":"Consult your Redis PaaS provider's documentation for supported commands and test critical operations in non-production environments first.","message":"The roadmap indicates that the tool might not fully support all commands when connecting to 'cluster-like redis (PaaS)' instances, which may restrict certain Redis functionalities.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use the `rdcli` command directly from your shell or invoke it via `child_process` in Node.js for automation purposes.","message":"This package is designed as a standalone command-line interface tool and does not expose a programmatic API for `import` or `require()` within a Node.js application. Attempting to use it as a library will result in errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed globally: `npm install -g redis-cli`. If the issue persists, check your PATH environment variable.","cause":"The redis-cli package was not installed globally or the global binaries path is not in your system's PATH.","error":"rdcli: command not found"},{"fix":"Verify that your Redis server is active and accessible. Check its configuration for the correct host and port, and ensure no firewall rules are preventing the connection. Use `--host` and `--port` options if different from default.","cause":"The Redis server is not running, is configured to listen on a different address/port, or a firewall is blocking the connection.","error":"Error: connect ECONNREFUSED 127.0.0.1:6379"},{"fix":"If connecting to a Redis cluster, ensure you include the `-c` or `--cluster` flag when running `rdcli`: `rdcli -c -h your-cluster-host`. If it's a standalone instance, ensure your command is appropriate for a non-cluster setup.","cause":"Attempting to run a Redis cluster command on a non-cluster enabled Redis instance, or connecting to a cluster without enabling cluster mode in `rdcli`.","error":"(error) MOVED 12345 10.0.0.1:6380"}],"ecosystem":"npm","meta_description":null}