Skip to content

Conversation

@Yuan325
Copy link
Contributor

@Yuan325 Yuan325 commented Oct 24, 2025

Request for env var during installation, which get written under the hood to a .env file in the extension's directory.

This PR also includes some typo fix in order for the extension to work. In the prebuilt tools file, the environment variable was set as CLOUD_SQL_POSTGRES_PROJECT instead of CLOUD_SQL_POSTGRESQL_PROJECT.

To test this new feature:

  1. fork this repo and branch: git checkout -b install-env origin/install-env
  2. Install toolbox binary in the repo locally following this instructions.
  3. Install the extension: gemini extensions install . During the installation, it will ask for the environment variables.
  4. Navigate to the extensions folder in your .gemini folder. This folder is likely to be in your root. cd ~/.gemini/extensions/cloud-sql-postgresql/. In the folder, you will see a new file .env. The values that you set during installation will be shown here.
  5. If you would like to set optional environment variables such as CLOUD_SQL_POSTGRES_USER, CLOUD_SQL_POSTGRES_PASSWORD, CLOUD_SQL_POSTGRES_IP_TYPE, please export those variable before running gemini cli. Optional values are not yet supported in settings. E.g. export CLOUD_SQL_POSTGRES_USER=my_user
  6. Run gemini
  7. Use /mcp list to list the mcp servers. Both the cloud_sql_postgresql_admin and cloud_sql_postgresql mcp server should show 🟢 Ready.

@Yuan325 Yuan325 requested a review from averikitsch October 29, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants