docs(cli): Clean up CLI command structure and improve documentation#594
Merged
Conversation
- add_json_output_flag for --json on argparse parsers - cli_print_json for single-object stdout; bytes-safe default Made-with: Cursor
Print {"version": <package>} to stdout; --json overrides --short
Made-with: Cursor
- tests for add_json_output_flag, cli_print_json, Version Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Co-authored-by: Vishal Bala <vishal-bala@users.noreply.github.com>
Co-authored-by: Vishal Bala <vishal-bala@users.noreply.github.com>
This reverts commit ddcd751.
…-1554/cli-help-and-structure # Conflicts: # redisvl/cli/index.py # redisvl/cli/main.py
…i/RAAE-1554/cli-help-and-structure # Conflicts: # redisvl/cli/index.py
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 71fbb5c. Configure here.
nkanu17
approved these changes
Apr 30, 2026
Collaborator
There was a problem hiding this comment.
LGTM!
One minor thing:
- the shared flags (--url, --host, --json, etc.) now only work after the subcommand (rvl index listall --url ..), not before it (rvl index --url ... listall), which seems like a subtle backward-incompatible change from the old single-parser design. Worth confirming no existing scripts or docs use the flags-before-subcommand ordering, otherwise looks good
…p-and-structure # Conflicts: # redisvl/cli/index.py # tests/unit/test_cli_index.py # tests/unit/test_cli_stats.py # tests/unit/test_cli_utils.py
|
🚀 PR was released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
This PR improves the discoverability of the existing
rvlCLI surface without changing the public command model. Before this change, the top-level help was sparse,rvl indexdid not present its operations as proper documented subcommands, and the docs did not clearly mirror the current command tree. That made it harder to understand the intended workflows directly from the terminal, especially for maintainers and support engineers who need to inspect the available commands quickly.Changes
This change keeps the top-level surface unchanged at
index,stats,version, andmcp, but refines theargparsewiring so the help output reads like a deliberate interface.rvl --helpnow lists the command groups with short purpose text and representative examples,rvl index --helpexposescreate,info,listall,delete, anddestroyas proper documented subcommands, andrvl stats --helpnow explains the expected inputs and shows both index-name and schema-path examples along with a Redis connection example. The MCP help text was also aligned to use directrvl mcp ...examples where the CLI is already assumed to be installed.The documentation changes keep the written guidance in sync with the runtime help. The README now reflects the revised top-level help and points readers to the richer
indexandstatshelp entrypoints, while the CLI notebook now documents the full current command tree rather than only the top-level groups.Note
Medium Risk
Primarily refactors
argparsewiring forrvl,rvl index, andrvl stats; while intended to be behavior-preserving, changes to command parsing/help text could impact existing scripts relying on previous usage/error behavior.Overview
Improves
rvlCLI discoverability by expanding top-level--helpoutput with command-group descriptions and examples, and by documentingrvl indexoperations as properargparsesubcommands (create,info,listall,delete,destroy) with per-command help/epilog text.Enhances
rvl statshelp text similarly, reorganizes shared CLI flags incli/utils.pyinto clearer argument groups (index selection vs Redis connection), and alignsrvl mcphelp examples to assume an installedrvlbinary.Updates README and the CLI user-guide notebook to match the revised help/command tree, and adjusts unit tests to reflect the new help text and parsing structure.
Reviewed by Cursor Bugbot for commit 71a6711. Bugbot is set up for automated code reviews on this repo. Configure here.