Commands in Gemini CLI
Gemini CLI provides a variety of commands to manage models, memory, settings, and more. Here is a guide to the most common commands.
The /model Command
Select your Gemini CLI model. The /model command lets you configure the model used by Gemini CLI, giving you more control over your results.
The /memory Command
Manage the AI’s instructional context (hierarchical memory loaded from GEMINI.md files).
- add: Adds text to the AI’s memory. Usage: /memory add <text>
- list: Lists the paths of the GEMINI.md files in use.
- refresh: Reloads the hierarchical memory from all GEMINI.md files.
- show: Displays the full, concatenated content of the current hierarchical memory.
Essential Utility Commands
- /clear: Clear the terminal screen and session history. (Shortcut: Ctrl+L)
- /help: Display help information and available commands.
- /quit: Exit the CLI.
- /settings: Open the settings editor to modify behavior and appearance.
Conversation Management
- /chat list: List saved conversation checkpoints.
- /chat save <tag>: Save the current conversation.
- /chat resume <tag>: Resume from a checkpoint.
- /chat share <file>: Export conversation to Markdown or JSON.
Basics & Shortcuts
Add context: Use @ to specify files for context (e.g., @src/file.ts).
Shell mode: Execute shell commands via ! (e.g., !npm test).
Keyboard Shortcuts
- Ctrl+C: Quit application
- Ctrl+Enter: New line
- Enter: Send message
- Up/Down: Cycle prompt history