SQL Chat
A self-hosted SQL client lets you query and edit databases through chat, with Docker deployment and support for OpenAI or local models through Ollama.
SQL Chat is a SQL client for people who want to work with databases using natural language. Its chat interface lets you ask for data and request database changes without writing every SQL statement yourself.
- Query through chat: Ask for data in natural language and use the conversation to work with a connected database.
- Edit database data: Request additions, modifications and deletions through the same interface.
- Database support: Connect to MySQL, PostgreSQL, Microsoft SQL Server, TiDB Cloud and OceanBase.
You can self-host SQL Chat with Docker or use the hosted service at sqlchat.ai. It's open source under the MIT license. A personal deployment can run without a separate database for accounts; deployments with an account system use PostgreSQL to store account and usage information.
For AI responses, SQL Chat can use OpenAI with your API key or a self-hosted model through Ollama. OpenAI use requires access to its cloud API, so self-hosting the client alone doesn't keep AI requests local. Ollama provides a local model backend.
The hosted service connects to your database from dynamic IP addresses and requires a database IP whitelist that allows connections from any address. Self-hosting avoids that hosted-service requirement.