About gemini
Gemini CLI skill describes how to run Gemini in headless, one-shot mode, aimed at users who need prompt-based command-line tasks. It covers structured output, stdin input, and management of extensions, skills, hooks, and MCP settings.
Key features
- 01Headless one-shot prompting
- 02JSON output format
- 03Append stdin to prompts
- 04List and manage extensions
- 05Manage skills, hooks, and MCP
Use cases
- 01Requesting a one-off Gemini response
- 02Summarizing piped-in notes
- 03Obtaining a JSON-formatted response
MCP support
The skill documents Gemini CLI commands for listing and managing MCP settings. It does not specify server capabilities or connection details.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ openclaw/ openclaw --skill geminiAfter installing, type/geminiin Claude Code to confirm it loaded.
Details
From the project READMEGemini CLI
Use Gemini in headless one-shot mode. Positional text starts interactive mode; use -p/--prompt.
Quick start
gemini -p "Answer this question..."gemini -m <model> -p "Prompt..."gemini -p "Return JSON" --output-format json- stdin appends to
-p:cat notes.md | gemini -p "Summarize"
Extensions
- List:
gemini --list-extensions - Manage:
gemini extensions <command> - Skills:
gemini skills <command> - Hooks:
gemini hooks <command> - MCP:
gemini mcp <command>
Notes
- If auth is required, run
geminionce interactively and follow the login flow.
Comments
Markdown supported