Gemini CLI
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.
Approval modes
- default: prompts before each tool runs.
- auto_edit: auto-approves edit tools only.
- plan: read-only, no tool execution.
- 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 on Gemini CLI
Other guides
Cursor: allow all terminal commandsClaude Code: allow commands without promptsCodex CLI: approval and sandbox modesCursor Privacy Mode: telemetry, training and data retentionClaude Code telemetry and data retention: what is sent and how to turn it offGemini CLI: turn off usage statistics and telemetry
Get the weekly agent stack update
New official MCP servers, spec changes and harness releases, checked against the source. One email a week, no fluff.
Reviewed Oct 6, 2026. Settings change often; the linked vendor docs are the source of truth.