Skip to content

feat(extensions): add 'delete' as an alias for /extensions uninstall#25660

Open
martin-hsu-test wants to merge 1 commit intogoogle-gemini:mainfrom
martin-hsu-test:feat/extensions-delete-alias
Open

feat(extensions): add 'delete' as an alias for /extensions uninstall#25660
martin-hsu-test wants to merge 1 commit intogoogle-gemini:mainfrom
martin-hsu-test:feat/extensions-delete-alias

Conversation

@martin-hsu-test
Copy link
Copy Markdown

Summary

Many users instinctively reach for delete instead of uninstall when trying to remove an extension. This PR adds delete as an alias on the /extensions uninstall slash command, removing a small but real friction point.

Fixes #21328

Implementation

Single-line change: add altNames: ['delete'] to uninstallCommand in packages/cli/src/ui/commands/extensionsCommand.ts.

This mirrors the existing pattern already used in the same file by reloadCommand:

const reloadCommand: SlashCommand = {
  name: 'reload',
  altNames: ['restart'],
  ...
};

The canonical name (uninstall) shown in help text and usage strings is unchanged, consistent with how reloadCommand exposes its restart alias.

Behavior

After this change, all of the following are equivalent:

/extensions uninstall my-ext
/extensions delete my-ext
/extensions uninstall --all
/extensions delete --all

Tests

Added a unit test asserting the alias is exposed:

it('should expose "delete" as an alias', () => {
  const uninstallCmd = extensionsCommand(true).subCommands?.find(
    (cmd) => cmd.name === 'uninstall',
  );
  expect(uninstallCmd?.altNames).toContain('delete');
});

All existing extension command tests continue to pass:

✓ packages/cli/src/ui/commands/extensionsCommand.test.ts (59 tests) 38ms
Test Files  1 passed (1)
     Tests  59 passed (59)

tsc --noEmit and eslint both pass with zero output.

Notes

  • The CLI subcommand gemini extensions uninstall (non-interactive) is not changed — only the interactive slash command. This matches the issue scope.
  • I considered also adding remove as an alias (common in npm/apt/brew), but stuck strictly to what the issue requested.

Many users instinctively reach for 'delete' instead of 'uninstall' when
trying to remove an extension. Add 'delete' as an altName on the
uninstall slash command, mirroring the existing pattern used by
reloadCommand (altNames: ['restart']). The canonical name shown in
help and usage strings is unchanged.

Fixes google-gemini#21328
@martin-hsu-test martin-hsu-test requested a review from a team as a code owner April 19, 2026 16:42
@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 improves the usability of the extension management interface by introducing a common synonym for the uninstall command. By allowing users to use 'delete' interchangeably with 'uninstall', the change reduces friction for users who rely on intuitive command naming conventions.

Highlights

  • Command Alias Addition: Added 'delete' as an alias for the '/extensions uninstall' slash command to improve user experience.
  • Test Coverage: Added a new unit test to verify that the 'delete' alias is correctly registered for the uninstall command.
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 adds "delete" as an alias for the "uninstall" extension command and includes a corresponding unit test to verify the alias is correctly exposed. I have no feedback to provide.

@gemini-cli gemini-cli bot added area/extensions Issues related to Gemini CLI extensions capability help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions Issues related to Gemini CLI extensions capability help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add delete as an alias for /extensions uninstall

1 participant