1
0
Fork 0
megacode/scripts/register.py

30 lines
623 B
Python
Executable file

#!/usr/bin/env python3
"""Register a Kilo account via Google OAuth.
Usage:
PROXY_URL=http://localhost:8080 python scripts/register.py
"""
import asyncio
import logging
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "src"))
logging.basicConfig(level=logging.INFO)
from registration import register_kilo_account
async def main():
result = await register_kilo_account()
if result:
print(f"\nAPI key: {result.access_token}")
else:
print("\nRegistration failed")
sys.exit(1)
if __name__ == "__main__":
asyncio.run(main())