gemini-cli

CLI Commands

Gemini CLI supports several built-in commands to help you manage your session, customize the interface, and control its behavior. These commands are prefixed with a forward slash (/), an at symbol (@), or an exclamation mark (!).

Slash commands (/)

Slash commands provide meta-level control over the CLI itself.

Built-in Commands

Custom Commands

Custom commands allow you to create personalized shortcuts for your most-used prompts. For detailed instructions on how to create, manage, and use them, please see the dedicated Custom Commands documentation.

Input Prompt Shortcuts

These shortcuts apply directly to the input prompt for text manipulation.

At commands (@)

At commands are used to include the content of files or directories as part of your prompt to Gemini. These commands include git-aware filtering.

Error handling for @ commands

Shell mode & passthrough commands (!)

The ! prefix lets you interact with your system’s shell directly from within Gemini CLI.