Works with what you already use.

Four databases, five ways to describe a schema, four validator libraries and three file formats. Each entry shows the command that uses it.

Databases

Read the schema from a live database, and insert generated rows straight back into it.

Connecting to a database
Databases
NameDetailsExample
PostgreSQLpostgres:// or postgresql:// URLs.ghostrow seed --db postgres://user:pass@localhost:5432/shop
MySQL and MariaDBPlus and upmysql:// or mariadb:// URLs.ghostrow seed --db mysql://user:pass@localhost:3306/shop
SQLitesqlite: URLs or a path to a .db or .sqlite file. No native modules needed.ghostrow seed --db sqlite:./dev.db
SQL Server and Azure SQLPlus and upmssql:// or sqlserver:// URLs.ghostrow seed --db mssql://sa:pass@localhost:1433/shop

Schema sources

No database running? Point --schema at a file or a folder and Ghostrow reads the tables from it.

ORM and schema files
Schema sources
NameDetailsExample
SQL DDLCREATE TABLE files in the Postgres, MySQL, SQLite or SQL Server dialect.ghostrow seed --schema db/schema.sql --dry-run
Prismaschema.prisma, with the dialect taken from its datasource.ghostrow seed --schema prisma/schema.prisma --dry-run
Djangomodels.py files across your apps.ghostrow seed --schema ./ --dry-run
SQLAlchemyDeclarative models with __tablename__, or Table() definitions.ghostrow seed --schema app/models.py --dry-run
LaravelMigrations that use Schema::create and Schema::table.ghostrow seed --schema database/migrations --dry-run

Validation rules from code

With --code, Ghostrow also reads your validators and follows the rules the schema can’t express: allowed values, lengths, patterns and ranges.

Code-aware rules
Validation rules from code
NameDetailsExample
ZodPro and Maxz.object schemas in TypeScript and JavaScript.ghostrow seed --schema db/schema.sql --code src/
PydanticPro and MaxBaseModel classes and their Field constraints.ghostrow seed --db $DATABASE_URL --code app/
DjangoPro and MaxModel field options such as choices and max_length.ghostrow seed --schema ./ --code ./
LaravelPro and Maxvalidate() and rules() arrays in controllers and form requests.ghostrow seed --db $DATABASE_URL --code app/

Output

Insert into the database you connected to, or write files you can check in or load elsewhere.

Output
NameDetailsExample
Direct insertRows go in parent tables first, inside a transaction.ghostrow seed --db postgres://localhost/shop --rows 5000
CSVOne file per table.ghostrow seed --schema schema.sql --out fixtures/ --format csv
JSONOne array of objects per table.ghostrow seed --schema schema.sql --out fixtures/ --format json
SQLINSERT statements, one file per table.ghostrow seed --schema schema.sql --out fixtures/ --format sql

AI providers (optional)

Off by default. If you set your own key, Ghostrow asks the provider about columns its engine is unsure of. Only schema text is sent, never rows.

AI providers
AI providers (optional)
NameDetailsExample
AnthropicPro and MaxGHOSTROW_AI_PROVIDER=anthropic with ANTHROPIC_API_KEY.GHOSTROW_AI_PROVIDER=anthropic ghostrow seed --schema schema.sql --dry-run
OpenAIPro and MaxGHOSTROW_AI_PROVIDER=openai with OPENAI_API_KEY.GHOSTROW_AI_PROVIDER=openai ghostrow seed --schema schema.sql --dry-run
Google GeminiPro and MaxGHOSTROW_AI_PROVIDER=gemini with GEMINI_API_KEY.GHOSTROW_AI_PROVIDER=gemini ghostrow seed --schema schema.sql --dry-run

Install channels

The same release everywhere. Checksums for every file are on the download page.

Download page
Install channels
NameDetailsExample
npmNode.js 20 or later.npm i -g ghostrow
PyPIPlatform wheels with the binary inside; no Node.js needed.pip install ghostrow
HomebrewmacOS and Linux.brew install ghostrowlabs/tap/ghostrow
InstallersmacOS .pkg, Debian and Ubuntu .deb, Windows .msi, and archives for every platform.curl -fsSL https://ghostrow.com/install.sh | sh