gemini
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGemini CLI
Gemini CLI
Commands
命令
Use the wrapper script for streamlined interaction:
bash
undefined使用包装脚本实现流畅交互:
bash
undefinedNew conversation
新对话
~/.agents/skills/gemini/gemini-chat.sh "your prompt here"
~/.agents/skills/gemini/gemini-chat.sh "your prompt here"
Continue conversation (session_id from previous output)
继续对话(会话ID来自上一次输出)
~/.agents/skills/gemini/gemini-chat.sh --resume <session_id> "follow-up prompt"
The script:
- Streams output in real-time (no more waiting blindly)
- Shows retry/error info (429 등)
- Saves raw response to tmpfile for debugging
- Extracts session_id automatically~/.agents/skills/gemini/gemini-chat.sh --resume <session_id> "follow-up prompt"
该脚本:
- 实时流式输出(无需盲目等待)
- 显示重试/错误信息(如429等)
- 将原始响应保存到临时文件以便调试
- 自动提取session_idExamples
示例
bash
undefinedbash
undefinedAsk Gemini for code review
请求Gemini进行代码审查
~/.agents/skills/gemini/gemini-chat.sh "Review this function for potential bugs: $(cat src/utils.ts)"
~/.agents/skills/gemini/gemini-chat.sh "Review this function for potential bugs: $(cat src/utils.ts)"
Follow up (use session_id from previous output)
跟进对话(使用上一次输出的session_id)
~/.agents/skills/gemini/gemini-chat.sh --resume abc-123 "How would you refactor it?"
~/.agents/skills/gemini/gemini-chat.sh --resume abc-123 "How would you refactor it?"
Leverage Google Search grounding
利用Google Search grounding功能
~/.agents/skills/gemini/gemini-chat.sh "What are the latest changes in TypeScript 5.8?"
undefined~/.agents/skills/gemini/gemini-chat.sh "What are the latest changes in TypeScript 5.8?"
undefinedRaw CLI Usage (if needed)
原始CLI使用(如有需要)
bash
tmpfile=$(mktemp)
echo "Response saved to: $tmpfile"
gemini --model auto-gemini-3 --approval-mode yolo "prompt" --output-format stream-json | tee "$tmpfile"
session_id=$(jq -rs 'last | .session_id' "$tmpfile")bash
tmpfile=$(mktemp)
echo "Response saved to: $tmpfile"
gemini --model auto-gemini-3 --approval-mode yolo "prompt" --output-format stream-json | tee "$tmpfile"
session_id=$(jq -rs 'last | .session_id' "$tmpfile")Model Selection
模型选择
Available options:
--model| Value | Description |
|---|---|
| 기본값. gemini-3-pro, gemini-3-flash 중 자동 선택 |
| gemini-2.5-pro, gemini-2.5-flash 중 자동 선택 |
| 직접 지정 (가장 안정적) |
| 직접 지정 |
可用的选项:
--model| 值 | 描述 |
|---|---|
| 默认值。自动选择gemini-3-pro或gemini-3-flash |
| 自动选择gemini-2.5-pro或gemini-2.5-flash |
| 手动指定(最稳定) |
| 手动指定 |
Quota Exhausted (429 에러) 대처
配额耗尽(429错误)应对
Gemini 3 quota 초과 시 (429, , ):
MODEL_CAPACITY_EXHAUSTEDRESOURCE_EXHAUSTEDbash
undefined当Gemini 3配额耗尽时(错误码429,、):
MODEL_CAPACITY_EXHAUSTEDRESOURCE_EXHAUSTEDbash
undefinedauto-gemini-2.5로 fallback (2.5-pro 또는 2.5-flash 자동 선택)
回退到auto-gemini-2.5(自动选择2.5-pro或2.5-flash)
~/.agents/skills/gemini/gemini-chat.sh --model auto-gemini-2.5 "your prompt"
**Fallback 순서:**
1. `auto-gemini-3` (기본) → Gemini 3 계열 사용
2. `auto-gemini-2.5` (fallback) → Gemini 2.5-pro/flash 중 자동 선택~/.agents/skills/gemini/gemini-chat.sh --model auto-gemini-2.5 "your prompt"
**回退顺序:**
1. `auto-gemini-3`(默认)→ 使用Gemini 3系列模型
2. `auto-gemini-2.5`(回退选项)→ 自动选择Gemini 2.5-pro/flashNotes
注意事项
- Gemini automatically uses when needed
google_web_search - Image analysis: include file path in prompt, Gemini reads via
read_file - Raw response file remains after execution for debugging
- Gemini会在需要时自动使用功能
google_web_search - 图片分析:在提示词中包含文件路径,Gemini将通过读取
read_file - 原始响应文件在执行后会保留,用于调试