LeetPush is a GitHub Action (plus CLI) that pulls your accepted LeetCode submissions every day and commits them to a dedicated solutions repo, with a structured folder layout, per-problem READMEs, a live activity heatmap, and progress badges.
See it live: sahu-adarsh/leetcode-solutions
Activity heatmap and difficulty breakdown
Recently solved problems and topic distribution
Go to github.com/new and create a public repository (e.g. leetcode-solutions). Leave it empty; do not initialize with a README.
You need to give LeetPush read-only access to your submissions.
- Get your session cookie — see instructions below
- In your new repo, go to Settings → Secrets and variables → Actions → New repository secret
- Name:
LEETCODE_SESSIONand paste the cookie value
Install LeetPush and run lp init inside a local clone of your new repo:
# Install
pip install leetpush
# Clone your new empty repo
git clone https://github.com/<you>/leetcode-solutions
cd leetcode-solutions
# Scaffold
lp init --username <your-leetcode-username>This creates:
.github/workflows/sync.yml <- daily Action that syncs your solutions
.leetpush.yml <- your config
solutions.json <- local index (source of truth)
Populate your repo before the first Action run so you get an immediate result:
export LEETCODE_SESSION="<your-session-cookie>"
lp sync --username <your-leetcode-username>You should see your solutions appear under solutions/.
git add -A
git commit -m "init: leetpush scaffold"
git remote add origin https://github.com/<you>/leetcode-solutions.git
git push -u origin mainThe Action will now run daily at 02:00 UTC. To trigger it immediately:
GitHub repo → Actions → Sync LeetCode Solutions → Run workflow
That's it. Every accepted submission from here on will be committed automatically.
LeetPush reads your submissions through the same session LeetCode uses in your browser. It never stores your password.
- Log in to leetcode.com in Chrome or Firefox
- Open DevTools → Application (Chrome) or Storage (Firefox)
- Navigate to Cookies → https://leetcode.com
- Find the cookie named
LEETCODE_SESSIONand copy its Value
Session cookies typically last 30 days. If the Action stops committing new solutions, grab a fresh cookie from your browser and update the secret.
After syncing, your solutions repo will have:
Root README.md auto-generated with:
- Solved count, current streak, and longest streak badges
- Activity heatmap showing your full submission history
- Difficulty breakdown with visual progress bars
- Last 5 recently solved problems
- Topic distribution table
Per-problem README.md inside each solution folder:
- Problem title, difficulty, topics, and link to LeetCode
- Table of solutions across languages with runtime and memory stats
- Editable Approach and Complexity sections, LeetPush never overwrites your notes


