Overview
Gemini CLI is Google’s AI-powered coding assistant that provides intelligent code assistance, file operations, and tool execution. PraisonAI integrates with Gemini CLI to use it as an external agent.Installation
Authentication
Set your Google API key:Basic Usage with PraisonAI
CLI Options Reference
Core Options
| Option | Description | Default |
|---|---|---|
-d, --debug | Run in debug mode | false |
-m, --model | Model to use (e.g., gemini-2.5-pro, gemini-2.5-flash) | - |
-v, --version | Show version number | - |
-h, --help | Show help | - |
Prompt Options
| Option | Description |
|---|---|
query (positional) | Prompt as positional argument (recommended) |
-p, --prompt | Prompt flag (deprecated, use positional) |
-i, --prompt-interactive | Execute prompt and continue in interactive mode |
Output Format
| Option | Description |
|---|---|
-o, --output-format | Output format: text, json, or stream-json |
Approval Modes
| Option | Description | Default |
|---|---|---|
-y, --yolo | Auto-approve all actions (YOLO mode) | false |
--approval-mode | Set approval mode | default |
default- Prompt for approval on each actionauto_edit- Auto-approve edit tools onlyyolo- Auto-approve all tools
Sandbox & Security
| Option | Description |
|---|---|
-s, --sandbox | Run in sandbox mode |
Session Management
| Option | Description |
|---|---|
-r, --resume | Resume previous session (latest or index number) |
--list-sessions | List available sessions for current project |
--delete-session | Delete a session by index number |
Workspace & Directories
| Option | Description |
|---|---|
--include-directories | Additional directories to include in workspace |
Extensions & Tools
| Option | Description |
|---|---|
-e, --extensions | List of extensions to use |
-l, --list-extensions | List all available extensions |
--allowed-tools | Tools allowed to run without confirmation |
--allowed-mcp-server-names | Allowed MCP server names |
Accessibility
| Option | Description |
|---|---|
--screen-reader | Enable screen reader mode |
Experimental
| Option | Description |
|---|---|
--experimental-acp | Start agent in ACP mode |
Commands
| Command | Description |
|---|---|
gemini [query..] | Launch Gemini CLI (default) |
gemini mcp | Manage MCP servers |
gemini extensions | Manage Gemini CLI extensions |
Examples
Basic Query
With Model Selection
YOLO Mode (Auto-Approve)
JSON Output
Include Additional Directories
Resume Session
Python Integration
Environment Variables
| Variable | Description |
|---|---|
GOOGLE_API_KEY | Google API key (primary) |
GEMINI_API_KEY | Alternative API key variable |

