sqlchat  by sqlchat

Chat-based SQL client using natural language

created 2 years ago
5,342 stars

Top 9.6% on sourcepulse

GitHubView on GitHub
Project Summary

SQL Chat is a chat-based SQL client designed to translate natural language queries into SQL commands for database operations. It targets developers and data professionals seeking a more intuitive interface than traditional SQL clients, enabling query, modification, addition, and deletion of data through conversational interaction.

How It Works

Built with Next.js, SQL Chat leverages large language models (LLMs) to interpret natural language prompts and generate corresponding SQL queries. This approach aims to simplify database interactions by abstracting away complex SQL syntax, making database management more accessible and efficient. It supports multiple database backends and allows for self-hosting of AI models via Ollama for greater control over data privacy and costs.

Quick Start & Requirements

  • Docker: docker run --name sqlchat --platform linux/amd64 --env NEXTAUTH_SECRET="$(openssl rand -hex 5)" --env OPENAI_API_KEY=<<YOUR OPENAI KEY>> -p 3000:3000 --hostname localhost sqlchat/sqlchat
  • Prerequisites: OpenAI API Key. For self-hosted AI models, Ollama is recommended. For database features (accounts, quotas), a PostgreSQL instance is required.
  • Setup: Local development involves pnpm i, pnpm prisma generate, and configuring .env with API keys and database URLs.
  • Docs: sqlchat.ai

Highlighted Details

  • Supports MySQL, PostgreSQL, MSSQL, and TiDB Cloud.
  • Option to use self-hosted AI models via OPENAI_API_ENDPOINT.
  • Enables account systems, per-user quotas, and payment processing when a database is configured.
  • sqlchat.ai service requires whitelisting 0.0.0.0 for IP connections.

Maintenance & Community

The project appears to be actively maintained, with a presence on GitHub and community support channels likely available through linked social media or Discord/Slack if provided.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The sqlchat.ai service uses dynamic IPs, necessitating broad IP whitelisting (0.0.0.0) for database connections, which may be a security concern. The project's reliance on OpenAI's API means performance and availability are subject to OpenAI's service.

Health Check
Last commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
0
Star History
202 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.