| Crates.io | qail |
| lib.rs | qail |
| version | 0.14.22 |
| created_at | 2025-12-20 16:13:23.476799+00 |
| updated_at | 2026-01-10 13:51:56.630895+00 |
| description | Schema-first database toolkit - migrations, diff, lint, and query generation |
| homepage | |
| repository | https://github.com/qail-io/qail |
| max_upload_size | |
| id | 1996668 |
| size | 305,526 |
Schema-first database toolkit — Pull, diff, migrate, validate.
[!CAUTION] Alpha Software: QAIL is currently in alpha. While we strive for stability, the API is evolving to ensure it remains ergonomic and truly AST-native. Do not use in production environments yet.
cargo install qail
# Extract schema from database
qail pull postgres://user:pass@host/db -o schema.qail
# Compare two schemas
qail diff old.qail new.qail
# Check best practices
qail lint schema.qail
# Format QAIL files
qail fmt schema.qail
# Create a new migration
qail migrate create add_users_table --author "dev"
# Preview migration SQL
qail migrate plan old.qail:new.qail
# Apply migrations
qail migrate up old.qail:new.qail postgres://...
# Rollback migrations
qail migrate down postgres://...
# Interactive query transpiler
qail repl
> get users fields id, name where active = true
SELECT id, name FROM users WHERE active = true
QAIL uses a concise, version-controlled schema format:
-- schema.qail
table users (
id uuid primary key default gen_random_uuid(),
email text not null unique,
created_at timestamptz default now()
);
table orders (
id uuid primary key,
user_id uuid references users(id),
total numeric(10,2)
);
| Crate | Purpose |
|---|---|
| qail | CLI tool for schema and migration operations |
| qail-core | AST builder, parser, expression helpers |
| qail-pg | PostgreSQL driver (AST → wire protocol) |
MIT
We welcome issue reports on GitHub! Please provide detailed descriptions to help us reproduce and fix the problem. We aim to address critical issues within 1-5 business days.