Agent IndexAgent Permissions Index

Guides / Gemini CLI

What is Gemini CLI YOLO mode? (and how to use it safely)

YOLO is a Gemini CLI approval mode that auto-approves every tool call, including shell commands and file writes. Current versions enable it only from the command line (--approval-mode=yolo, or the deprecated --yolo / -y). It can't be set as the default in settings.json.

Stats from the 2026-10-20 snapshot of public GitHub configs (methodology). Behavior checked against the official docs linked below.

Approval modes

default prompts for each tool call. auto_edit auto-approves edit tools (replace, write_file) and prompts for others. plan is read-only. yolo approves everything. In settings.json, general.defaultApprovalMode accepts default, auto_edit or plan.

Using it more safely

gemini --sandbox --approval-mode=yolo

Restricting tools instead

{
  "general": {
    "defaultApprovalMode": "auto_edit"
  },
  "tools": {
    "core": [
      "read_file",
      "glob",
      "search_file_content",
      "replace",
      "write_file",
      "run_shell_command(git status)",
      "run_shell_command(npm test)"
    ]
  }
}

What public configs do

Older configs could switch YOLO/auto-accept on from a committed settings file. Of 85 unique public Gemini CLI configs that set any permission keys, 42.4% did. That is a small sample, so treat it as indicative. Organizations can disable YOLO at the policy level.

FAQ

Is --yolo deprecated?

Yes. The CLI reference marks --yolo deprecated in favor of --approval-mode=yolo.

Sources