Skip to content

Jayantaxnath/leetcode-to-cph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode → CPH

Chrome Extension Manifest V3 Groq API CPH License

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.

How it works

LeetCode page → extract examples → Groq API (Llama 4) → CPH (localhost:27121)

A top progress bar shows live status as each step completes.

Setup

1. Get a Groq API key

Sign up at console.groq.com — it's free.

2. Add your API key

Open content.js and replace the placeholder on line 1:

const API_KEY = "YOUR_GROQ_API_KEY";

3. Load the extension in Chrome

  1. Go to chrome://extensions
  2. Enable Developer mode (top-right toggle)
  3. Click Load unpacked → select this folder

4. Make sure CPH is running

Open VS Code with the CPH extension installed. It must be listening on port 27121.

5. Use it

Navigate to any LeetCode problem page — the extension runs automatically.

Files

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)

Tech

  • API: Groqmeta-llama/llama-4-scout-17b-16e-instruct
  • Target: CPH on localhost:27121
  • Manifest: V3, no build step required

About

Chrome extension that auto-extracts LeetCode examples and sends them to CPH (VS Code) using Groq API - one page load, zero clicks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors