Skip to content

Commit 94b3214

Browse files
authored
Merge branch 'main' into developer.md
2 parents 3be581b + d6ab683 commit 94b3214

2 files changed

Lines changed: 26 additions & 12 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ body:
3838
- label: "I've updated to the latest versions"
3939

4040
- type: input
41-
id: version
41+
id: ex_version
4242
attributes:
4343
label: Extension Version
4444
description: |

README.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,29 @@
66
This Gemini CLI extension provides a set of tools to interact with [Google Cloud Spanner](https://cloud.google.com/spanner/docs) instances. It allows you to manage your databases, execute queries, and explore schemas directly from the [Gemini CLI](https://google-gemini.github.io/gemini-cli/), using natural language prompts.
77

88
Learn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini-cli/blob/main/docs/extensions/index.md).
9+
> [!IMPORTANT]
10+
> **We Want Your Feedback!**
11+
> Please share your thoughts with us by filling out our feedback [form][form].
12+
> Your input is invaluable and helps us improve the project for everyone.
13+
14+
[form]: https://docs.google.com/forms/d/e/1FAIpQLSfEGmLR46iipyNTgwTmIDJqzkAwDPXxbocpXpUbHXydiN1RTw/viewform?usp=pp_url&entry.157487=spanner
915

1016
## Why Use the Spanner Extension?
1117

1218
* **Natural Language Management:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
1319
* **Seamless Workflow:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment. No need to constantly switch contexts for common database tasks.
1420
* **Code Generation:** Accelerate development by asking Gemini to generate data classes and other code snippets based on your table schemas.
1521

22+
1623
## Prerequisites
1724

1825
Before you begin, ensure you have the following:
1926

20-
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed with version **+v0.6.0**.
21-
* A Google Cloud project with the **Spanner API** enabled.
22-
* IAM Permissions
27+
* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed with version **+v0.6.0**.
28+
* Setup Gemini CLI [Authentication](https://github.com/google-gemini/gemini-cli/tree/main?tab=readme-ov-file#-authentication-options).
29+
* A Google Cloud project with the **Spanner API** enabled.
30+
* Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
31+
* IAM Permissions
2332
* Cloud Spanner Database Reader (`roles/spanner.databaseReader`)
2433
* Cloud Spanner Database User (`roles/spanner.databaseUser`)
2534

@@ -35,12 +44,12 @@ gemini extensions install https://github.com/gemini-cli-extensions/spanner
3544

3645
### Configuration
3746

38-
Set the following environment variables before starting the Gemini CLI:
47+
Set the following environment variables before starting the Gemini CLI. These variables can be loaded from a `.env` file.
3948

40-
* `SPANNER_PROJECT`: The GCP project ID.
41-
* `SPANNER_INSTANCE`: The Spanner instance ID.
42-
* `SPANNER_DATABASE`: The Spanner database ID.
43-
* `SPANNER_DIALECT`: (Optional) The Spanner database dialect e.g. "googlesql" or "postgresql" (Default: "googlesql")
49+
* `SPANNER_PROJECT`: The GCP project ID.
50+
* `SPANNER_INSTANCE`: The Spanner instance ID.
51+
* `SPANNER_DATABASE`: The Spanner database ID.
52+
* `SPANNER_DIALECT`: (Optional) The Spanner database dialect e.g. "googlesql" or "postgresql" (Default: "googlesql")
4453

4554
Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
4655

@@ -59,12 +68,12 @@ gemini
5968
6069
## Usage
6170

62-
* **Explore Schemas and Data:**
71+
* **Explore Schemas and Data:**
6372
* "Show me all tables in the 'orders' database."
6473
* "What are the columns in the 'products' table?"
6574
* "How many orders were placed in the last 30 days, and what were the top 5 most purchased items?"
6675

67-
* **Generate Code:**
76+
* **Generate Code:**
6877
* "Generate a Python dataclass to represent the 'customers' tab
6978

7079
## Supported Tools
@@ -79,6 +88,11 @@ Find additional extensions to support your entire software development lifecycle
7988

8089
## Troubleshooting
8190

91+
Use `gemini --debug` to enable debugging.
92+
93+
Common issues:
94+
95+
* "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.
8296
* "✖ 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.
83-
* "✖ MCP ERROR: Error: spawn /Users/<USER>/.gemini/extensions/spanner/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.
97+
* "✖ MCP ERROR: Error: spawn /Users/USER/.gemini/extensions/spanner/toolbox ENOENT": The Toolbox binary did not download correctly. Ensure you are using Gemini CLI v0.6.0+.
8498
* "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)