AI-powered database schema generator. Describe your data model in plain English, get production SQL.
Generate database schemas from plain English. Supports PostgreSQL, MySQL, and SQLite.
npm install -g ai-schema
npx ai-schema "e-commerce with users, products, orders" # Outputs PostgreSQL CREATE TABLE statements npx ai-schema "blog with posts, comments, tags" --dialect mysql # MySQL syntax npx ai-schema "SaaS with teams, members, billing" -o schema.sql # Write to file
export OPENAI_API_KEY=sk-...-d, --dialect- postgresql, mysql, or sqlite (default: postgresql)-o, --output- Write schema to a file
MIT