Skip to content

refactor(cli): standardize on 'reload' verb for all components#20652

Closed
keithguerin wants to merge 1 commit intomainfrom
refactor/standardize-reload-verb
Closed

refactor(cli): standardize on 'reload' verb for all components#20652
keithguerin wants to merge 1 commit intomainfrom
refactor/standardize-reload-verb

Conversation

@keithguerin
Copy link
Copy Markdown
Contributor

Summary

Standardize the primary verb for re-initializing components across the Gemini CLI to reload. This improves consistency, aligns with industry standards (Claude Code, GitHub Copilot), and matches internal service methods.

Details

This PR builds upon and completes the excellent work started by community contributor Krishna Korade (@MushuEE) in PR #18347. It extends the standardization to all extensibility types and ensures documentation and schemas are synchronized.

Key Changes:

  • Standardization: Refactored /agents, /mcp, /memory, and /extensions to use reload as the primary command.
  • Backward Compatibility: Maintained refresh and restart as aliases (altNames) for all refactored commands.
  • Symmetry: Added the refresh alias to /skills reload and /commands reload to ensure consistent behavior across the entire CLI.
  • UX Refinement: Updated all UI feedback strings (e.g., "Refreshing..." -> "Reloading...") and CLI Informative Tips to reinforce the new standard.
  • Asset Synchronization: Updated settings.schema.json and comprehensive documentation in the docs/ directory.

Related Issues

Closes #18347

How to Validate

  1. Unit Tests: Run npm test -w @google/gemini-cli -- src/ui/commands/ to verify all 342 command UI tests pass.
  2. Manual Verification:
    • Verify /agents reload, /mcp reload, /memory reload, and /extensions reload function correctly.
    • Verify aliases /agents refresh, /mcp refresh, /memory refresh, and /extensions restart still function.
    • Verify new aliases /skills refresh and /commands refresh function correctly.
    • Observe that UI feedback messages now use "Reloading..." terminology.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run

This commit standardizes the primary verb for re-initializing components
(skills, agents, commands, memory, mcp, and extensions) to 'reload'.
It maintains 'refresh' and 'restart' as aliases for backward compatibility.

- Updates all UI feedback strings to 'Reloading...'
- Updates Informative Tips in the UI
- Synchronizes documentation and settings schemas
- Ensures full symmetry across all extensibility types

Co-authored-by: Krishna Korade <MushuEE@users.noreply.github.com>
Closes #18347
@keithguerin keithguerin requested review from a team as code owners February 28, 2026 04:23
@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli bot commented Feb 28, 2026

Hi @keithguerin, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@github-actions
Copy link
Copy Markdown

You already have 7 pull requests open. Please work on getting existing PRs merged before opening more.

@github-actions github-actions bot closed this Feb 28, 2026
@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 refactors the Gemini CLI to standardize the command verb for re-initializing components, moving from a mix of 'refresh' and 'restart' to a consistent 'reload'. This change enhances the user experience by providing a more intuitive and unified command structure, while also ensuring backward compatibility through the use of aliases. The update also includes comprehensive documentation and UI message synchronization to reflect the new standard.

Highlights

  • Standardized CLI Verb: The primary verb for re-initializing components across the Gemini CLI has been standardized to 'reload', replacing 'refresh' and 'restart' for various commands. This improves consistency and aligns with industry standards.
  • Backward Compatibility Maintained: Existing 'refresh' and 'restart' commands are preserved as aliases ('altNames') for all refactored commands, ensuring no breaking changes for existing users.
  • Enhanced Command Symmetry: The 'refresh' alias was added to '/skills reload' and '/commands reload' to ensure consistent behavior across all CLI commands.
  • UI and Documentation Updates: All user interface feedback strings (e.g., 'Refreshing...' changed to 'Reloading...') and CLI informative tips have been updated to reflect the new 'reload' terminology. Corresponding documentation files and the settings schema have also been synchronized.
