Built-in Tools & Slash Commands
Explore Gemini CLI's built-in tools — file system access, shell execution, web fetch, and Google Search grounding — plus the slash commands that control session behavior.
Explore Gemini CLI's built-in tools — file system access, shell execution, web fetch, and Google Search grounding — plus the slash commands that control session behavior.
Gemini CLI ships with a set of built-in tools that the model can call during a session. These let Gemini read and write files, run shell commands, fetch web pages, and search Google — all from within the conversation.
You don't need to enable these tools explicitly. Gemini decides which ones to call based on your request.
Gemini can read, write, and navigate your file system:
Gemini can run shell commands and use their output:
Gemini CLI can search Google to supplement its answers with current information:
Gemini can fetch and read any public URL:
Fetch https://api.github.com/repos/vercel/next.js/releases/latest and tell me
what's new in the latest Next.js release
Gemini fetches the URL, parses the JSON, and gives you a summary.
Type / in the REPL to access built-in session commands:
| Command | Purpose |
|---|---|
| /help | Show all available commands |
| /clear | Clear conversation history, start fresh |
| /chat save <name> | Save the current session to disk |
| /chat load <name> | Resume a previously saved session |
| /chat list | List saved sessions |
| /tools | Show all active built-in tools |
| /memory add <note> | Add a note to GEMINI.md memory |
| /bug | Report a bug to the Gemini CLI team |
| /quit | Exit the REPL |
For scripting and CI pipelines, run Gemini with the -p flag to pass a prompt directly and get output without entering the REPL:
The -p flag integrates Gemini into shell scripts:
#!/bin/bash
# Auto-generate PR description from git diff
DIFF=$(git diff main...HEAD)
gemini -p "Write a GitHub PR description for this diff:\n\n$DIFF" > pr-description.txtUse --no-stream in scripts to get the complete response as a single output rather than streamed tokens. This makes it easier to capture with $() or pipes.
Gemini CLI's built-in tools — file operations, shell commands, web fetch, and Google Search — let it act as an autonomous agent without any configuration. Slash commands give you session management, memory updates, and diagnostic tools. Non-interactive mode with -p wires Gemini into any shell script or CI pipeline. The next module covers GEMINI.md context files and session checkpointing for longer, more complex tasks.