Skip to content

gemini-cli-extensions/postgres

Repository files navigation

Gemini CLI Extension - PostgreSQL

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.

Features

  • 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.

Supported Tools

  • list-tables: Use this tool to list tables and descriptions.
  • execute-sql: Use this tool to execute any SQL statement.

Prerequisites

Before you begin, ensure you have the following:

  • Gemini CLI installed.
  • A running PostgreSQL instance.

Installation

To install the extension, use the gemini extensions install command:

gemini extensions install github.com/gemini-cli-extensions/postgresql.git

Configuration

  • 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.

Usage

  • Explore Schemas and Data
  • Generate code

Security

This extension executes commands against your PostgreSQL database. Always review the generated SQL queries before execution, especially for write operations.

Disclaimer

This is not an officially supported Google product. This extension is under active development, and breaking changes may be introduced.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published