sqlbot ⚡
Talk to your databases in natural language. An AI-powered SQL assistant with support for PostgreSQL, MySQL, SQLite, and more.
Installation
Install sqlbot globally via npm:
npm install -g sqlbot
Usage
To start sqlbot, simply run:
sqlbot
This will start the local server and automatically open the application in your browser at http://localhost:1121.
CLI Options
-p, --port <port> | Port to listen on (default: 1121) |
-H, --hostname <host> | Hostname to bind to (default: 0.0.0.0) |
--no-open | Don't open browser automatically |
-v, --version | Show version |
-h, --help | Show help message |
Example:
sqlbot --port 3005 --no-open
Configuration
1. AI Provider Setup
To use AI for SQL generation and chat, you need to configure an AI provider:
- Open
sqlbot in your browser.
- Navigate to AI Providers (or visit
/ai-providers).
- Click Add Provider.
- Choose between Google AI (Gemini), Groq, or OpenAI.
- Enter your API key and save.
- Restart
sqlbot for the changes to take effect.
[!NOTE]
Your API keys are stored securely in ~/.sqlbot/ai-providers.json.
2. Database Connections
Connect your databases to start querying in natural language:
- Navigate to Connections (or visit
/connections).
- Click Add Connection.
- Select your database type (PostgreSQL, MySQL, SQLite, etc.) and enter the connection details.
- Once connected,
sqlbot will index your schema to provide accurate SQL generation.
Features
- Natural Language to SQL: Just ask your database questions in plain English.
- Smart Charting: Automatically generates charts and visualizations from your data.
- Multi-DB Support: Works with PostgreSQL, MySQL, SQLite, and more.
- Local & Private: Your connection strings and API keys stay on your machine.