LeetCode → GitHub. Automatic. Structured. Zero effort.
Install Extension · How It Works · Features · Contributing
LeetCommit is a free, open-source Chrome and Brave browser extension that automatically syncs your accepted LeetCode solutions to GitHub — the moment you pass all test cases.
No copy-paste. No manual commits. No forgetting to save your work.
You solve the problem. LeetCommit handles the rest.
Why does this matter?
GitHub is your developer portfolio. Every recruiter checks it. LeetCommit makes sure every problem you solve shows up as a real commit — building your GitHub streak and showcasing your consistency automatically.
- 🚀 Auto-push on Accepted — detects when LeetCode shows "Accepted" and instantly commits your solution to GitHub
- 📁 Structured folders — organizes by difficulty:
Easy/,Medium/,Hard/ - 📝 Auto-generated README per problem — includes difficulty, topics, runtime, memory, and date solved
- 💬 Metadata header in code — every solution file includes problem number, topics, and performance stats as a comment
- 🌐 All languages supported — Python, Java, C++, JavaScript, TypeScript, Go, Rust, Kotlin, Swift, and more
- 🔒 Private repo support — keep your solutions private if you want
- 📊 Stats dashboard — track Easy / Medium / Hard solved count right in the extension popup
- 🔘 Manual push button — injected into LeetCode's UI as a backup if auto-detect misses
- 🔑 PAT & OAuth support — connect via Personal Access Token or GitHub OAuth App
- 🛡️ 100% local — your token never leaves your device, no backend server involved
After solving problems, your GitHub repo looks like this:
leetcode-solutions/
├── Easy/
│ ├── 0001-two-sum/
│ │ ├── solution.py ← Your code with metadata header
│ │ └── README.md ← Auto-generated problem info
│ └── 0021-merge-two-sorted-lists/
│ ├── solution.java
│ └── README.md
├── Medium/
│ └── 0049-group-anagrams/
│ ├── solution.cpp
│ └── README.md
└── Hard/
└── 0023-merge-k-sorted-lists/
├── solution.go
└── README.md
Each solution file looks like this:
# LeetCode Problem #1: Two Sum
# Difficulty: Easy
# Topics: Array, Hash Table
# Language: Python3
# Runtime: 56 ms | Memory: 14.3 MB
# Solved: 22/06/2026
class Solution:
def twoSum(self, nums, target):
seen = {}
for i, n in enumerate(nums):
if target - n in seen:
return [seen[target - n], i]
seen[n] = i- Download the latest release and unzip it
- Open Chrome or Brave → go to
chrome://extensions/ - Toggle Developer Mode ON (top-right corner)
- Click Load unpacked → select the
leetcommit/folder - Pin the ⚡ LeetCommit icon to your toolbar
Coming soon 🚧
- Go to github.com/settings/tokens
- Click Generate new token (classic)
- Give it a name like
leetcommit - Set expiration to No expiration
- Check only the
reposcope - Click Generate token → copy it immediately (shown only once!)
- Click the ⚡ LeetCommit icon → paste your token → Connect
You submit a LeetCode solution
↓
LeetCode shows "Accepted" ✅
↓
LeetCommit detects it automatically
↓
Extracts: code, difficulty, topics, runtime, memory
↓
Pushes solution.{ext} + README.md to your GitHub repo
↓
Your GitHub streak grows 📈
| Layer | Technology |
|---|---|
| Extension | Chrome Manifest V3 |
| Content Script | Vanilla JavaScript (DOM observer) |
| Background | Service Worker |
| GitHub Integration | GitHub REST API v3 |
| Auth | GitHub PAT / OAuth 2.0 |
| Storage | chrome.storage.local |
Contributions are what make open source amazing. Any contribution you make is greatly appreciated.
See CONTRIBUTING.md for full guidelines.
Quick steps:
- Fork the repo
- Create your branch:
git checkout -b feature/amazing-feature - Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
- GeeksforGeeks support
- GitLab support
- Topic-wise folder organization
- Problem description in README
- Dark/light popup theme toggle
- Firefox extension port
Solution not pushing automatically? → Use the manual Push button injected into LeetCode's editor toolbar
SHA conflict error on GitHub? → Already handled with automatic retry logic in v1.0+
Code not being extracted? → Refresh the LeetCode page and try again. Monaco editor sometimes loads late.
| Feature | LeetCommit | LeetHub v2 | LeetSync |
|---|---|---|---|
| Manifest V3 | ✅ | ❌ | ❌ |
| Auto README per problem | ✅ | ❌ | ❌ |
| Stats dashboard | ✅ | ✅ | ❌ |
| Manual push button | ✅ | ✅ | ❌ |
| PAT + OAuth both | ✅ | ✅ | ✅ |
| Open Source | ✅ | ✅ | ✅ |
| SHA conflict auto-retry | ✅ | ❌ | ❌ |
- All processing happens 100% locally on your device
- Your GitHub token is stored in
chrome.storage.local(encrypted by Chrome) - No data is sent to any third-party server — only GitHub's official API
- Extension only accesses
leetcode.comandapi.github.com - Full source code is open for audit right here
Distributed under the MIT License. See LICENSE for more information.
If LeetCommit helps you — star this repo! It helps others find it and motivates continued development.
Made with ❤️ for the developer community
Stop copy-pasting. Start committing.