Installation & setup
The Studio runs in the browser with nothing to install. For terminal workflows, add the CLI to your project and authenticate once.
npm install -g @tablecraftai/cli
tablecraft login
tablecraft pull --schema billingEverything you need to design, build and export database schemas with TableCraftAI.
The Studio runs in the browser with nothing to install. For terminal workflows, add the CLI to your project and authenticate once.
npm install -g @tablecraftai/cli
tablecraft login
tablecraft pull --schema billingOpen the Studio, name the schema, and pick a target database. Describe the product in the AI dialog to draft a starting point, or press New table to build it by hand.
# or start from a template
tablecraft init --template saas --name billingSelect a table on the canvas to open the properties panel. Add columns, choose types, and mark primary keys, unique constraints and nullability.
create table members (
id uuid primary key,
workspace_id uuid not null,
email text not null unique,
role text not null
);Set a column's foreign key target in the properties panel. TableCraftAI draws the relationship, adds an index and includes the cascade rule in your export.
alter table members
add constraint members_workspace_fk
foreign key (workspace_id) references workspaces(id)
on delete cascade;Press Export to generate SQL for your dialect, plus Prisma models, TypeScript interfaces, Python dataclasses and DBML. Copy it or download the file.
tablecraft export --format prisma > schema.prisma
tablecraft export --format sql --dialect mysql > schema.sql