Documentation

Everything you need to master SQL2.AI for database development.

K

Quick Start

Get up and running in under 5 minutes.

1

Install SQL2.AI

Install the CLI tool globally using npm or your preferred package manager.

Terminal
$npm install -g @sql2ai/cli
2

Configure Your Connection

Set up your database connection using the interactive configuration wizard.

Terminal
$sql2ai config init
SQL2.AI Configuration Wizard ? Database type: PostgreSQL ? Connection string: postgres://user@localhost/mydb ? Save connection as: dev ✓ Configuration saved to ~/.sql2ai/config.yaml
3

Run Your First Analysis

Analyze your database schema to discover issues and optimization opportunities.

Terminal
$sql2ai analyze --connection dev
Connecting to PostgreSQL... Analyzing schema... Schema Analysis Complete Tables: 23 | Views: 5 | Procedures: 12 ✓ All tables have primary keys ⚠ 2 tables missing foreign keys ⚠ 3 unused indexes detected ✓ Naming conventions: 98% compliant Full report saved to ./sql2ai-report.html

Browse Documentation

Find guides, references, and tutorials for every part of SQL2.AI.

Getting Started

Installation, configuration, and your first analysis.

CLI Reference

Complete command-line interface documentation.

MCP Integration

Using SQL2.AI with Claude and other AI assistants.

SDK & API

Programmatic access for custom integrations.

Features

Deep dives into each SQL2.AI capability.