2
0 Comments

Built an open-source DB seeder that infers cross-column state logic automatically

Hey IH,

After Snaplet shut down in mid-2024, many developers went back to manual seeding scripts or primitive generators (Faker/copycat). The biggest pain point with those tools is cross-column state cohesion — e.g. generating status = 'cancelled' while still populating shipped_at with a timestamp and leaving cancellation_reason empty.

I built an open-source, schema-agnostic CLI tool (ai-db-seeder) in Python using SQLAlchemy introspection + LLM structured generation.

What it does:

1. Introspects your DB schema (PostgreSQL, SQLite, MySQL)

2. Topologically sorts tables so FK insertion order is always correct

3. Zero-shot infers state-machine logic per row — no manual per-table rules needed

Stack: Python 3.12, SQLAlchemy, Typer, OpenRouter/LLM.

Repo: https://github.com/doriangry49-collab/ai-db-seeder

Would love feedback, especially from anyone who's hit this exact problem with Faker or Snaplet before. This is a very early MVP (built in ~2 days) so brutal honesty welcome.

posted toAvatar for product AI DB Seeder
AI DB Seeder