Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tommy-acf5e428.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

seedling introspect

Reads a live database schema and writes it as a structured YAML or JSON file.

Usage

seedling introspect --db <DSN> [options]

Flags

FlagDescriptionDefault
--dbDatabase connection stringRequired
--outputOutput file pathstdout
--formatOutput format (yaml or json)yaml

Examples

Postgres

seedling introspect \
  --db postgres://user:pass@localhost:5432/mydb \
  --output schema.yaml

MySQL

seedling introspect \
  --db mysql://user:pass@localhost:3306/mydb \
  --output schema.yaml

JSON Output

seedling introspect \
  --db postgres://localhost:5432/mydb \
  --format json --output schema.json

Output Structure

tables:
  - name: users
    columns:
      - name: id
        type: serial
        nullable: false
        primary_key: true
      - name: email
        type: varchar
        nullable: false
        unique: true
      - name: role
        type: varchar
        nullable: true
    foreign_keys: []
  - name: orders
    columns:
      - name: id
        type: serial
        primary_key: true
      - name: user_id
        type: integer
        nullable: false
    foreign_keys:
      - column: user_id
        ref_table: users
        ref_column: id

Auto-detection

The introspector auto-detects the database engine from the DSN:
  • postgres:// → Postgres (pgx driver)
  • mysql:// → MySQL/MariaDB (go-sql-driver)