This Gemini CLI extension provides a set of tools to interact with PostgreSQL instances. It allows you to manage your databases, execute queries, and explore schemas directly from the Gemini CLI, using natural language prompts.
- 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.
- Connect to PostgreSQL: Securely connect to your PostgreSQL instances.
- Explore Database Schema: List databases, tables, views, and schemas.
- Query your Database: Execute SQL queries against your database.
- list-tables: Use this tool to list tables and descriptions.
- execute-sql: Use this tool to execute any SQL statement.
Before you begin, ensure you have the following:
- Gemini CLI installed.
- A running PostgreSQL instance.
To install the extension, use the gemini extensions install
command:
gemini extensions install github.com/gemini-cli-extensions/postgresql.git
POSTGRES_HOST
: The hostname or IP address of the PostgreSQL server.POSTGRES_PORT
: The port number of the PostgreSQL server.POSTGRES_DATABASE
: The name of the database to connect to.POSTGRES_USER
: The username for authentication.POSTGRES_PASSWORD
: The password for authentication.
- Explore Schemas and Data
- Generate code
This extension executes commands against your PostgreSQL database. Always review the generated SQL queries before execution, especially for write operations.
This is not an officially supported Google product. This extension is under active development, and breaking changes may be introduced.