From 9961fffec810aaf67678694838847d957bdd9426 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Fri, 26 Sep 2025 14:44:28 -0700 Subject: [PATCH 1/3] docs: update readme getting started instructions --- README.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9971365..93299ee 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,9 @@ Before you begin, ensure you have the following: * Cloud SQL Client (`roles/cloudsql.client`) * Cloud SQL Admin (`roles/cloudsql.admin`) -## Installation +## Getting Started + +### Installation To install the extension, use the command: @@ -32,7 +34,7 @@ To install the extension, use the command: gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgresql ``` -## Configuration +### Configuration Set the following environment variables before starting the Gemini CLI. This configuration is not required if utilizing the [Admin toolset](#supported-tools). @@ -48,13 +50,26 @@ This configuration is not required if utilizing the [Admin toolset](#supported-t Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment. > [!NOTE] -> When using private IPs with Cloud SQL for PostgreSQL, you must use a Virtual Private Cloud (VPC) network. +> If your Cloud SQL for PostgreSQL instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network. + +### Start Gemini CLI + +To start the Gemini CLI, use the following command: + +```bash +gemini +``` + +> [!WARNING] +> **Changing Instance & Database Connections** +> Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session. +> To save and resume conversation history use command: `/chat save ` and `/chat resume `. ## Usage Examples Interact with Cloud SQL for PostgreSQL using natural language: -* **Provision Infrastructure:** +* **Provision Infrastructure:** * "Create a new CLoud SQL for Postgres instance named 'e-commerce-prod' in the 'my-gcp-project' project." * "Create a new user named 'analyst' with read access to all tables." * **Explore Schemas and Data:** @@ -90,8 +105,13 @@ Interact with Cloud SQL for PostgreSQL using natural language: ## Additional Extensions -Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions), including a generic [PostgreSQL extension](https://github.com/gemini-cli-extensions/postgres). +Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions), including: +* [Generic PostgreSQL extension](https://github.com/gemini-cli-extensions/postgres) +* [Cloud SQL for PostgreSQL Observability extension](https://github.com/gemini-cli-extensions/cloud-sql-postgresql-observability) +* and more! ## Troubleshooting -* "cannot execute binary file": 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. +* "✖ 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. +* "✖ MCP ERROR: Error: spawn /Users//.gemini/extensions/cloud-sql-sqlserver/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+. +* "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. \ No newline at end of file From 6eb7bb1831eb8ed7c521dfb8645d405b7d8ce4ba Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Mon, 29 Sep 2025 11:34:00 -0700 Subject: [PATCH 2/3] fix toolset --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 93299ee..8ebeace 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,10 @@ Interact with Cloud SQL for PostgreSQL using natural language: * **Admin:** * `create_instance`: Use this tool to create an Postgres instance. * `create_user`: Use this tool to create Postgres-BUILT-IN or IAM-based users. + * `create_database`: Creates a new database in a Cloud SQL instance. * `get_instance`: Use this tool to get details about an Postgres instance. - * `get_user`: Use this tool to get details about a user. * `list_instances`: Use this tool to list instances in a given project and location. - * `list_users`: Use this tool to list users in a given project and location. + * `list_databases`: Lists all databases for a Cloud SQL instance. * `wait_for_operation`: Use this tool to poll the operations API until the operation is done. * **Data:** @@ -114,4 +114,4 @@ Find additional extensions to support your entire software development lifecycle * "✖ 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. * "✖ MCP ERROR: Error: spawn /Users//.gemini/extensions/cloud-sql-sqlserver/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+. -* "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. \ No newline at end of file +* "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. From 653bc666ebc2d20c26ecc583a3e074ed2baa8281 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Tue, 30 Sep 2025 09:45:36 -0700 Subject: [PATCH 3/3] Update README.md Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ebeace..b5308b5 100644 --- a/README.md +++ b/README.md @@ -113,5 +113,5 @@ Find additional extensions to support your entire software development lifecycle ## Troubleshooting * "✖ 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. -* "✖ MCP ERROR: Error: spawn /Users//.gemini/extensions/cloud-sql-sqlserver/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+. +* "✖ MCP ERROR: Error: spawn /Users//.gemini/extensions/cloud-sql-postgresql/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+. * "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.