Gemini Manage Commands CLI #11926
GrishaAngelovGH
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using the Gemini CLI, you might find yourself writing the same prompts repeatedly. Custom slash commands offer a convenient way to reuse prompts. To make managing these custom commands even easier, I've created
gemini-manage-commands-cli. This tool, built with the Gemini CLI, provides a quick way to work with your user-defined custom commands.Gemini Manage Commands CLI
This is the Gemini Manage Commands CLI, a powerful command-line interface tool designed to help users efficiently manage their custom Gemini commands. It allows users to add, list, delete, backup, restore, export, and import their personalized commands, ensuring a streamlined workflow for their Gemini environment. For advanced users, it's helpful to know that all commands are stored as individual
.tomlfiles within the~/.gemini/commandsdirectory.Features
The Gemini Manage Commands CLI provides the following functionalities:
Installation
To install the Gemini Manage Commands CLI globally and make it available from any directory, run the following command:
This command installs the CLI tool globally on the user's system, making the
gemini-manage-commandsexecutable available in their system's PATH. This allows the user to run the command from any directory in their terminal.Usage
To use the Gemini Manage Commands CLI, run the main command from the user's terminal:
Add New Command
This option allows the user to create a new custom command. The user will be prompted to enter:
git/commitormycommand).List All Available Commands
Select this option to display a formatted list of all custom commands currently saved in the user's Gemini environment, including their paths, descriptions, and prompt content.
Delete Command
Choose this to remove an existing custom command. The user will be presented with a list of their commands to select from, followed by a confirmation prompt.
Backup Commands
This functionality creates a backup of all custom commands. The backup is stored in the
~/.gemini/commands_backupdirectory within the user's Gemini configuration.Restore Commands
Use this to restore commands from a backup. The user will have options to:
Export Commands to JSON
This allows the user to export all custom commands into a single JSON file. The user will be asked for a filename, and the file will be saved in the current directory. This is useful for sharing commands or for version control.
Import Commands from JSON
This option facilitates importing commands from a JSON file. The CLI intelligently scans the current directory for any
.jsonfiles (ignoring common config files likepackage.json) and presents them in a list to choose from. Once a file is selected, the CLI guides the user through handling any potential conflicts with existing commands (overwrite, skip, or rename).Open Commands Folder
This provides a convenient shortcut to open the
~/.gemini/commandsdirectory in the system's default file explorer. This is useful for users who wish to view or edit their command.tomlfiles directly.Clear Screen
Select this option to clear the terminal screen, providing a fresh view of the menu.
Exit
Exits the Gemini Manage Commands CLI.
Beta Was this translation helpful? Give feedback.
All reactions