python
pip install pycli
python
from pycli import Command, command
class MyCLI(Command):
def __init__(self):
super().__init__('mycli', '1.0', 'My Command-Line Interface')
@command
def hello(self, name):
"""
Prints a greeting message with the given name.
"""
print('Hello, ' + name + '!')
if __name__ == '__main__':
MyCLI().start()
python
python mycli.py hello John