import json
import os
import requests
import sys


def sync_reports(url):
    response = requests.get(url)
    return response.json()


def load_runtime_config():
    api_url = os.getenv("API_URL")
    return {"api_url": api_url}


def run_cli():
    payload = json.loads(sys.argv[1])
    return payload["user"]
