> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ellomas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedling Overview

> A schema-aware relational test data factory for Postgres and MySQL.

# Seedling

**Relational Test Data Factory**

[![CI](https://github.com/tomiwa-a/seedling/actions/workflows/ci.yml/badge.svg)](https://github.com/tomiwa-a/seedling/actions/workflows/ci.yml)
[![Go Version](https://img.shields.io/badge/Go-1.25-blue)](https://go.dev/)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

Seedling is a schema-aware test data generator. Point it at a Postgres or MySQL schema and it produces referentially-integer rows that respect every **foreign key**, **unique constraint**, and **column type**.

It auto-detects column types from your schema, maps them to built-in generators, and streams rows in dependency order (topological sort by FK). You can override any column with custom generators via a simple YAML DSL.

## Key Features

* **Schema introspection** — Reads live Postgres and MySQL databases
* **Auto-generated data** — Column names and types map to realistic generators (email, name, phone, geography, finance, and more)
* **Generator overrides** — YAML-based DSL to customize per-column generation
* **Deterministic output** — Same schema + seed + count = byte-identical results
* **Multiple output formats** — SQL, CSV, JSON Lines, Parquet, direct DB insert, Postgres COPY
* **Circular FK handling** — Self-referencing tables and circular dependency loops
* **Fast streaming** — Parallel generation of independent table subgraphs
* **Watch mode** — Auto-regenerate on schema changes

## Quick Example

```bash theme={null}
# Introspect a live database
seedling introspect --db postgres://localhost:5432/mydb --output schema.yaml

# Generate 10,000 rows to a SQL file
seedling generate --count 10000 --output seed.sql

# Deterministic generation
seedling generate --count 50000 --seed 42 --output seed.sql
```

## Database Support

| Database        | Introspection               | Output                           |
| --------------- | --------------------------- | -------------------------------- |
| Postgres        | Full (`information_schema`) | INSERT, COPY protocol, direct DB |
| MySQL / MariaDB | Full (`information_schema`) | INSERT, direct DB                |
