Best way to self document NPM scripts

I’m using Sphinx to pull out and publish documentation about a JS project. I also want to extract the data from the NPM scripts, so I can explain usage.

anybody have a good workflow to do this?