You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,29 @@
6
6
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.
7
7
8
8
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.
***Natural Language Management:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
13
19
***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.
14
20
***Code Generation:** Accelerate development by asking Gemini to generate data classes and other code snippets based on your table schemas.
15
21
22
+
16
23
## Prerequisites
17
24
18
25
Before you begin, ensure you have the following:
19
26
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**.
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.
39
48
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")
44
53
45
54
Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
46
55
@@ -59,12 +68,12 @@ gemini
59
68
60
69
## Usage
61
70
62
-
***Explore Schemas and Data:**
71
+
***Explore Schemas and Data:**
63
72
* "Show me all tables in the 'orders' database."
64
73
* "What are the columns in the 'products' table?"
65
74
* "How many orders were placed in the last 30 days, and what were the top 5 most purchased items?"
66
75
67
-
***Generate Code:**
76
+
***Generate Code:**
68
77
* "Generate a Python dataclass to represent the 'customers' tab
69
78
70
79
## Supported Tools
@@ -79,6 +88,11 @@ Find additional extensions to support your entire software development lifecycle
79
88
80
89
## Troubleshooting
81
90
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.
82
96
* "✖ 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+.
84
98
* "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