Installation
Install the Text2SQL package and your database-specific adapter.Requirements
- Node.js - LTS version (20+)
- TypeScript - 5.0+ (recommended)
- Database client - Depends on your database (see below)
Core Package
Install the main Text2SQL package:- Core Text2SQL engine
- Context management system
- All database adapters (SQLite, PostgreSQL, SQL Server, MySQL, BigQuery)
- Synthesis tools for training data generation
Database-Specific Setup
Depending on your database, you’ll need additional peer dependencies.PostgreSQL
Install thepg client:
SQLite
SQLite requires no additional dependencies. Use Node.js nativesqlite3 or better-sqlite3:
SQL Server
Install themssql client:
MySQL / MariaDB
Install themysql2 client:
BigQuery
BigQuery support is included in the package:AI Model Provider
Text2SQL works with any model provider supported by the Vercel AI SDK. Install your preferred provider:OpenAI
Anthropic
Groq
Google Generative AI
Context Store
Install the context management package:- Context engine for schema and conversation management
- Fragment types (term, hint, guardrail, etc.)
- Storage adapters (in-memory, SQLite)
Verify Installation
Create a simple test file to verify everything is installed correctly:test.ts
Next Steps
Getting Started
Write your first natural language query
Database Adapters
Configure your database adapter