Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,33 @@ gemini extensions install https://github.com/gemini-cli-extensions/alloydb

### Configuration

Set the following environment variables before starting the Gemini CLI. These variables can be loaded from a `.env` file.
This configuration is not required if utilizing the [Admin toolset](#supported-tools).
You will be prompted to configure the following settings during installation. These settings are saved in an `.env` file within the extension's directory.

* `ALLOYDB_POSTGRES_PROJECT`: The GCP project ID.
* `ALLOYDB_POSTGRES_REGION`: The region of your AlloyDB cluster.
* `ALLOYDB_POSTGRES_CLUSTER`: The ID of your AlloyDB cluster.
* `ALLOYDB_POSTGRES_INSTANCE`: The ID of your AlloyDB instance.
* `ALLOYDB_POSTGRES_DATABASE`: The name of the database to connect to.
* `ALLOYDB_POSTGRES_USER`: (Optional) The database username.
* `ALLOYDB_POSTGRES_PASSWORD`: (Optional) The password for the database user.
* `ALLOYDB_POSTGRES_IP_TYPE`: (Optional) Type of the IP address: `PUBLIC`, `PRIVATE`, or `PSC`. Defaults to `PUBLIC`.

> [!NOTE]
> 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.

To view or update your configuration:

**List Settings:**
* Terminal: `gemini extensions list`
* Gemini CLI: `/extensions list`

**Update Settings:**
* Terminal: `gemini extensions config alloydb [setting name] [--scope <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:

```bash
export ALLOYDB_POSTGRES_PROJECT="<your-gcp-project-id>"
Expand All @@ -61,7 +86,9 @@ export ALLOYDB_POSTGRES_IP_TYPE="PUBLIC" # Optional: `PUBLIC`, `PRIVATE`, `PSC`
```

> [!NOTE]
> If your AlloyDB instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.
> * Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
> * If your AlloyDB instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.
> * See [Troubleshooting](#troubleshooting) for debugging your configuration.

### Start Gemini CLI

Expand Down
Loading