A minimal Chrome Extension (Manifest V3) that extracts LeetCode problem examples, converts them into competitive programming format using the Groq API (Llama 4), and sends them directly to CPH (Competitive Programming Helper) running in VS Code.
LeetCode page → extract examples → Groq API (Llama 4) → CPH (localhost:27121)
A top progress bar shows live status as each step completes.
Sign up at console.groq.com — it's free.
Open content.js and replace the placeholder on line 1:
const API_KEY = "YOUR_GROQ_API_KEY";- Go to
chrome://extensions - Enable Developer mode (top-right toggle)
- Click Load unpacked → select this folder
Open VS Code with the CPH extension installed. It must be listening on port 27121.
Navigate to any LeetCode problem page — the extension runs automatically.
| File | Purpose |
|---|---|
manifest.json |
Extension config (MV3) |
content.js |
Extracts examples, calls Groq API, shows progress bar |
background.js |
Proxies the CPH fetch (bypasses CORS) |