with open("/home/noor/.config/opencode/fullstacked.env") as f:
    env = {}
    for line in f:
        line = line.strip()
        if not line or line.startswith("#"):
            continue
        key, sep, val = line.partition("=")
        env[key] = val.strip('"').strip("'")
tok = env.get("CLOUDFLARE_API_TOKEN")
print("token_present:", bool(tok))
import urllib.request, json
def cf(method, path, payload=None):
    req = urllib.request.Request("https://api.cloudflare.com/client/v4"+path, method=method)
    req.add_header("Authorization", "Bearer "+tok)
    req.add_header("Content-Type","application/json")
    body = json.dumps(payload).encode() if payload is not None else None
    r = urllib.request.urlopen(req, body, timeout=20)
    return json.loads(r.read())

# zones visible to token
d = cf("GET","/zones?per_page=50")
for z in d.get("result",[]):
    print("ZONE:", z["id"], z["name"])
