From 388a4d9753056d8cd02ecbb25a22fe0fa5ae6720 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Wed, 28 Jan 2026 16:18:50 -0800 Subject: [PATCH] docs: add configuration instructions --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e8f2a7..5567d54 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,27 @@ gemini extensions install https://github.com/gemini-cli-extensions/sql-server ### Configuration -Set the following environment variables before starting the Gemini CLI. These variables can be loaded from a `.env` file. +You will be prompted to configure the following settings during installation. These settings are saved in an `.env` file within the extension's directory. + +* `MSSQL_HOST`: (Optional) The SQL Server host. Defaults to `localhost`. +* `MSSQL_PORT`: (Optional) The SQL Server port. Defaults to `1433`. +* `MSSQL_DATABASE`: The name of the database to connect to. +* `MSSQL_USER`: The database username. +* `MSSQL_PASSWORD`: The password for the database user. + +To view or update your configuration: + +**List Settings:** +* Terminal: `gemini extensions list` +* Gemini CLI: `/extensions list` + +**Update Settings:** +* Terminal: `gemini extensions config sql-server [setting name] [--scope ]` + * `setting name`: (Optional) The single setting to configure. + * `scope`: (Optional) The scope of the setting in (`user` or `workspace`). Defaults to `user`. +* Currently, you must restart the Gemini CLI for changes to take effect. We recommend using `gemini --resume` to resume your session. + +Alternatively, you can manually set these environment variables before starting the Gemini CLI: #### PowerShell ```powershell @@ -61,6 +81,9 @@ export MSSQL_USER="" export MSSQL_PASSWORD="" ``` +> [!NOTE] +> See [Troubleshooting](#troubleshooting) for debugging your configuration. + ### Start Gemini CLI To start the Gemini CLI, use the following command: @@ -102,7 +125,6 @@ Use `gemini --debug` to enable debugging. Common issues: -* "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. * "✖ 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/USER/.gemini/extensions/sql-server/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.