Skip to content

Commit 0a63023

Browse files
authored
docs: add configuration instructions (#74)
1 parent df460e5 commit 0a63023

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,27 @@ gemini extensions install https://github.com/gemini-cli-extensions/sql-server
4141

4242
### Configuration
4343

44-
Set the following environment variables before starting the Gemini CLI. These variables can be loaded from a `.env` file.
44+
You will be prompted to configure the following settings during installation. These settings are saved in an `.env` file within the extension's directory.
45+
46+
* `MSSQL_HOST`: (Optional) The SQL Server host. Defaults to `localhost`.
47+
* `MSSQL_PORT`: (Optional) The SQL Server port. Defaults to `1433`.
48+
* `MSSQL_DATABASE`: The name of the database to connect to.
49+
* `MSSQL_USER`: The database username.
50+
* `MSSQL_PASSWORD`: The password for the database user.
51+
52+
To view or update your configuration:
53+
54+
**List Settings:**
55+
* Terminal: `gemini extensions list`
56+
* Gemini CLI: `/extensions list`
57+
58+
**Update Settings:**
59+
* Terminal: `gemini extensions config sql-server [setting name] [--scope <scope>]`
60+
* `setting name`: (Optional) The single setting to configure.
61+
* `scope`: (Optional) The scope of the setting in (`user` or `workspace`). Defaults to `user`.
62+
* Currently, you must restart the Gemini CLI for changes to take effect. We recommend using `gemini --resume` to resume your session.
63+
64+
Alternatively, you can manually set these environment variables before starting the Gemini CLI:
4565

4666
#### PowerShell
4767
```powershell
@@ -61,6 +81,9 @@ export MSSQL_USER="<your-database-user>"
6181
export MSSQL_PASSWORD="<your-database-password>"
6282
```
6383

84+
> [!NOTE]
85+
> See [Troubleshooting](#troubleshooting) for debugging your configuration.
86+
6487
### Start Gemini CLI
6588

6689
To start the Gemini CLI, use the following command:
@@ -102,7 +125,6 @@ Use `gemini --debug` to enable debugging.
102125

103126
Common issues:
104127

105-
* "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.
106128
* "✖ 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.
107129
* "✖ 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+.
108130
* "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.

0 commit comments

Comments
 (0)