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| Name | Details | Example |
|---|---|---|
| PostgreSQL | postgres:// or postgresql:// URLs. | ghostrow seed --db postgres://user:pass@localhost:5432/shop |
| MySQL and MariaDBPlus and up | mysql:// or mariadb:// URLs. | ghostrow seed --db mysql://user:pass@localhost:3306/shop |
| SQLite | sqlite: 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 up | mssql:// 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| Name | Details | Example |
|---|---|---|
| SQL DDL | CREATE TABLE files in the Postgres, MySQL, SQLite or SQL Server dialect. | ghostrow seed --schema db/schema.sql --dry-run |
| Prisma | schema.prisma, with the dialect taken from its datasource. | ghostrow seed --schema prisma/schema.prisma --dry-run |
| Django | models.py files across your apps. | ghostrow seed --schema ./ --dry-run |
| SQLAlchemy | Declarative models with __tablename__, or Table() definitions. | ghostrow seed --schema app/models.py --dry-run |
| Laravel | Migrations 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| Name | Details | Example |
|---|---|---|
| ZodPro and Max | z.object schemas in TypeScript and JavaScript. | ghostrow seed --schema db/schema.sql --code src/ |
| PydanticPro and Max | BaseModel classes and their Field constraints. | ghostrow seed --db $DATABASE_URL --code app/ |
| DjangoPro and Max | Model field options such as choices and max_length. | ghostrow seed --schema ./ --code ./ |
| LaravelPro and Max | validate() 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.
| Name | Details | Example |
|---|---|---|
| Direct insert | Rows go in parent tables first, inside a transaction. | ghostrow seed --db postgres://localhost/shop --rows 5000 |
| CSV | One file per table. | ghostrow seed --schema schema.sql --out fixtures/ --format csv |
| JSON | One array of objects per table. | ghostrow seed --schema schema.sql --out fixtures/ --format json |
| SQL | INSERT 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| Name | Details | Example |
|---|---|---|
| AnthropicPro and Max | GHOSTROW_AI_PROVIDER=anthropic with ANTHROPIC_API_KEY. | GHOSTROW_AI_PROVIDER=anthropic ghostrow seed --schema schema.sql --dry-run |
| OpenAIPro and Max | GHOSTROW_AI_PROVIDER=openai with OPENAI_API_KEY. | GHOSTROW_AI_PROVIDER=openai ghostrow seed --schema schema.sql --dry-run |
| Google GeminiPro and Max | GHOSTROW_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| Name | Details | Example |
|---|---|---|
| npm | Node.js 20 or later. | npm i -g ghostrow |
| PyPI | Platform wheels with the binary inside; no Node.js needed. | pip install ghostrow |
| Homebrew | macOS and Linux. | brew install ghostrowlabs/tap/ghostrow |
| Installers | macOS .pkg, Debian and Ubuntu .deb, Windows .msi, and archives for every platform. | curl -fsSL https://ghostrow.com/install.sh | sh |