code: def cli(ctx, config_file, profile, endpoint_url, output, color, debug):
      
      config = Config(config_file)
      config.get_config_for_profle(profile)
      config.get_remote_config(endpoint_url)
  
      ctx.obj = config.options
  
      # override current options with command-line options or environment variables
      ctx.obj['output'] = output or config.options['output']
      ctx.obj['color'] = color or os.environ.get('CLICOLOR', None) or config.options['color']
      endpoint = endpoint_url or config.options['endpoint']
  
      ctx.obj['client'] = Client(
          endpoint=endpoint,
          key=config.options['key'],
          token=get_token(endpoint),
          username=config.options.get('username', None),
          password=config.options.get('password', None),
          timeout=float(config.options['timeout']),
          ssl_verify=config.options['sslverify'],
          debug=debug or os.environ.get('DEBUG', None) or config.options['debug']
      )
docs: Alerta client unified command-line tool.