Permit.io policy builder is available for free and let you export the Rego code using their GitOps feature available via their CLI
Disclaimer: I'm working there