Repository navigation
Missing docs for CLI usage #4492
Description
Activity
- addedtype: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivitytype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
on Dec 5, 2018 What specifically do you want added to the usage page?
It will be nice to add a full pytest CLI reference, which is a online version of
pytest --helpIt can be generated simply by https://github.com/click-contrib/sphinx-click.
I can try to made a PR for that, if this is reasonable.
- removedtype: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity
on Dec 5, 2018 @jxltom pytest does not use click however
Oh, thanks for the kind reminder.
It looks like pytest using
argparse? There is also a https://sphinx-argparse.readthedocs.io/en/stable/ for that. But I have never used that before. Let's give it a try...Reacted by Daniel Hahler@jxltom any luck with that?
I guess it is difficult given how pytest generates the parser etc.I guess the best would be to just have the output from
--helpverbatim, no? Or do you expect it to be clickable / linked to more docs?
(with regard to that I think the help should be verbose enough to not require additional docs, especially since there is no man page)I've played a bit with https://github.com/invenia/sphinxcontrib-runcmd (and extended it already), which would allow to get
pytest --helps output into a separate page, which could be linked to then.- added 3 commits that reference this issue
on Nov 11, 2025 - added a commit that references this issue
on Nov 25, 2025 - added 2 commits that reference this issue
on Feb 4, 2026 - added a commit that references this issue
on Jul 4, 2026 - added a commit that references this issue
on Jul 19, 2026 - added a commit that references this issue
on Aug 31, 2026
It looks like I can only access the CLI usage such as options and argument via
pytest --help. It will be nice to add this part to docs, so users can read it as a reference online without invoking pytest.pip listof the virtual environment you are using