{ err := cmd.run(ctx, root, args) return cmd.afterSetup(ctx, root, args, err) } func (cmd *Cmd) run(ctx context.Context, root string, args []string) error { if err := cmd.beforeSetup(ctx, root, args); err != nil { return err } for _, p := range cmd.ScopedPlugins() { if s, ok := p.(Setuper); ok { if err := s.Setup(ctx, root, args); err != nil { return err } } } return nil } Setting up for Success! github.com/gobuffalo/buffalo-cli/v2/cli/cmds/setup#Cmd.Main