> tools & sandbox
Tools are how the agent acts — editing files, running shell commands, fetching the web. Approval modes and sandboxing decide how much it can do without asking and how contained those actions are. Most of this category is controlled live with keyboard shortcuts, so the shortcuts here are as important as any flag.
// tools & sandbox
5 commands// faq
How do I run Gemini CLI in a sandbox?
Pass -s (--sandbox) to isolate file writes and shell commands. macOS uses the built-in Seatbelt by default; cross-platform it uses Docker or Podman, selected via GEMINI_SANDBOX (true, docker, podman, sandbox-exec) or tools.sandbox in settings.json. The container backends require a running daemon and a sandbox image.
What is YOLO mode and how do I toggle it?
YOLO auto-approves every tool call, including shell commands, with no confirmation. Toggle it live with Ctrl+Y, or launch with -y / --approval-mode yolo. It is risky by design, so pair it with --sandbox and never point it at untrusted input.
What do the approval modes mean?
Press Shift+Tab to cycle them: default prompts for every action, auto_edit auto-approves file edits but still gates shell commands, and plan is read-only so the agent drafts changes without applying them. The --approval-mode flag sets the mode at launch and accepts default, auto_edit, and yolo.
Why does Ctrl+C not exit Gemini CLI?
A single Ctrl+C cancels the in-flight request and clears the input rather than quitting. Press it again on an empty line, or use Ctrl+D on an empty prompt, to exit. Ctrl+D only exits when the input line is empty; otherwise it deletes a character.