|
| 1 | +# Gemini CLI Extension - PostgreSQL |
| 2 | + |
| 3 | +This Gemini CLI extension provides a set of tools to interact with [PostgreSQL](https://www.postgresql.org/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. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +* **Integrated with Gemini CLI:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment, making security an accessible part of your workflow. |
| 8 | +* **Connect to PostgreSQL:** Securely connect to your PostgreSQL instances. |
| 9 | +* **Explore Database Schema:** List databases, tables, views, and schemas. |
| 10 | +* **Query your Database:** Execute SQL queries against your database. |
| 11 | + |
| 12 | +## Supported Tools |
| 13 | + |
| 14 | +* list-tables: Use this tool to list tables and descriptions. |
| 15 | +* execute-sql: Use this tool to execute any SQL statement. |
| 16 | + |
| 17 | +## Prerequisites |
| 18 | + |
| 19 | +Before you begin, ensure you have the following: |
| 20 | + |
| 21 | +* [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed. |
| 22 | +* A running PostgreSQL instance. |
| 23 | + |
| 24 | +## Installation |
| 25 | + |
| 26 | +To install the extension, use the `gemini extensions install` command: |
| 27 | + |
| 28 | +```bash |
| 29 | +gemini extensions install github.com/gemini-cli-extensions/postgresql.git |
| 30 | +``` |
| 31 | + |
| 32 | +## Configuration |
| 33 | + |
| 34 | +* `POSTGRES_HOST`: The hostname or IP address of the PostgreSQL server. |
| 35 | +* `POSTGRES_PORT`: The port number of the PostgreSQL server. |
| 36 | +* `POSTGRES_DATABASE`: The name of the database to connect to. |
| 37 | +* `POSTGRES_USER`: The username for authentication. |
| 38 | +* `POSTGRES_PASSWORD`: The password for authentication. |
| 39 | + |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +* Explore Schemas and Data |
| 44 | +* Generate code |
| 45 | + |
| 46 | + |
| 47 | +## Security |
| 48 | + |
| 49 | +This extension executes commands against your PostgreSQL database. Always review the generated SQL queries before execution, especially for write operations. |
| 50 | + |
| 51 | +## Disclaimer |
| 52 | + |
| 53 | +This is not an officially supported Google product. This extension is under active development, and breaking changes may be introduced. |
0 commit comments