{"id":31830796,"url":"https://github.com/gemini-cli-extensions/alloydb","last_synced_at":"2026-01-30T21:10:03.800Z","repository":{"id":316278042,"uuid":"1055653136","full_name":"gemini-cli-extensions/alloydb","owner":"gemini-cli-extensions","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-22T19:12:09.000Z","size":218,"stargazers_count":13,"open_issues_count":5,"forks_count":6,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T12:15:35.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini-cli-extensions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T15:32:54.000Z","updated_at":"2026-01-22T18:55:55.000Z","dependencies_parsed_at":"2025-10-07T23:22:44.100Z","dependency_job_id":"505ce8e8-543c-479d-9b6a-9a3a8f19cc43","html_url":"https://github.com/gemini-cli-extensions/alloydb","commit_stats":null,"previous_names":["gemini-cli-extensions/alloydb"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/gemini-cli-extensions/alloydb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Falloydb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Falloydb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Falloydb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Falloydb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-cli-extensions","download_url":"https://codeload.github.com/gemini-cli-extensions/alloydb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-cli-extensions%2Falloydb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28919470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T20:25:28.696Z","status":"ssl_error","status_checked_at":"2026-01-30T20:25:13.426Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-11T21:26:07.087Z","updated_at":"2026-01-30T21:10:03.792Z","avatar_url":"https://github.com/gemini-cli-extensions.png","language":null,"funding_links":[],"categories":["Databases","Databases and Data"],"sub_categories":[],"readme":"# Gemini CLI Extension - AlloyDB for PostgreSQL\n\n\u003e [!NOTE]\n\u003e This extension is currently in beta (pre-v1.0), and may see breaking changes until the first stable release (v1.0).\n\nInstantly manage and query your [AlloyDB for PostgreSQL](https://cloud.google.com/alloydb) databases using the power of natural language, directly from your command line. Go from an idea to a running cluster and queryable data in minutes, without ever leaving your terminal.\n\nLearn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md).\n\u003e [!IMPORTANT]\n\u003e **We Want Your Feedback!**\n\u003e Please share your thoughts with us by filling out our feedback [form][form]. \n\u003e 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\u0026entry.157487=alloydb\n\n## Why Use the AlloyDB Extension?\n\n* **Natural Language Management:** Stop wrestling with complex commands. Provision infrastructure, manage users, and query data by describing what you want in plain English.\n* **Seamless Workflow:** Stay in your CLI. No need to constantly switch contexts to the GCP console for common database tasks.\n* **Full Lifecycle Control:** Manage the entire lifecycle of your database, from creating clusters and instances to exploring schemas and running queries.\n* **Code Generation:** Accelerate development by asking Gemini to generate data classes and other code snippets based on your table schemas.\n\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* A Google Cloud project with the **AlloyDB API** enabled.\n* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.\n* IAM Permissions:\n    * AlloyDB Admin (`roles/alloydb.admin`) (for managing infrastructure)\n    * AlloyDB Client (`roles/alloydb.client`) (for connecting and querying)\n    * Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`)\n\n## Getting Started\n\n### Installation\n\nTo install the extension, use the following command before starting the Gemini CLI:\n\n```bash\ngemini extensions install https://github.com/gemini-cli-extensions/alloydb\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*   `ALLOYDB_POSTGRES_PROJECT`: The GCP project ID.\n*   `ALLOYDB_POSTGRES_REGION`: The region of your AlloyDB cluster.\n*   `ALLOYDB_POSTGRES_CLUSTER`: The ID of your AlloyDB cluster.\n*   `ALLOYDB_POSTGRES_INSTANCE`: The ID of your AlloyDB instance.\n*   `ALLOYDB_POSTGRES_DATABASE`: The name of the database to connect to.\n*   `ALLOYDB_POSTGRES_USER`: (Optional) The database username.\n*   `ALLOYDB_POSTGRES_PASSWORD`: (Optional) The password for the database user.\n*   `ALLOYDB_POSTGRES_IP_TYPE`: (Optional) Type of the IP address: `PUBLIC`, `PRIVATE`, or `PSC`. Defaults to `PUBLIC`.\n\n\u003e [!NOTE]\n\u003e This configuration is primarily for the Data Plane tools (querying). The Admin toolset does not strictly require these to be pre-set if you provide them in your prompts, but it is recommended for a smoother experience.\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 alloydb [setting name] [--scope \u003cscope\u003e]`\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 ALLOYDB_POSTGRES_PROJECT=\"\u003cyour-gcp-project-id\u003e\"\nexport ALLOYDB_POSTGRES_REGION=\"\u003cyour-alloydb-region\u003e\"\nexport ALLOYDB_POSTGRES_CLUSTER=\"\u003cyour-alloydb-cluster-id\u003e\"\nexport ALLOYDB_POSTGRES_INSTANCE=\"\u003cyour-alloydb-instance-id\u003e\"\nexport ALLOYDB_POSTGRES_DATABASE=\"\u003cyour-database-name\u003e\"\nexport ALLOYDB_POSTGRES_USER=\"\u003cyour-database-user\u003e\"  # Optional\nexport ALLOYDB_POSTGRES_PASSWORD=\"\u003cyour-database-password\u003e\"  # Optional\nexport ALLOYDB_POSTGRES_IP_TYPE=\"PUBLIC\"  # Optional: `PUBLIC`, `PRIVATE`, `PSC`. Defaults to `PUBLIC`.\n```\n\n\u003e [!NOTE]\n\u003e * Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.\n\u003e * If your AlloyDB instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.\n\u003e * 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\u003e [!WARNING]\n\u003e **Changing Instance \u0026 Database Connections**\n\u003e Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session.\n\u003e To save and resume conversation history use command: `/chat save \u003ctag\u003e` and `/chat resume \u003ctag\u003e`.\n\n## Usage Examples\n\nInteract with AlloyDB using natural language right from your IDE:\n\n* **Provision Infrastructure:**\n    * \"Create a new AlloyDB cluster named 'e-commerce-prod' in the 'my-gcp-project' project.\"\n    * \"Add a read-only instance to my 'e-commerce-prod' cluster.\"\n    * \"Create a new user named 'analyst' with read access to all tables.\"\n\n* **Explore Schemas and Data:**\n    * \"Show me all tables in the 'orders' database.\"\n    * \"What are the columns in the 'products' table?\"\n    * \"How many orders were placed in the last 30 days, and what were the top 5 most purchased items?\"\n\n* **Generate Code:**\n    * \"Generate a Python dataclass to represent the 'customers' table.\"\n\n## Supported Tools\n\nThis extension provides a comprehensive set of tools:\n\n* **Admin:**\n\t* `create_cluster`: Use this tool to create an AlloyDB cluster.\n\t* `create_instance`: Use this tool to create an AlloyDB instance (PRIMARY, READ-POOL, or SECONDARY).\n\t* `create_user`: Use this tool to create ALLOYDB-BUILT-IN or IAM-based users for an AlloyDB cluster.\n    * `get_cluster`: Use this tool to get details about an AlloyDB cluster.\n\t* `get_instance`: Use this tool to get details about an AlloyDB instance.\n\t* `get_user`: Use this tool to get details about a user in an AlloyDB cluster.\n\t* `list_clusters`: Use this tool to list clusters in a given project and location.\n\t* `list_instances`: Use this tool to list instances in a given project and location.\n\t* `list_users`: Use this tool to list users in a given project and location.\n    * `wait_for_operation`: Use this tool to poll the operations API until the operation is done.\n\n* **Data:**\n    * `list_tables`: Use this tool to lists tables in the database.\n    * `database_overview`: Use this tool to fetches the current state of the PostgreSQL server.\n    * `execute_sql`: Use this tool to executes a SQL query.\n    * `list_active_queries`: Use this tool to list currently running queries.\n    * `list_available_extensions`: Use this tool to list available extensions for installation.\n    * `list_installed_extensions`: Use this tool to list installed extensions.\n    * `get_query_plan`: Use this tool to get query plan.\n    * `list_autovacuum_configurations`: Use this tool to list autovacuum configurations and its value.\n    * `list_database_stats`: Use this tool to lists the key performance and activity statistics for each database in the AlloyDB instance.\n    * `list_indexes`: Use this tool to list available user indexes in a PostgreSQL database.\n    * `list_memory_configurations`: Use this tool to list memory configurations and its value.\n    * `list_pg_settings`: Use this tool to list configuration parameters for the PostgreSQL server.\n    * `list_publication_tables`: Use this tool to list publication tables in a PostgreSQL database.\n    * `list_replication_slots`: Use this tool to list replication slots.\n    * `list_roles`: Use this tool to lists all the user-created roles in PostgreSQL database.\n    * `list_schemas`: Use this tool to lists schemas in the database.\n    * `list_sequences`: Use this tool to list sequences in a PostgreSQL database.\n    * `list_tablespaces`: Use this tool to lists tablespaces in the database.\n    * `list_top_bloated_tables`: Use this tool to list top bloated tables.\n    * `list_triggers`: Use this tool to lists triggers in the database.\n    * `list_views`: Use this tool to lists views in the database from pg_views with a default limit of 50 rows.\n    * `list_invalid_indexes`: Use this tool to list invalid indexes.\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* [Generic PostgreSQL extension](https://github.com/gemini-cli-extensions/postgres)\n* [AlloyDB Observability extension](https://github.com/gemini-cli-extensions/alloydb-observability)\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 /Users/USER/.gemini/extensions/alloydb/toolbox ENOENT\": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.\n* \"cannot execute binary file\": The Toolbox binary did not download correctly. Ensure the correct binary for your OS/Architecture has been downloaded. See [Installing the server](https://googleapis.github.io/genai-toolbox/getting-started/introduction/#installing-the-server) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-cli-extensions%2Falloydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-cli-extensions%2Falloydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-cli-extensions%2Falloydb/lists"}