How to programmatically assign roles like super admin or editor roles while launching the strapi in local

how to programmatically assign roles like super admin or editor roles while launching the strapi in local