GeminiCLI.net

Frequently Asked Questions

Have questions? We have answers. Here are some of the most common questions we get about Gemini CLI.

What's the difference between the Gemini API and the Gemini CLI?
The Gemini API is the backend service provided by Google that allows programs to access the AI models. The Gemini CLI is a user-friendly, official command-line tool that uses the API, letting you interact with the models directly from your terminal without writing any extra code.
How do I get a Gemini API Key? Is it free?
You can get a free API key from Google AI Studio. Simply sign in with your Google account and create a new key. We have a detailed, step-by-step guide on our blog that walks you through the entire process.
What are the free usage limits for the Gemini API?
Google offers a generous free tier for the Gemini API, which is usually sufficient for most individual developers and hobbyists. For example, the Gemini 1.5 Flash model has a very high free quota. For the most current and detailed limits, always check the official Google AI Platform pricing page.
Is it safe to use my API key in the Gemini CLI?
Yes, when used correctly. The official Gemini CLI stores your API key locally and securely on your machine. However, you should never share your key, commit it to a public Git repository, or expose it in client-side code. Treat it like a password.
Can I use Gemini CLI on Windows?
Absolutely. The Gemini CLI is a cross-platform tool. You can install and run it on Windows, macOS, and Linux. The primary requirement is having a compatible version of Node.js and npm installed on your system.
How can I use Gemini to analyze my local files?
This is one of its most powerful features. You can use the `-f` or `--file` flag to pass the content of one or more local files directly into your prompt. For example: `gemini -f my_code.py \"Explain this Python script to me.\"`
What's the best Gemini model to use for coding?
For most coding tasks, `Gemini 1.5 Pro` is the most powerful and capable model, offering a large context window and strong reasoning. For faster, less complex tasks where speed is important, `Gemini 1.5 Flash` is an excellent and more cost-effective choice.
Can I fine-tune a model with Gemini CLI?
No, the Gemini CLI is designed for direct interaction with Google's pre-trained models. Fine-tuning is a more complex process that is typically done through the Google AI Platform's web console or its specific client libraries (SDKs), not the general-purpose CLI.