2025-12-01 11:38:48 -08:00
|
|
|
# Get started with Gemini CLI
|
2025-10-01 16:24:29 -07:00
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
Welcome to Gemini CLI! This guide will help you install, configure, and start
|
|
|
|
|
using the Gemini CLI to enhance your workflow right from your terminal.
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
## Quickstart: Install, authenticate, configure, and use Gemini CLI
|
|
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
Gemini CLI brings the power of advanced language models directly to your command
|
|
|
|
|
line interface. As an AI-powered assistant, Gemini CLI can help you with a
|
|
|
|
|
variety of tasks, from understanding and generating code to reviewing and
|
|
|
|
|
editing documents.
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
|
|
The standard method to install and run Gemini CLI uses `npm`:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
npm install -g @google/gemini-cli
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Once Gemini CLI is installed, run Gemini CLI from your command line:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
gemini
|
|
|
|
|
```
|
|
|
|
|
|
2025-10-10 15:10:24 -07:00
|
|
|
For more installation options, see [Gemini CLI Installation](./installation.md).
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
## Authenticate
|
|
|
|
|
|
2025-12-01 15:55:25 -08:00
|
|
|
To begin using Gemini CLI, you must authenticate with a Google service. In most
|
|
|
|
|
cases, you can log in with your existing Google account:
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
1. Run Gemini CLI after installation:
|
2025-12-01 15:55:25 -08:00
|
|
|
|
2025-10-01 16:24:29 -07:00
|
|
|
```bash
|
|
|
|
|
gemini
|
|
|
|
|
```
|
2025-12-01 15:55:25 -08:00
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
2. When asked "How would you like to authenticate for this project?" select **1.
|
|
|
|
|
Login with Google**.
|
2025-12-01 15:55:25 -08:00
|
|
|
|
2025-10-01 16:24:29 -07:00
|
|
|
3. Select your Google account.
|
2025-12-01 15:55:25 -08:00
|
|
|
|
2025-10-01 16:24:29 -07:00
|
|
|
4. Click on **Sign in**.
|
|
|
|
|
|
2025-12-01 15:55:25 -08:00
|
|
|
Certain account types may require you to configure a Google Cloud project. For
|
|
|
|
|
more information, including other authentication methods, see
|
2025-10-15 21:38:37 +02:00
|
|
|
[Gemini CLI Authentication Setup](./authentication.md).
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
## Configure
|
|
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
Gemini CLI offers several ways to configure its behavior, including environment
|
|
|
|
|
variables, command-line arguments, and settings files.
|
2025-10-01 16:24:29 -07:00
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
To explore your configuration options, see
|
|
|
|
|
[Gemini CLI Configuration](./configuration.md).
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
## Use
|
|
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
Once installed and authenticated, you can start using Gemini CLI by issuing
|
|
|
|
|
commands and prompts in your terminal. Ask it to generate code, explain files,
|
|
|
|
|
and more.
|
2025-10-01 16:24:29 -07:00
|
|
|
|
|
|
|
|
To explore the power of Gemini CLI, see [Gemini CLI examples](./examples.md).
|
|
|
|
|
|
|
|
|
|
## What's next?
|
|
|
|
|
|
|
|
|
|
- Find out more about [Gemini CLI's tools](../tools/index.md).
|
|
|
|
|
- Review [Gemini CLI's commands](../cli/commands.md).
|
2025-11-18 12:01:16 -05:00
|
|
|
- Learn how to [get started with Gemini 3](./gemini-3.md).
|