Automatically follow popular communities?

I have a personal Lemmy instance that I’ve set up just for fun. When I browse Lemmy, I usually look at All rather than local or subscribed, because I find a lot of interesting communities I wouldn’t have otherwise found. The problem is, since I’m the only user on the instance, All is exactly the same as Subscribed.

Is anyone aware of a bot, or could provide some API pointers, that would allow me to set up a user on my instance that just looks at the top posts on All on a large Lemmy instance and follows those communities? That way my instances will federate with them and I’ll have a useful All feed again.

Thanks!