Changelog
  • docs/cli/gemini-md.md
    • Updated command from /memory refresh to /memory reload.
  • docs/cli/settings.md
    • Updated description for context.loadMemoryFromIncludeDirectories to reference /memory reload.
  • docs/cli/tutorials/mcp-setup.md
    • Updated command from /mcp refresh to /mcp reload in tutorial.
  • docs/cli/tutorials/memory-management.md
    • Updated command from /memory refresh to /memory reload in tutorial.
  • docs/core/remote-agents.md
    • Updated command from /agents refresh to /agents reload.
  • docs/reference/configuration.md
    • Updated description for context.loadMemoryFromIncludeDirectories to reference /memory reload.
    • Updated documentation for /memory command sub-commands to include reload.
  • packages/cli/src/config/settingsSchema.ts
    • Updated description for context.loadMemoryFromIncludeDirectories to reference /memory reload.
  • packages/cli/src/ui/commands/agentsCommand.test.ts
    • Updated test descriptions and assertions to reflect the 'reload' subcommand for agent registry.
    • Changed expected success message from 'Agents refreshed successfully.' to 'Agents reloaded successfully.'
    • Added assertion for 'Reloading agent registry...' info message.
  • packages/cli/src/ui/commands/agentsCommand.ts
    • Renamed agentsRefreshCommand to agentsReloadCommand.
    • Swapped name and altNames for the agents command, making 'reload' the primary command and 'refresh' an alias.
    • Updated UI messages from 'Refreshing agent registry...' to 'Reloading agent registry...' and 'Agents refreshed successfully.' to 'Agents reloaded successfully.'
    • Updated the agentsCommand subCommands array to use agentsReloadCommand.
  • packages/cli/src/ui/commands/extensionsCommand.test.ts
    • Updated test descriptions to reflect 'reload' instead of 'restart' for extensions.
    • Changed command lookup from 'restart' to 'reload'.
    • Updated mock context invocation name from 'restart' to 'reload'.
    • Changed UI messages from 'Restarting X extensions...' to 'Reloading X extensions...' and 'X extensions restarted successfully.' to 'X extensions reloaded successfully.'
    • Updated error messages to use 'Usage: /extensions reload' and 'Failed to reload some extensions'.
  • packages/cli/src/ui/commands/extensionsCommand.ts
    • Updated usage message for extensions command from 'restart' to 'reload'.
    • Changed UI messages from 'Restarting X extensions...' to 'Reloading X extensions...' and 'X extensions restarted successfully.' to 'X extensions reloaded successfully.'
    • Updated error messages to use 'Failed to reload some extensions'.
    • Modified completeExtensions function to include 'reload' in the invocation name check.
    • Renamed restartCommand to reloadCommand and swapped name and altNames, making 'reload' the primary command and 'restart' an alias.
    • Updated the extensionsCommand subCommands array to use reloadCommand.
  • packages/cli/src/ui/commands/mcpCommand.ts
    • Renamed refreshCommand to reloadCommand.
    • Swapped name and altNames for the MCP command, making 'reload' the primary command and 'refresh' an alias.
    • Updated descriptions from 'Restarts MCP servers' to 'Reloads MCP servers'.
    • Changed UI messages from 'Restarting MCP servers...' to 'Reloading MCP servers...'.
    • Updated the mcpCommand subCommands array to use reloadCommand.
  • packages/cli/src/ui/commands/memoryCommand.test.ts
    • Updated test descriptions to reflect 'reload' instead of 'refresh' for memory commands.
    • Changed getSubCommand parameter type from 'refresh' to 'reload'.
    • Updated test variables from refreshCommand to reloadCommand.
    • Changed expected success messages from 'Memory refreshed successfully.' to 'Memory reloaded successfully.'
    • Updated UI messages from 'Refreshing memory from source files...' to 'Reloading memory from source files...' and 'Error refreshing memory:' to 'Error reloading memory:'.
  • packages/cli/src/ui/commands/memoryCommand.ts
    • Swapped name and altNames for the memory command, making 'reload' the primary command and 'refresh' an alias.
    • Updated description from 'Refresh the memory from the source' to 'Reload the memory from the source'.
    • Changed UI messages from 'Refreshing memory from source files...' to 'Reloading memory from source files...' and 'Error refreshing memory:' to 'Error reloading memory:'.
  • packages/cli/src/ui/constants/tips.ts
    • Updated informative tips to use /memory reload instead of /memory refresh.
    • Updated informative tips to use /mcp reload instead of /mcp refresh.
  • schemas/settings.schema.json
    • Updated description and markdownDescription for loadMemoryFromIncludeDirectories to reference /memory reload.
Activity
  • The pull request completes work started in PR refactor(cli): standardize on 'reload' verb for refreshing components #18347 by community contributor Krishna Korade (@MushuEE).
  • Unit tests were run for @google/gemini-cli command UI tests, with 342 tests passing.
  • Manual verification was performed to confirm the correct functionality of /agents reload, /mcp reload, /memory reload, and /extensions reload.
  • Manual verification confirmed that aliases like /agents refresh, /mcp refresh, /memory refresh, and /extensions restart still function correctly.
  • Manual verification confirmed that new aliases /skills refresh and /commands refresh function correctly.
  • Manual verification observed that UI feedback messages now consistently use 'Reloading...' terminology.
  • Relevant documentation and README files were updated.
  • The changes were validated on MacOS using npm run.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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 renames the refresh subcommand to reload across several CLI commands, including /memory, /agents, /mcp, and /extensions. The changes encompass updating command definitions, their associated documentation, configuration schemas, UI messages, and test files to reflect the new reload terminology. The original refresh name is retained as an alias (altName) for backward compatibility for these commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant