For reference, the official docs can be found here at github.
To answer your specific question, you can use an ellipse ...
with your optional option [--my-option]
and specify that your option takes an argument.
I.e. [--my-option=ARG]...
or [--my-option=<arg>]...
Example:
"""
Usage:
my_program [--comment=ARG]... FILE
Arguments:
FILE An argument for passing in a file.
Options:
--comment Zero or more comments
"""
By specifying it as [--comment=<arg>]...
you ensure that opt['--comment'] is a list of all the specified comments.
Executing: my_program --comment=ASDF --comment=QWERTY my_file
Leads to:
if __name__ == '__main__':
opts = docopt(__doc__)
opts['--comment'] == ['ASDF', 'QWERTY']
opts['FILE'] == 'my_file'