I have a python script that is supposed to be used as a small cli program. This is google's recommendations on how to document cli syntax. I was wondering, are there similar recommendations, or specifications, perhaps from GNU?
Asked
Active
Viewed 198 times
2 Answers
7
In the Python world, by far the most common is "do what argparse
does". The reasons for this are hopefully obvious.

Philip Kendall
- 22,899
- 9
- 58
- 61
-
This will get a new projected started very fast on the right foot: import [typer](https://pypi.org/project/typer), `def main(...` with type [annotations](https://docs.python.org/3/library/typing.html), then finally `typer.run(main)` – J_H Jun 29 '23 at 20:31
2
There is a GNU Standard which is slightly more than to follow the POSIX Standard, which is used by a great number of programs and a good template to follow.
There is a style for Windows, but it is wretched so I'm not going to cite it, don't use it, stick to above.
In the specific case of python, follow the accepted answer.

whatsisname
- 27,463
- 14
- 73
- 93