Skip to content
AgentAtlas

Gemini CLI: YOLO mode, auto_edit and allowing specific shell commands

How do I stop Gemini CLI asking before every tool call?

Start Gemini CLI with --approval-mode auto_edit to auto-approve edits, or --yolo (--approval-mode yolo) to auto-approve everything. YOLO can only be turned on from the command line. To allow specific shell commands, list them in tools.allowed in settings.json.

Compare: allow all commands in every AI coding agent →

Approval modes

  • default: prompts before each tool runs.
  • auto_edit: auto-approves edit tools only.
  • plan: read-only mode.
  • yolo: auto-approves all actions; command line only.

Set the starting mode with general.defaultApprovalMode (default, auto_edit or plan) in ~/.gemini/settings.json or .gemini/settings.json.

Allow specific commands

.gemini/settings.json

{
  "tools": {
    "allowed": ["run_shell_command(git)", "run_shell_command(npm test)"]
  }
}

Sources

More Gemini CLI guides

Reviewed Oct 18, 2026. Settings change often; the linked vendor docs are the source of truth.

Built an MCP server? Get it listed everywhere →

Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →