From Source (Development)
Use this path when you want to contribute or run the latest changes.
Clone and install
git clone https://github.com/nadeem4/nl2sql.git
cd nl2sql
python -m venv venv
source venv/bin/activate
pip install -e packages/adapter-sdk
pip install -e packages/adapter-sdk
pip install -e "packages/nl2sql[postgres]"
pip install -e packages/api
Add any other adapters you need (mysql, mssql, duckdb, sqlite).
Configuration
Create config files in your working directory:
configs/datasources.yamlconfigs/llm.yamlconfigs/policies.jsonconfigs/secrets.yaml(optional)
Start from configs/*.example.yaml and configs/*.example.json.
Run locally
Python API:
API service (Docker):
docker build -f packages/api/Dockerfile.dev --build-arg NL2SQL_EXTRAS=postgres -t nl2sql-api-dev .
docker run --rm -p 8000:8000 nl2sql-api-dev
See Docker (REST API) for adapter extras, environment selection and mounting config files.