in tools/invoke.py [0:0]
def parseArgs():
parser = argparse.ArgumentParser(description='initialize and run an OpenWhisk action container')
parser.add_argument('-v', '--verbose', help='verbose output', action='store_true')
parser.add_argument('--host', help='action container host', default=dockerHost())
parser.add_argument('-p', '--port', help='action container port number', default=8080, type=int)
subparsers = parser.add_subparsers(title='available commands', dest='cmd')
initmenu = subparsers.add_parser('init', help='initialize container with src or zip/tgz file')
initmenu.add_argument('-b', '--binary', help='treat artifact as binary', action='store_true')
initmenu.add_argument('main', nargs='?', default='main', help='name of the "main" entry method for the action')
initmenu.add_argument('artifact', help='a source file or zip/tgz archive')
runmenu = subparsers.add_parser('run', help='send arguments to container to run action')
runmenu.add_argument('payload', nargs='?', help='the arguments to send to the action, either a reference to a file or an inline JSON object', default=None)
if argcomplete:
argcomplete.autocomplete(parser)
return parser.parse_args()