Your First Session with Gemini CLI

Start Gemini CLI in a project folder, type a first request, answer its permission questions, and learn how to cancel a request and how to quit Gemini.

Checked against official docs on 9 Nov 2026

On this page

This guide shows you what to do after you install Gemini CLI. A session is one conversation with Gemini CLI. It starts when you type gemini and ends when you quit.

Go to your project folder

Gemini CLI works on the files in the folder where you start it. Use a test folder first, not a folder with important files. Folders in the terminal shows how to make a folder and go into it with cd.

Start Gemini CLI

gemini

Type your first request

Type /help and press Enter to see the commands. Then describe what you want in plain words. For example:

text
Explain what the files in this folder do.

Answer a permission question

When Gemini wants to change files or run a command, it stops and asks you. Google's example: you ask Gemini to rename photos, Gemini asks for permission, and you select Allow once. Read the action before you allow it. If you are not sure, refuse and ask Gemini to explain.

You can also start Gemini in a different approval mode with --approval-mode. The choices are default (asks you), auto_edit, yolo (approves everything) and plan (read-only planning). Keep default until you know the tool well. Never use yolo in a folder with important files.

While you type, press Shift + Tab to switch the mode. It cycles through three modes: default (Gemini asks you first), auto_edit (it changes files without asking) and plan (read-only: it can look but not change anything). Plan mode is skipped while Gemini is busy.

Ctrl + Y turns YOLO mode on or off. In YOLO mode Gemini approves its own tool calls, commands included, without asking you. Leave it off. If you pressed it by accident, press Ctrl + Y again.

If you turn on the trusted folders setting, Gemini asks once per folder whether you trust it. In a folder you do not trust, Gemini works in a restricted safe mode.

Cancel a request

Press Ctrl + C to cancel the current request. When the prompt is empty, Ctrl + C quits Gemini CLI. Esc closes a dialog.

Go back to an earlier step

Type /rewind to step back through the conversation. You can preview your earlier prompts and the file changes, then choose to rewind the chat only, undo the code changes only, or both. Pressing Esc twice quickly does the same, but only when the input box is empty. If you typed something, Esc twice first clears what you typed.

Point Gemini at a file

Type @ and a file path to add that file to your question. For example:

text
@README.md What is this file about?

With a folder path, such as @src/, Gemini gets the folder and looks inside it with its tools. Files that Git ignores, such as node_modules/, dist/, .env and .git/, are left out by default. Put a backslash before a space in a path, for example @My\ Documents/file.txt.

Quit the session

Type /quit (or /exit) and press Enter.

Useful commands inside a session

CommandWhat it does
/helpShows the available commands
/statsShows the statistics of this session: duration, tool calls and performance
/stats modelShows the token counts and quota for the models used in this session
/rewindGoes back to an earlier step of the conversation
/memory showShows the note files (GEMINI.md) that Gemini loaded
/initMakes a starting GEMINI.md note file for the folder
/quitQuits Gemini CLI

If something goes wrong

You do not want Gemini CLI to send usage statistics to Google

Gemini CLI sends them by default. Google says they include the names of the tools Gemini uses, the model of each request and your Gemini CLI settings, but not your prompts or your files. To turn them off, add these lines to ~/.gemini/settings.json. If the file already has settings, add only the privacy part inside the outer braces. Then quit Gemini CLI and start it again.

json
{
  "privacy": {
    "usageStatisticsEnabled": false
  }
}

Next, give Gemini a superpower: install a skill.

Sources