feat(04-01): generate model, migration, and command artifacts

Add make:model, make:migration and make:command with plugin-id
inference, duplicate rejection, and a deterministic registry refresh
that leaves handwritten plugin.go untouched.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-18 13:39:03 +02:00
parent 1edf9d7e4c
commit d8c56509f2
8 changed files with 1050 additions and 4 deletions

View File

@@ -65,9 +65,14 @@ func wrap(c Command, out Output) (*cobra.Command, error) {
for _, flag := range c.Flags {
if flag.Shorthand != "" {
cmd.Flags().StringP(flag.Name, flag.Shorthand, flag.Default, flag.Description)
continue
} else {
cmd.Flags().String(flag.Name, flag.Default, flag.Description)
}
if flag.Bare {
if f := cmd.Flags().Lookup(flag.Name); f != nil {
f.NoOptDefVal = "true"
}
}
cmd.Flags().String(flag.Name, flag.Default, flag.Description)
}
return cmd, nil
}