github caiolandgraf/grove v1.5.3

latest release: v1.5.4
8 hours ago

What's new

make:relations command

  • Added grove make:relations to infer GORM relationships from foreign keys.
  • By default, it generates only the has-many side on target models.
  • Added --with-belongs-to to also generate belongs-to fields on source models.

New make:relations flags

  • --model: process only specific source model(s) (repeatable or comma-separated).
  • --verbose: print detailed relation inference logs.
  • --dry-run: preview changes without writing files.
  • --path: select custom models directory.

Improvements

  • FK inference now validates supported field types (e.g. string, ints, uuid.UUID).
  • Better pluralization for relation collection fields in PascalCase names.
  • Prevents duplicate relation fields.

Documentation

  • Updated README.md with make:relations usage, flags and examples.
  • Updated docs site data in docs/src/data/docs.js with a dedicated command section.

Install / upgrade:

go install github.com/caiolandgraf/grove@latest

Don't miss a new grove release

NewReleases is sending notifications on new releases.