This contrib extension, sphinxcontrib.autoprogram , provides an automated way to document CLI programs. It scans arparser.ArgumentParser object, and then expands it into a set of .. program:: and .. option:: directives.

Install using pip :

$ pip install sphinxcontrib-autoprogram

You can find the documentation from the following URL:

https://sphinxcontrib-autoprogram.readthedocs.io/