We currently have an API to edit it
What I propose is to extend it with a couple of new function:
Open/Create Menu File : Open/Create Menu File return reference to the menu.

Write Menu File: From a reference save the file to disk

Close Menu File: Close the reference to the menu file
Dany