diff --git a/README.md b/README.md index db6cf9bfb6..9fc5246949 100644 --- a/README.md +++ b/README.md @@ -109,14 +109,20 @@ Choose the authentication method that best fits your needs: ### Option 1: Login with Google (OAuth login using your Google Account) -**✨ Best for:** Individual developers as well as anyone who has a Gemini Code Assist License. (see [quota limits and terms of service](https://cloud.google.com/gemini/docs/quotas) for details) +**✨ Best for:** + +- Individual developers. +- Google AI Pro and AI Ultra subscribers. +- Anyone who has a Gemini Code Assist license. + +_See [quota limits and terms of service](https://cloud.google.com/gemini/docs/quotas) for details._ **Benefits:** -- **Free tier**: 60 requests/min and 1,000 requests/day -- **Gemini 2.5 Pro** with 1M token context window +- **Free tier** with 60 requests/min and 1,000 requests/day +- **Gemini 2.5 Pro and Flash** with 1M token context window - **No API key management** - just sign in with your Google account -- **Automatic updates** to latest models +- **Automatic updates** to our latest models #### Start Gemini CLI, then choose _Login with Google_ and follow the browser authentication flow when prompted diff --git a/docs/cli/authentication.md b/docs/cli/authentication.md index 3dcab5784b..4d06690f23 100644 --- a/docs/cli/authentication.md +++ b/docs/cli/authentication.md @@ -1,30 +1,35 @@ # Authentication Setup -The Gemini CLI requires you to authenticate with Google's AI services. On initial startup you'll need to configure **one** of the following authentication methods: +Gemini CLI requires you to authenticate with Google's AI services. On initial startup you'll need to configure **one** of the following authentication methods: -1. **Login with Google (Gemini Code Assist):** - - Use this option to log in with your Google account. - - During initial startup, Gemini CLI will direct you to a webpage for authentication. Once authenticated, your credentials will be cached locally so the web login can be skipped on subsequent runs. - - Note that the web login must be done in a browser that can communicate with the machine Gemini CLI is being run from. (Specifically, the browser will be redirected to a localhost url that Gemini CLI will be listening on). - - Users may have to specify a GOOGLE_CLOUD_PROJECT if: - 1. You have a Google Workspace account. Google Workspace is a paid service for businesses and organizations that provides a suite of productivity tools, including a custom email domain (e.g. your-name@your-company.com), enhanced security features, and administrative controls. These accounts are often managed by an employer or school. - 1. You have received a Gemini Code Assist license through the [Google Developer Program](https://developers.google.com/program/plans-and-pricing) (including qualified Google Developer Experts) - 1. You have been assigned a license to a current Gemini Code Assist standard or enterprise subscription. - 1. You are using the product outside the [supported regions](https://developers.google.com/gemini-code-assist/resources/available-locations) for free individual usage. - 1. You are a Google account holder under the age of 18 - - If you fall into one of these categories, you must first configure a Google Cloud Project ID to use, [enable the Gemini for Cloud API](https://cloud.google.com/gemini/docs/discover/set-up-gemini#enable-api) and [configure access permissions](https://cloud.google.com/gemini/docs/discover/set-up-gemini#grant-iam). +1. **Login with Google** + 1. **Google AI Pro and AI Ultra subscribers** + - Use this option to log in with your Google account that you use with Google AI Pro and Ultra. + - During initial startup, Gemini CLI will direct you to a webpage for authentication. Once authenticated, your credentials will be cached locally so the web login can be skipped on subsequent runs. + - Note that the web login must be done in a browser that can communicate with the machine Gemini CLI is being run from. (Specifically, the browser will be redirected to a localhost URL that Gemini CLI will be listening on.) + 2. **Gemini Code Assist:** + - Use this option to log in with your Google account. + - During initial startup, Gemini CLI will direct you to a webpage for authentication. Once authenticated, your credentials will be cached locally so the web login can be skipped on subsequent runs. + - Note that the web login must be done in a browser that can communicate with the machine Gemini CLI is being run from. (Specifically, the browser will be redirected to a localhost url that Gemini CLI will be listening on.) + - Users may have to specify a GOOGLE_CLOUD_PROJECT if: + 1. You have a Google Workspace account. Google Workspace is a paid service for businesses and organizations that provides a suite of productivity tools, including a custom email domain (e.g. your-name@your-company.com), enhanced security features, and administrative controls. These accounts are often managed by an employer or school. + 1. You have received a Gemini Code Assist license through the [Google Developer Program](https://developers.google.com/program/plans-and-pricing) (including qualified Google Developer Experts). + 1. You have been assigned a license to a current Gemini Code Assist standard or enterprise subscription. + 1. You are using the product outside the [supported regions](https://developers.google.com/gemini-code-assist/resources/available-locations) for free individual usage. + 1. You are a Google account holder under the age of 18. + - If you fall into one of these categories, you must first configure a Google Cloud Project ID to use, [enable the Gemini for Cloud API](https://cloud.google.com/gemini/docs/discover/set-up-gemini#enable-api) and [configure access permissions](https://cloud.google.com/gemini/docs/discover/set-up-gemini#grant-iam). - You can temporarily set the environment variable in your current shell session using the following command: + You can temporarily set the environment variable in your current shell session using the following command: - ```bash - export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID" - ``` - - For repeated use, you can add the environment variable to your [.env file](#persisting-environment-variables-with-env-files) or your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`). For example, the following command adds the environment variable to a `~/.bashrc` file: + ```bash + export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID" + ``` + - For repeated use, you can add the environment variable to your [.env file](#persisting-environment-variables-with-env-files) or your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`). For example, the following command adds the environment variable to a `~/.bashrc` file: - ```bash - echo 'export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"' >> ~/.bashrc - source ~/.bashrc - ``` + ```bash + echo 'export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"' >> ~/.bashrc + source ~/.bashrc + ``` 2. **Gemini API key:** - Obtain your API key from Google AI Studio: [https://aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey) diff --git a/docs/ide-companion-spec.md b/docs/ide-companion-spec.md index 63b52e4d66..75ec327e34 100644 --- a/docs/ide-companion-spec.md +++ b/docs/ide-companion-spec.md @@ -27,6 +27,7 @@ For Gemini CLI to connect, it needs to discover which IDE instance it's running - `${PID}`: The process ID of the parent IDE process. Your extension must determine this PID and include it in the filename. - `${PORT}`: The port your MCP server is listening on. - **File Content & Workspace Validation:** The file **MUST** contain a JSON object with the following structure: + ```json { "port": 12345, @@ -44,6 +45,7 @@ For Gemini CLI to connect, it needs to discover which IDE instance it's running - `ideInfo` (object, required): Information about the IDE. - `name` (string, required): A short, lowercase identifier for the IDE (e.g., `vscode`, `jetbrains`). - `displayName` (string, required): A user-friendly name for the IDE (e.g., `VS Code`, `JetBrains IDE`). + - **Authentication:** To secure the connection, the extension **MUST** generate a unique, secret token and include it in the discovery file. The CLI will then include this token in the `Authorization` header for all requests to the MCP server (e.g., `Authorization: Bearer a-very-secret-token`). Your server **MUST** validate this token on every request and reject any that are unauthorized. - **Tie-Breaking with Environment Variables (Recommended):** For the most reliable experience, your extension **SHOULD** both create the discovery file and set the `GEMINI_CLI_IDE_SERVER_PORT` environment variable in the integrated terminal. The file serves as the primary discovery mechanism, but the environment variable is crucial for tie-breaking. If a user has multiple IDE windows open for the same workspace, the CLI uses the `GEMINI_CLI_IDE_SERVER_PORT` variable to identify and connect to the correct window's server. diff --git a/docs/quota-and-pricing.md b/docs/quota-and-pricing.md index 35274d4457..5e5595aca6 100644 --- a/docs/quota-and-pricing.md +++ b/docs/quota-and-pricing.md @@ -20,7 +20,7 @@ Your journey begins with a generous free tier, perfect for experimentation and l Your free usage limits depend on your authorization type. -### Log in with Google (Gemini Code Assist for Individuals) +### Log in with Google (Gemini Code Assist for individuals) For users who authenticate by using their Google account to access Gemini Code Assist for individuals. This includes: @@ -51,17 +51,26 @@ Learn more at [Vertex AI Express Mode Limits](https://cloud.google.com/vertex-ai ## Paid tier: Higher limits for a fixed cost -If you use up your initial number of requests, you can upgrade your plan to continue to benefit from Gemini CLI by using the [Standard or Enterprise editions of Gemini Code Assist](https://cloud.google.com/products/gemini/pricing) by signing up [here](https://goo.gle/set-up-gemini-code-assist). Quotas and pricing are based on a fixed price subscription with assigned license seats. For predictable costs, you can log in with Google. This includes: +If you use up your initial number of requests, you can continue to benefit from Gemini CLI by upgrading to one of the following subscriptions: -- Standard: - - 1500 model requests / user / day - - 120 model requests / user / minute -- Enterprise: - - 2000 model requests / user / day - - 120 model requests / user / minute -- Model requests will be made across the Gemini model family as determined by Gemini CLI. +- [Google AI Pro and AI Ultra](https://cloud.google.com/products/gemini/pricing) by signing up at [Set up Gemini Code Assist](https://goo.gle/set-up-gemini-code-assist). This is recommended for individual developers. Quotas and pricing are based on a fixed price subscription. -Learn more at [Gemini Code Assist Standard and Enterprise license Limits](https://developers.google.com/gemini-code-assist/resources/quotas#quotas-for-agent-mode-gemini-cli). + For predictable costs, you can log in with Google. + + Learn more at [Gemini Code Assist Quotas and Limits](https://developers.google.com/gemini-code-assist/resources/quotas) + +- [Purchase a Gemini Code Assist Subscription through Google Cloud ](https://cloud.google.com/gemini/docs/codeassist/overview) by signing up in the Google Cloud console. Learn more at [Set up Gemini Code Assist] (https://cloud.google.com/gemini/docs/discover/set-up-gemini) Quotas and pricing are based on a fixed price subscription with assigned license seats. For predictable costs, you can sign in with Google. + + This includes: + - Gemini Code Assist Standard edition: + - 1500 model requests / user / day + - 120 model requests / user / minute + - Gemini Code Assist Enterprise edition: + - 2000 model requests / user / day + - 120 model requests / user / minute + - Model requests will be made across the Gemini model family as determined by Gemini CLI. + + [Learn more about Gemini Code Assist Standard and Enterprise license limits](https://developers.google.com/gemini-code-assist/resources/quotas#quotas-for-agent-mode-gemini-cli). ## Pay As You Go @@ -83,7 +92,7 @@ Learn more at [Gemini API Rate Limits](https://ai.google.dev/gemini-api/docs/rat It’s important to highlight that when using an API key, you pay per token/call. This can be more expensive for many small calls with few tokens, but it's the only way to ensure your workflow isn't interrupted by quota limits. -## Google One and Ultra plans, Gemini for Workspace plans +## Gemini for Workspace plans These plans currently apply only to the use of Gemini web-based products provided by Google-based experiences (for example, the Gemini web app or the Flow video editor). These plans do not apply to the API usage which powers the Gemini CLI. Supporting these plans is under active consideration for future support. diff --git a/docs/tos-privacy.md b/docs/tos-privacy.md index 85f5195a5b..ea06e31e73 100644 --- a/docs/tos-privacy.md +++ b/docs/tos-privacy.md @@ -8,7 +8,7 @@ This article outlines the specific terms and privacy policies applicable for dif Your authentication method refers to the method you use to log into and access the Gemini CLI. There are four ways to authenticate: -- Logging in with your Google account to Gemini Code Assist for Individuals +- Logging in with your Google account to Gemini Code Assist for individuals - Logging in with your Google account to Gemini Code Assist for Standard, or Enterprise Users - Using an API key with Gemini Developer - Using an API key with Vertex AI GenAI API @@ -17,18 +17,18 @@ For each of these four methods of authentication, different Terms of Service and | Authentication | Account | Terms of Service | Privacy Notice | | :---------------------------- | :------------------ | :------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Gemini Code Assist via Google | Individual | [Google Terms of Service](https://policies.google.com/terms?hl=en-US) | [Gemini Code Assist Privacy Notice for Individuals](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals) | +| Gemini Code Assist via Google | Individual | [Google Terms of Service](https://policies.google.com/terms?hl=en-US) | [Gemini Code Assist Privacy Notice for individuals](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals) | | Gemini Code Assist via Google | Standard/Enterprise | [Google Cloud Platform Terms of Service](https://cloud.google.com/terms) | [Gemini Code Assist Privacy Notice for Standard and Enterprise](https://cloud.google.com/gemini/docs/codeassist/security-privacy-compliance#standard_and_enterprise_data_protection_and_privacy) | | Gemini Developer API | Unpaid | [Gemini API Terms of Service - Unpaid Services](https://ai.google.dev/gemini-api/terms#unpaid-services) | [Google Privacy Policy](https://policies.google.com/privacy) | | Gemini Developer API | Paid | [Gemini API Terms of Service - Paid Services](https://ai.google.dev/gemini-api/terms#paid-services) | [Google Privacy Policy](https://policies.google.com/privacy) | | Vertex AI Gen API | | [Google Cloud Platform Service Terms](https://cloud.google.com/terms/service-terms/) | [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice) | -## 1. If you have logged in with your Google account to Gemini Code Assist for Individuals +## 1. If you have logged in with your Google account to Gemini Code Assist for individuals -For users who use their Google account to access [Gemini Code Assist for Individuals](https://developers.google.com/gemini-code-assist/docs/overview#supported-features-gca), these Terms of Service and Privacy Notice documents apply: +For users who use their Google account to access [Gemini Code Assist for individuals](https://developers.google.com/gemini-code-assist/docs/overview#supported-features-gca), these Terms of Service and Privacy Notice documents apply: - **Terms of Service:** Your use of the Gemini CLI is governed by the [Google Terms of Service](https://policies.google.com/terms?hl=en-US). -- **Privacy Notice:** The collection and use of your data is described in the [Gemini Code Assist Privacy Notice for Individuals](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals). +- **Privacy Notice:** The collection and use of your data is described in the [Gemini Code Assist Privacy Notice for individuals](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals). ## 2. If you have logged in with your Google account to Gemini Code Assist for Standard, or Enterprise Users @@ -65,7 +65,7 @@ Whether your code, including prompts and answers, is used to train Google's mode By default (if you have not opted out): -- **Google account with Gemini Code Assist for Individuals**: Yes. When you use your personal Google account, the [Gemini Code Assist Privacy Notice for Individuals](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals) applies. Under this notice, +- **Google account with Gemini Code Assist for individuals**: Yes. When you use your personal Google account, the [Gemini Code Assist Privacy Notice for individuals](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals) applies. Under this notice, your **prompts, answers, and related code are collected** and may be used to improve Google's products, including for model training. - **Google account with Gemini Code Assist for Standard, or Enterprise**: No. For these accounts, your data is governed by the [Gemini Code Assist Privacy Notices](https://cloud.google.com/gemini/docs/codeassist/security-privacy-compliance#standard_and_enterprise_data_protection_and_privacy) terms, which treat your inputs as confidential. Your **prompts, answers, and related code are not collected** and are not used to train models. - **Gemini API key via the Gemini Developer API**: Whether your code is collected or used depends on whether you are using an unpaid or paid service. @@ -81,7 +81,7 @@ The **Usage Statistics** setting is the single control for all optional data col The data it collects depends on your account and authentication type: -- **Google account with Gemini Code Assist for Individuals**: When enabled, this setting allows Google to collect both anonymous telemetry (for example, commands run and performance metrics) and **your prompts and answers, including code,** for model improvement. +- **Google account with Gemini Code Assist for individuals**: When enabled, this setting allows Google to collect both anonymous telemetry (for example, commands run and performance metrics) and **your prompts and answers, including code,** for model improvement. - **Google account with Gemini Code Assist for Standard, or Enterprise**: This setting only controls the collection of anonymous telemetry. Your prompts and answers, including code, are never collected, regardless of this setting. - **Gemini API key via the Gemini Developer API**: **Unpaid services**: When enabled, this setting allows Google to collect both anonymous telemetry (like commands run and performance metrics) and **your prompts and answers, including code,** for model improvement. When disabled we will use your data as described in [How Google Uses Your Data](https://ai.google.dev/gemini-api/terms#data-use-unpaid).