$ show frankiejun/ClawCloud-Run
ClawCloud-Run is a GitHub Actions-based automation script designed to automatically log into ClawCloudRun cloud service to maintain account activity. The system handles GitHub OAuth authentication, device verification, and two-factor authentication (via GitHub Mobile or Telegram-delivered TOTP codes). After login, it navigates to the console and apps pages to keep the session active, extracts the updated session cookie, and either updates it in GitHub Secrets or sends it via Telegram for manual update. The architecture consists of a workflow triggering a Python script that uses Playwright for browser automation, requests for API interactions, and pynacl for secret encryption. Key entry points are the GitHub Actions workflow (scheduled every 5 days) and the Python script's main execution loop.
The LLM identified 2 files worth highlighting for reuse:
The Telegram class encapsulates all interactions with the Telegram Bot API: sending messages, sending photos, waiting for specific commands (like /code 123456) from a specific chat, and flushing updates to avoid processing old messages. It is self-contained, only requiring the requests library and environment variables, and can be easily extracted for use in any project needing Telegram integration or command handling via chat bots.
The SecretUpdater class provides a secure way to update GitHub Secrets via the GitHub API using libsodium encryption (via pynacl). It fetches the repository's public key, encrypts the secret value, and updates the secret. It is isolated, depending only on requests, pynacl, and environment variables, making it reusable in any automation script that needs to manage GitHub Secrets without exposing raw values in logs or configuration.