Skip to content

Commit b9fffc6

Browse files
committed
clarify env var setting
1 parent 0d7b9a7 commit b9fffc6

1 file changed

Lines changed: 28 additions & 21 deletions

File tree

README.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ Before you begin, ensure you have the following:
5050
5151
## Getting Started
5252

53+
### Configuration
54+
55+
Please keep these env vars handy during the installation process:
56+
57+
- `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.
58+
- `CLOUD_SQL_POSTGRES_REGION`: The region of your Cloud SQL instance.
59+
- `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of your Cloud SQL instance.
60+
- `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database to connect to.
61+
- `CLOUD_SQL_POSTGRES_USER`: (Optional) The database username. Defaults to the active IAM user.
62+
- `CLOUD_SQL_POSTGRES_PASSWORD`: (Optional) The password for the database user.
63+
- `CLOUD_SQL_POSTGRES_IP_TYPE`: (Optional) Type of the IP address: `PUBLIC`, `PRIVATE`, or `PSC`. Defaults to `PUBLIC`.
64+
65+
> [!NOTE]
66+
>
67+
> - Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
68+
> - If your Cloud SQL for PostgreSQL instance uses private IPs, you must run your agent in the same Virtual Private Cloud (VPC) network.
69+
5370
### Installation & Usage
5471

5572
To start interacting with your database, install the skills for your preferred AI agent, then launch the agent and use natural language to ask questions or perform tasks.
@@ -62,6 +79,8 @@ To start interacting with your database, install the skills for your preferred A
6279
gemini extensions install https://github.com/gemini-cli-extensions/cloud-sql-postgresql
6380
```
6481

82+
During the installation, enter your environment vars as described in the [configuration section](#configuration).
83+
6584
**2. (Optional) Manage Configuration:**
6685
To view or update your configuration in Gemini CLI:
6786
- Terminal: `gemini extensions config cloud-sql-postgresql [setting name] [--scope <scope>]`
@@ -78,17 +97,20 @@ _(Tip: Run `/extensions list` to verify your configuration and active extensions
7897
<details>
7998
<summary>Claude Code</summary>
8099

81-
**1. Start the agent:**
100+
**1. Set env vars:**
101+
In your terminal, set your environment vars as described in the [configuration section](#configuration).
102+
103+
**2. Start the agent:**
82104
```bash
83105
claude
84106
```
85107

86-
**2. Add the marketplace:**
108+
**3. Add the marketplace:**
87109
```bash
88110
/plugin marketplace add gemini-cli-extensions/cloud-sql-postgresql
89111
```
90112

91-
**3. Install the plugin:**
113+
**4. Install the plugin:**
92114
```bash
93115
/plugin install cloud-sql-postgresql@google-data-cloud-skills
94116
```
@@ -109,8 +131,10 @@ git clone git@github.com:gemini-cli-extensions/cloud-sql-postgresql.git
109131
mkdir -p ~/.codex/plugins
110132
cp -R /absolute/path/to/cloud-sql-postgresql ~/.codex/plugins/cloud-sql-postgresql
111133
```
134+
**3. Set env vars:**
135+
Enter your environment vars as described in the [configuration section](#configuration).
112136

113-
**3. Create or update marketplace.json:**
137+
**4. Create or update marketplace.json:**
114138
`~/.agents/plugins/marketplace.json`
115139
```json
116140
{
@@ -140,23 +164,6 @@ _(Tip: Run `codex plugin list` or use the `/plugins` interactive menu to verify
140164

141165
</details>
142166

143-
### Configuration
144-
145-
You may be prompted to configure the following settings during installation. These settings can also be set as environment variables.
146-
147-
- `CLOUD_SQL_POSTGRES_PROJECT`: The GCP project ID.
148-
- `CLOUD_SQL_POSTGRES_REGION`: The region of your Cloud SQL instance.
149-
- `CLOUD_SQL_POSTGRES_INSTANCE`: The ID of your Cloud SQL instance.
150-
- `CLOUD_SQL_POSTGRES_DATABASE`: The name of the database to connect to.
151-
- `CLOUD_SQL_POSTGRES_USER`: (Optional) The database username. Defaults to the active IAM user.
152-
- `CLOUD_SQL_POSTGRES_PASSWORD`: (Optional) The password for the database user.
153-
- `CLOUD_SQL_POSTGRES_IP_TYPE`: (Optional) Type of the IP address: `PUBLIC`, `PRIVATE`, or `PSC`. Defaults to `PUBLIC`.
154-
155-
> [!NOTE]
156-
>
157-
> - Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
158-
> - If your Cloud SQL for PostgreSQL instance uses private IPs, you must run your agent in the same Virtual Private Cloud (VPC) network.
159-
160167
> [!WARNING]
161168
> **Changing Instance & Database Connections**
162169
> Currently, the database connection must be configured before starting the agent and can not be changed during a session.

0 commit comments

Comments
 (0)