Skip to content

[CLI][Doc] Edit the doc for LMCache CLI#2870

Merged
ApostaC merged 2 commits intoLMCache:devfrom
KuntaiDu:kuntai-fix-cli-doc
Mar 26, 2026
Merged

[CLI][Doc] Edit the doc for LMCache CLI#2870
ApostaC merged 2 commits intoLMCache:devfrom
KuntaiDu:kuntai-fix-cli-doc

Conversation

@KuntaiDu
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Updating the doc for CLI as it is outdated

Special notes for your reviewers:

If applicable:

  • this PR contains user facing changes - docs added
  • this PR contains unit tests

Signed-off-by: KuntaiDu <kuntai@uchicago.edu>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on bringing the LMCache CLI documentation up-to-date. It introduces a clear overview of available commands, updates the developer's guide to reflect the current codebase structure, and enhances the getting started guide with practical, current examples and detailed explanations for key commands like ping and kvcache. The changes ensure that users and developers have accurate and comprehensive resources for interacting with the LMCache CLI.

Highlights

  • CLI Command Overview: A new table was added to the main CLI documentation page, listing all available lmcache commands and their descriptions for quick reference.
  • Developer Guide Updates: The developer guide for the CLI was updated to reflect the current file structure, including new modules like prompt.py and request.py, and the ALL_COMMANDS registry was expanded to include all current commands.
  • Getting Started Guide Refinement: The getting started guide was significantly updated with current lmcache command examples, replacing outdated mock command references, and introducing detailed sections for the ping and kvcache commands, including usage, options, and exit codes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new ping and kvcache commands to the LMCache CLI and updates the documentation accordingly. The changes include adding descriptions for these commands in docs/source/cli/index.rst and docs/source/getting_started/cli.rst, updating example usage, and detailing their options and exit codes. The developer_guide/cli.rst was also updated to reflect the new command files and their registration. Feedback includes an inconsistency in the lmcache kvcache clear example's port number, which should be 8080 for consistency, and a suggestion to make the ALL_COMMANDS example in the developer guide more concise for better instructional clarity.

.. code-block:: bash

# Clear all L1 (CPU) cache
lmcache kvcache clear --url http://localhost:8000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The example for lmcache kvcache clear uses port 8000. However, the default port for the LMCache server is 8080, as correctly noted in other parts of the documentation (e.g., for lmcache ping kvcache). This inconsistency can be confusing for new users. Please update the port to 8080 for consistency.

Suggested change
lmcache kvcache clear --url http://localhost:8000
lmcache kvcache clear --url http://localhost:8080

Comment on lines 84 to 91
ALL_COMMANDS: list[BaseCommand] = [
MockCommand(),
KVCacheCommand(),
DescribeCommand(), # add here
PingCommand(),
QueryCommand(),
ServerCommand(),
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example for registering a new command in ALL_COMMANDS has been updated to show the complete list of commands. While this reflects the current state of the code, it makes the example less clear for a developer following this step-by-step guide. A minimal example is more instructive for a tutorial. Please consider reverting to the previous, more concise version to better illustrate the process of adding a single command.

Suggested change
ALL_COMMANDS: list[BaseCommand] = [
MockCommand(),
KVCacheCommand(),
DescribeCommand(), # add here
PingCommand(),
QueryCommand(),
ServerCommand(),
]
ALL_COMMANDS: list[BaseCommand] = [
MockCommand(),
DescribeCommand(), # add here
]

Signed-off-by: KuntaiDu <kuntai@uchicago.edu>
Copy link
Copy Markdown
Contributor

@sammshen sammshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@ApostaC ApostaC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ApostaC ApostaC added the full Run comprehensive tests on this PR label Mar 25, 2026
@ApostaC ApostaC enabled auto-merge (squash) March 25, 2026 23:38
@ApostaC ApostaC merged commit 4c93f5b into LMCache:dev Mar 26, 2026
34 of 35 checks passed
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
Signed-off-by: KuntaiDu <kuntai@uchicago.edu>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
Signed-off-by: KuntaiDu <kuntai@uchicago.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants