Auto-solve coding challenges. 2/day. Free tier. Groq LLM + Playwright browser.
LeetCode · Codeforces · HackerRank · CodeChef
python -m venv .venv
.venv\Scripts\activate # win
pip install -r requirements.txt
python -m playwright install chromium
cp .env.example .env # fill GROQ_API_KEYGoogle Chrome must be installed on the system — the agent runs and captures cookies through it (bypasses the automation detection that blocks bundled Chromium).
python -m src.login leetcode
python -m src.login codeforces
python -m src.login hackerrank
python -m src.login codechefTwo-tier strategy:
- Fast path —
browser-cookie3reads Chrome's SQLite cookie store directly. Works on older Chrome and if you've disabled App-Bound Encryption. - Fallback — Chrome 127+ (mid-2024 onwards) uses App-Bound Encryption; browser-cookie3 fails with
Unable to get key for cookie decryption. The script automatically falls back to launching a dedicated Chrome instance at.chrome-profile/via--remote-debugging-portand grabs cookies over CDP after you log in. You only log in once per platform — the profile persists, so next time the browser opens already signed in and you just press Enter.
Tip: on the fallback path, use GitHub / Google OAuth on the login page to skip reCAPTCHA.
Force the fallback path directly:
python -m src.login leetcode --launchNon-default Chrome profile for the fast path? set CHROME_PROFILE=Profile 1 before running.
python -m src.main # dry-run, 2 random problems
python -m src.main --submit # drain pending dry-runs FIRST, then pick new
python -m src.main --submit-pending # drain backlog only, no new picks
python -m src.main --platform leetcode # force one platform (filters pending too)
python -m src.main --count 3Every dry-run row in logs/solutions.xlsx (Status = dry-run) is treated as a pending submission. On --submit, the backlog is drained LIFO — newest first before any fresh problem is picked. Each submitted row is updated in-place (Status → verdict, Runtime, Notes) rather than appended as a new row.
solutions/<platform>/<date>_<id>.java— LLM solutionsolutions/<platform>/<date>_<id>.java.meta.json— sidecar (url, title, difficulty, tags) used to replay pending submits without re-querying the platformlogs/solutions.xlsx— log with Date, Platform, Problem#, Title, Difficulty, Tags, Status, Language, Runtime, Notes- If Excel has the log open, appends fall back to
logs/solutions_YYYYMMDD.xlsx
- Language: Java (all platforms)
- Session cookies only, no password stored
- Dry-run = generate + save + log, no submit
- Groq free tier: qwen3-32b good coder, fallback llama-3.3-70b-versatile