{
  "markdown": "# Gemini CLI Extension - BigQuery Conversational Analytics\n\n> [!NOTE]\n> This extension is currently in beta (pre-v1.0), and may see breaking changes until the first stable release (v1.0).\n\nDevelopers can effortlessly connect, interact, and generate data insights with [BigQuery](https://cloud.google.com/bigquery/docs) datasets and data using natural language commands.\n\nLearn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md).\n> [!IMPORTANT]\n> **We Want Your Feedback!**\n> Please share your thoughts with us by filling out our feedback [form][form]. \n> Your input is invaluable and helps us improve the project for everyone.\n\n[form]: https://docs.google.com/forms/d/e/1FAIpQLSfEGmLR46iipyNTgwTmIDJqzkAwDPXxbocpXpUbHXydiN1RTw/viewform?usp=pp_url&entry.157487=bigquery-conversational-analytics\n\n## **Why Use the BigQuery Conversational Analytics Extension?**\n\n* **Natural Language to insights :** Ask a variety of questions from your BigQuery data and generate intelligent insights.\n* **Seamless Workflow:** Stay in your CLI. No need to constantly switch contexts to the GCP console for generating analytics insights. .\n* **Leverage prebuilt agent :** Access to advanced insights offered by a built-in agent behind  [Conversational Analytics API](https://cloud.google.com/gemini/docs/conversational-analytics-api/overview)\n\n## Prerequisites\n\nBefore you begin, ensure you have the following:\n\n* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed with version **+v0.6.0**.\n* Setup Gemini CLI [Authentication](https://github.com/google-gemini/gemini-cli/tree/main?tab=readme-ov-file#-authentication-options).\n* [Node.js](https://nodejs.org/) (the MCP server runs via `npx`).\n* A Google Cloud project with the **Data Analytics API with Gemini**, **Gemini for Google Cloud API** and **BigQuery API** enabled.\n* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.\n* IAM Roles:\n     * BigQuery User (`roles/bigquery.user`) (for executing queries and view metadata)\n     * Gemini for Google Cloud (`roles/cloudaicompanion.user`) (to use the conversational analytics API)\n\n## Getting Started\n\n### Installation\n\nTo install the extension, use the command:\n\n```bash\ngemini extensions install https://github.com/gemini-cli-extensions/bigquery-conversational-analytics\n```\n\n### Configuration\n\nYou will be prompted to configure the following settings during installation. These settings are saved in an `.env` file within the extension's directory.\n\n*   `BIGQUERY_PROJECT`: The GCP project ID.\n*   `BIGQUERY_LOCATION`: (Optional) The dataset location.\n\nTo view or update your configuration:\n\n**List Settings:**\n*   Terminal: `gemini extensions list`\n*   Gemini CLI: `/extensions list`\n\n**Update Settings:**\n*   Terminal: `gemini extensions config bigquery-conversational-analytics [setting name] [--scope <scope>]`\n    *   `setting name`: (Optional) The single setting to configure.\n    *   `scope`: (Optional) The scope of the setting in (`user` or `workspace`). Defaults to `user`.\n*   Currently, you must restart the Gemini CLI for changes to take effect. We recommend using `gemini --resume` to resume your session.\n\nAlternatively, you can manually set these environment variables before starting the Gemini CLI:\n\n```bash\nexport BIGQUERY_PROJECT=\"<your-gcp-project-id>\"\nexport BIGQUERY_LOCATION=\"<your-dataset-location>\"  # Optional\nexport BIGQUERY_SCOPES=\"https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/drive\"  # Optional\nexport BIGQUERY_MAX_QUERY_RESULT_ROWS=50  # Optional\n```\n\n> [!NOTE]\n> * Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.\n> * See [Troubleshooting](#troubleshooting) for debugging your configuration.\n\n### Start Gemini CLI\n\nTo start the Gemini CLI, use the following command:\n\n```bash\ngemini\n```\n\n## Usage Examples\n\nInteract with BigQuery using natural language right from your IDE:\n\n* Ask for insights\n\n  * Using the tables under bigquery-public-data.google\\_analytics\\_sample , tell me the channels I should focus on and why?\n\n## Supported Tools\n\nThis extension provides a comprehensive set of tools:\n\n* `ask_data_insights`: Perform data analysis, get insights, or answer complex questions about the contents of specific BigQuery tables.\n* `search_catalog`: Find BigQuery tables relevant to users, natural language query.\n\n## Additional Extensions\n\nFind additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions), including:\n* [BigQuery Data Analytics](https://github.com/gemini-cli-extensions/bigquery-data-analytics)\n* and more!\n\n## Troubleshooting\n\nUse `gemini --debug` to enable debugging.\n\nCommon issues:\n\n* \"failed to find default credentials: google: could not find default credentials.\": Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment. See [Set up Application Default Credentials](https://cloud.google.com/docs/authentication/external/set-up-adc) for more information.\n* \"✖ Error during discovery for server: MCP error -32000: Connection closed\": The database connection has not been established. Ensure your configuration is set via environment variables.\n* \"✖ MCP ERROR: Error: spawn npx ENOENT\": Node.js/`npx` is not installed or not on your `PATH`. Install Node.js (which provides `npx`).\n* \"npm error\"/network failures on first run: `npx` fetches `@toolbox-sdk/server` on first launch, so it needs network access. Retry once connectivity is available.\n",
  "bytes": 5719,
  "sha": "8a9172d5414c6d68cbed1006db2b5099822d560d71333d10abd871586822fad7",
  "repo_slug": "gemini-cli-extensions/bigquery-conversational-analytics",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_gemini_cli_extensions_bigquery_conversat_f3822720/readme"
}