ask-gemini
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAsk Gemini
使用Gemini
Executes the local CLI to get coding assistance.
geminiNote: This skill requires the CLI to be installed and available in your system's PATH.
gemini执行本地 CLI以获取编码辅助支持。
gemini注意: 本Skill要求已安装 CLI,且其已添加至系统PATH中。
geminiQuick start
快速开始
Run a single query using positional prompt:
bash
gemini "Your question or task here"使用位置参数提示符运行单次查询:
bash
gemini "Your question or task here"Common options
常用选项
| Option | Description |
|---|---|
| Specify model |
| Auto-approve all tool executions |
For all available options, rungemini --help
| 选项 | 描述 |
|---|---|
| 指定模型 |
| 自动批准所有工具执行操作 |
如需查看所有可用选项,请运行gemini --help
Examples
示例
Ask a coding question:
bash
gemini "How do I implement a binary search in Python?"Use a specific model:
bash
gemini -m gemini-2.5-pro "Review this code for potential issues"Let Gemini make changes automatically:
bash
gemini -y "Refactor this function to use async/await"提出编码问题:
bash
gemini "How do I implement a binary search in Python?"使用特定模型:
bash
gemini -m gemini-2.5-pro "Review this code for potential issues"让Gemini自动执行修改:
bash
gemini -y "Refactor this function to use async/await"Notes
注意事项
- Positional prompts run Gemini non-interactively and output result to stdout
- Gemini CLI uses the environment variable for authentication
GEMINI_API_KEY - Use for automatic execution without confirmation prompts
-y/--yolo - The command inherits the current working directory
- 使用位置参数提示符将以非交互模式运行Gemini,并将结果输出至stdout
- Gemini CLI使用环境变量进行身份验证
GEMINI_API_KEY - 使用可无需确认提示自动执行操作
-y/--yolo - 该命令将继承当前工作目录