Kotlin / kotlinx-cli

Pure Kotlin implementation of a generic CLI parser.
Apache License 2.0
913 stars 70 forks source link

Option to add program description to the help text. #90

Open dmitry-ryadnenko-izettle opened 2 years ago

dmitry-ryadnenko-izettle commented 2 years ago

It would be nice to be able to add a more detailed program description to the help text. Like this.

Name: example
Description: runs example
Usage: example options_list
Arguments: 
    input -> Input file { String }
    output -> Output file name (optional) { String }
codeape2 commented 1 year ago

Python's argparse (https://docs.python.org/3/library/argparse.html) has description and epilog, I suggest to implement something similar in kotlinx-cli as well.

parser = argparse.ArgumentParser(
    prog='ProgramName',
    description='What the program does',
    epilog='Text at the bottom of help'
)