The nyaml tool is a Python package that provides a command line interface for converting NeXus application definitions
or base classes from the nxdl.xml format into the yaml format and vice versa.
pip install nyaml
The converter can be called by the command nyaml2nxdl.
You can find the full documentation of the tool here.