Welcome to easycli’s documentation!¶
Just a wrapper around python argparse
module to easily develop nested
command line applications with autocompletion support like git
.
from easycli import Root, Argument
class MyApp(Root):
__completion__ = True
__help__ = '...'
__arguments__ = [
Argument('-v', '--version', action='store_true', help='...')
]
def __call__(self, args):
if args.version:
print('0.1.0')
return
self._parser.print_help()
if __name__ == '__main__':
MyApp.quickstart()