How to set public permissions without using Strapi Admin

Want to know too! That’s the only reason I’m logging into the Strapi dashboard these days, very often after a brief moment of “Why is my endpoint not working?”. Would be great to be able to programmatically set that and push it out with the commit.