Skip to content

Commit 131fcb1

Browse files
authored
docs: add configuration instructions (#79)
1 parent f584bac commit 131fcb1

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,32 @@ gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-sql
4545

4646
### Configuration
4747

48-
Set the following environment variables before starting the Gemini CLI. These variables can be loaded from a `.env` file.
49-
This configuration is not required if utilizing the [Admin toolset](#supported-tools).
48+
You will be prompted to configure the following settings during installation. These settings are saved in an `.env` file within the extension's directory.
49+
50+
* `CLOUD_SQL_MSSQL_PROJECT`: The GCP project name.
51+
* `CLOUD_SQL_MSSQL_REGION`: The region of your Cloud SQL instance.
52+
* `CLOUD_SQL_MSSQL_INSTANCE`: The ID of your Cloud SQL instance.
53+
* `CLOUD_SQL_MSSQL_DATABASE`: The name of the database to connect to.
54+
* `CLOUD_SQL_MSSQL_USER`: The database username.
55+
* `CLOUD_SQL_MSSQL_PASSWORD`: The password for the database user.
56+
* `CLOUD_SQL_MSSQL_IP_TYPE`: (Optional) Instance IP assignment: `PUBLIC`, `PRIVATE`, or `PSC`. Defaults to `PUBLIC`.
57+
58+
> [!NOTE]
59+
> 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.
60+
61+
To view or update your configuration:
62+
63+
**List Settings:**
64+
* Terminal: `gemini extensions list`
65+
* Gemini CLI: `/extensions list`
66+
67+
**Update Settings:**
68+
* Terminal: `gemini extensions config cloud-sql-sqlserver [setting name] [--scope <scope>]`
69+
* `setting name`: (Optional) The single setting to configure.
70+
* `scope`: (Optional) The scope of the setting in (`user` or `workspace`). Defaults to `user`.
71+
* Currently, you must restart the Gemini CLI for changes to take effect. We recommend using `gemini --resume` to resume your session.
72+
73+
Alternatively, you can manually set these environment variables before starting the Gemini CLI:
5074

5175
```bash
5276
export CLOUD_SQL_MSSQL_PROJECT="<your-gcp-project-id>"
@@ -55,13 +79,13 @@ export CLOUD_SQL_MSSQL_INSTANCE="<your-cloud-sql-instance-id>"
5579
export CLOUD_SQL_MSSQL_DATABASE="<your-database-name>"
5680
export CLOUD_SQL_MSSQL_USER="<your-database-user>"
5781
export CLOUD_SQL_MSSQL_PASSWORD="<your-database-password>"
58-
export CLOUD_SQL_MSSQL_IP_TYPE="PUBLIC" # Optional: `PUBLIC`, `PRIVATE`. Defaults to `PUBLIC`.
82+
export CLOUD_SQL_MSSQL_IP_TYPE="PUBLIC" # (Optional) Instance IP assignmentL `PUBLIC`, `PRIVATE`, `PSC`. Defaults to `PUBLIC`.
5983
```
6084

61-
Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
62-
6385
> [!NOTE]
64-
> If your Cloud SQL for SQL Server instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.
86+
> * Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
87+
> * If your Cloud SQL for SQL Server instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.
88+
> * See [Troubleshooting](#troubleshooting) for debugging your configuration.
6589
6690
### Start Gemini CLI
6791

0 commit comments

Comments
 (0)