I just noticed that there is a topic and category import/export command line tool. This solves half my problem, as I can now put all of my customizations in a LMS category and export:
This will make it easy/possible to include the exported JSON file with my set of scripts that support creating badges for assignments and so on.