gemini-cli

Clarify Gemini CLI usage patterns for interactive and batch execution.

6|Updated Dec 15, 2025
One-click install
npx skills add https://github.com/GantisStorm/claude-code-pair-planning-framework --skill gemini-cli-gantisstorm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gemini-cli
Source: https://github.com/GantisStorm/claude-code-pair-planning-framework/tree/main/gemini-pair-pipeline/skills/gemini-cli
Command: npx skills add https://github.com/GantisStorm/claude-code-pair-planning-framework --skill gemini-cli-gantisstorm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a concise reference for Gemini CLI usage patterns, helping you craft effective prompts and manage sessions from Bash.

Core Features & Use Cases

  • Command templates for common Gemini CLI tasks (execute, resume, and session management).
  • Flag explanations and practical examples to speed up scripting.
  • Troubleshooting tips for authentication, rate limits, and common errors.

Quick Start

Use Gemini CLI reference to recall a basic command like: gemini "prompt" -m gemini-3-flash-preview -o text 2>&1

Frequently Asked Questions about gemini-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a prompt with Gemini CLI and specify the model?

Use the -m flag to select a model like gemini-3-flash-preview, then pass your prompt as a string. Example: gemini "your prompt" -m gemini-3-flash-preview. Output defaults to text format; redirect stderr with 2>&1 to capture all output.

How do I get JSON output from Gemini CLI instead of plain text?

Pass the -o json flag to format responses as JSON. Example: gemini "prompt" -m gemini-3-flash-preview -o json. This lets you parse structured data from CLI responses programmatically.

Can I resume a previous Gemini CLI session?

Yes, use the -r flag to resume an existing session by ID. Sessions persist across invocations, letting you continue multi-turn conversations without restarting context. List available sessions with the appropriate session listing command.

How do I list and manage active Gemini CLI sessions?

Gemini CLI provides session listing commands to view all active sessions. Each session has an ID you can reference with -r to resume. This helps track multiple concurrent conversations and switch between contexts.

What authentication and rate-limit issues should I watch for with Gemini CLI?

Verify your authentication credentials are set before running commands. Rate limits may apply depending on your account tier; batch execution across sessions can help manage throughput. Check error messages for specific rate-limit guidance.

Does Gemini CLI work with the dangerouslyDisableSandbox setting in Bash?

Gemini CLI supports dangerouslyDisableSandbox for Bash execution contexts when you need elevated permissions. Use this only when necessary; it bypasses execution restrictions and should be applied cautiously in production scripts.

Related Skills