Add CLI API docs
MODIFY
dev-requirements.txt
dev-requirements.txt
@@ -4,3 +4,4 @@ pyyaml
pytest
wheel
pytest-cov
+sphinxcontrib-autoprogram

MODIFY
docs/source/conf.py
docs/source/conf.py
@@ -33,7 +33,9 @@ import recommonmark.parser
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
-extensions = ['sphinx.ext.extlinks']
+extensions = ['sphinx.ext.extlinks',
+ 'sphinxcontrib.autoprogram',
+ ]
extlinks = {
'issue': ('https://github.com/jupyter/repo2docker/issues/%s', 'Issue #'),

MODIFY
docs/source/usage.rst
docs/source/usage.rst
@@ -107,4 +107,12 @@ be used by docker directly.
jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes
+
+Command line API
+================
+
+.. autoprogram:: repo2docker.__main__:argparser
+ :prog: jupyter-repo2docker
+
+
.. _Pytudes: https://github.com/norvig/pytudes

MODIFY
repo2docker/__main__.py
repo2docker/__main__.py
@@ -194,6 +194,8 @@ def get_argparser():
return argparser
+argparser = get_argparser()
+
def make_r2d(argv=None):
if argv is None:

Add CLI API docs