@click.group()<EOL>@click.option('<STR_LIT>',  help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', help='<STR_LIT>')<EOL>@click.option('<STR_LIT>', help='<STR_LIT>',<EOL>default="<STR_LIT:default>")<EOL>@click.option('<STR_LIT>', type=click.File('<STR_LIT:r>'), default='<STR_LIT>')<EOL>@pass_config<EOL>def cli(config, server, api_key, all, credentials, project):
<EOL>home = expanduser("<STR_LIT>")<EOL>if os.path.isfile(os.path.join(home, '<STR_LIT>')):<EOL><INDENT>config.parser.read(os.path.join(home, '<STR_LIT>'))<EOL>config.server = config.parser.get(credentials,'<STR_LIT>')<EOL>config.api_key = config.parser.get(credentials, '<STR_LIT>')<EOL>try:<EOL><INDENT>config.all = config.parser.get(credentials, '<STR_LIT:all>')<EOL><DEDENT>except ConfigParser.NoOptionError:<EOL><INDENT>config.all = None<EOL><DEDENT><DEDENT>if server:<EOL><INDENT>config.server = server<EOL><DEDENT>if api_key:<EOL><INDENT>config.api_key = api_key<EOL><DEDENT>if all:<EOL><INDENT>config.all = all<EOL><DEDENT>try:<EOL><INDENT>config.project = json.loads(project.read())<EOL><DEDENT>except JSONDecodeError as e:<EOL><INDENT>click.secho("<STR_LIT>", fg='<STR_LIT>')<EOL>if e.msg == '<STR_LIT>':<EOL><INDENT>e.msg += "<STR_LIT>"<EOL><DEDENT>click.echo("<STR_LIT>" % (e.doc, e.msg, e.lineno, e.colno))<EOL>raise click.Abort()<EOL><DEDENT>try:<EOL><INDENT>project_schema = {<EOL>"<STR_LIT:type>": "<STR_LIT:object>",<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:name>": {"<STR_LIT:type>": "<STR_LIT:string>"},<EOL>"<STR_LIT>": {"<STR_LIT:type>": "<STR_LIT:string>"},<EOL>"<STR_LIT:description>": {"<STR_LIT:type>": "<STR_LIT:string>"}<EOL>}<EOL>}<EOL>jsonschema.validate(config.project, project_schema)<EOL><DEDENT>except jsonschema.exceptions.ValidationError as e:<EOL><INDENT>click.secho("<STR_LIT>", fg='<STR_LIT>')<EOL>click.secho("<STR_LIT>" % (e.path[<NUM_LIT:0>], e.message), fg='<STR_LIT>')<EOL>click.echo("<STR_LIT>" % (e.path[<NUM_LIT:0>], e.validator_value))<EOL>raise click.Abort()<EOL><DEDENT>config.pbclient = pbclient<EOL>config.pbclient.set('<STR_LIT>', config.server)<EOL>config.pbclient.set('<STR_LIT>', config.api_key)<EOL>
Create the cli command line.