gemini-cli
Delegate tasks to Google's Gemini CLI agent (gemini-cli).
- License 许可
- MIT
- 最近更新
- 2026-10-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- gemini-cli
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "agent", "cli", "gemini", "google", "automation", "delegation" ] } }
- platforms
- [ "linux" ]
- description
- Delegate tasks to Google's Gemini CLI agent (gemini-cli).
03 SKILL.md 正文
Gemini CLI
The gemini CLI is Google's autonomous agent for the terminal, similar to Claude Code or Hermes. It supports tool-calling, MCP servers, and extensions.
Usage Patterns
Headless Execution
To use Gemini CLI as a sub-tool without interaction:
gemini -p "Prompt here" --output-format text
Auto-Approval (YOLO)
To allow Gemini to execute tools (file edits, terminal commands) without prompting:
gemini --yolo -p "Task requiring tool use"
Resuming Sessions
gemini --resume latest -p "Follow-up question"
Pitfalls & Lessons Learned
- Heavy Initialization: The CLI loads many extensions and MCP servers at startup. This often causes the first command to time out (default 60s is sometimes insufficient). Use
timeout=120or higher interminal()calls. - MCP Errors: It is common to see MCP discovery errors (SSE 400, connection closed) during startup if servers are misconfigured or down. These are usually non-fatal but add to the delay.
- Pathing: On this system, it is located at
/usr/bin/gemini. - Output Sanitization: If you need to process the output programmatically, use
--output-format jsonor--raw-output. - Security policy blocks NLM commands: Gemini CLI's security policy enforcement (Conseca) blocks
nlmshell commands when run viagemini --yolo -p. The model tries many workarounds (aliases, different argument formats, title-based selection) but all fail. Do NOT use Gemini CLI to orchestrate NLM workflows. Run NLM commands directly in the terminal instead. This is the #1 pitfall when the user asks to "use gemini cli with nlm" — they mean use NLM directly, not through Gemini CLI. - Rate limits: Gemini CLI itself can hit 429 rate limits on the Gemini API. When this happens, wait 60s and retry. For long-running tasks, prefer direct terminal execution over Gemini CLI orchestration.
Integration with Hermes
When Hermes needs to delegate a Google Cloud or Firebase specific task, gemini-cli is often the better choice due to its pre-installed extensions.
04 同仓库更多 Skills
blocked-page-recovery
Use when a fetch fails: 403/429, paywall, WAF, bot wall.
gemini-vision-fallback
Vision fallback: Gemini REST API if vision_analyze blocked.
twitter-cli
Use twitter-cli for ALL Twitter/X operations — reading tweets, posting, replying, quoting, liking, retweeting, following, searching, user lookups. Invoke whenever user requests any Twitter interaction.
prism-scan
Structural analysis through dynamically generated cognitive lenses. Generates the optimal analytical lens for the specific code/artifact, then executes it. Finds conservation laws, structural invariants, and concrete bugs that vanilla analysis misses. Use on any code file, system design, or text artifact.
prism-reflect
Constraint transparency: analyzes an artifact structurally, then analyzes what its own analysis concealed. Produces a conservation law AND a constraint report showing what was maximized, what was sacrificed, and what to investigate next. The only AI skill that knows what it can't see.
prism-full
Full Prism: multi-pass structural analysis with mandatory adversarial self-correction. Designs custom analytical passes, executes them with chaining, then attacks its own findings before synthesizing. Use for maximum depth on important code or artifacts.