Metadata export (tracker)

Hi all,
I'm looking at ways to export specific metadata with "dependencies" from DHIS, initially a tracker program. The goal is to export the program with all dependencies (program stage(s), data elements, option sets, data entry form, program validation etc) as easily as possible. Before I try to script something myself I thought I'd check if anyone else has already done something similar and have tools or experiences to share, OR if there are some clever ways to do this already through GUI/API that I haven't been able to identify?