Right now, the config.json file passed through -c must have the .json extension. That's overly picky. We ought to accept any file that's valid JSON.
This by itself would be enough in cli.py:
try:
with open(config_file, encoding="utf-8-sig") as f:
config = json.load(f)
except json.decoder.JSONDecodeError as e:
raise click.BadParameter(
f"Config file at {config_file} is not in valid JSON format: {e}."
) from e
we don't really need to wrap it in if str(config_file).endswith("json"): as we do.