Automatically commit your accepted LeetCode submissions to GitHub
LeetShip is a cross-browser extension that detects when you submit an accepted solution on LeetCode and automatically commits it to your GitHub repository with clean structure, generated README files, and organized folders.
- π Automatic Detection: Detects accepted submissions in real-time
- π Clean Organization: Structures solutions by difficulty (
easy/0001-two-sum/) - π Generated READMEs: Creates detailed documentation with problem metadata
- π Secure Authentication: GitHub OAuth with PKCE for secure access
- π Cross-Browser: Works on Chrome (MV3) and Firefox
- β‘ Offline Support: Queues commits when offline and retries automatically
- π¨ Modern UI: Beautiful options page with dark mode support
- π‘οΈ Privacy-First: No telemetry, your code stays private
-
Download the Extension
- Chrome: Download from Chrome Web Store (coming soon)
- Firefox: Download from Firefox Add-ons (coming soon)
-
Setup
- Click the LeetShip icon and follow the onboarding wizard
- Add your GitHub Personal Access Token
- Select or create a repository for your solutions
- Configure your preferences
-
Start Coding
- Visit LeetCode and solve problems as usual
- LeetShip automatically detects accepted submissions
- Check your GitHub repository to see your solutions!
# Clone & Install
git clone https://github.com/yousefdergham/leetShip.git
cd leetShip
npm install
# Development
npm run dev # Start development server
npm run build # Build for development
npm run build:all # Build packaged extensions
# Code Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
npm test # Run testsLeetShip creates a clean, organized structure in your GitHub repository:
my-leetcode-solutions/
βββ README.md # Auto-updated with statistics
βββ easy/
β βββ 0001-two-sum/
β β βββ solution.py
β β βββ README.md
β βββ 0026-remove-duplicates/
β βββ solution.java
β βββ README.md
βββ medium/
β βββ 0002-add-two-numbers/
β βββ solution.cpp
β βββ README.md
βββ hard/
βββ 0004-median-of-two-sorted-arrays/
βββ solution.js
βββ README.md
src/
βββ background/ # Service worker for submission detection
βββ content/ # Content scripts for LeetCode integration
βββ ui/ # User interface components
βββ lib/ # Core libraries
β βββ auth/ # GitHub authentication
β βββ github/ # GitHub API client
β βββ leetcode/ # LeetCode API integration
β βββ storage/ # Extension storage management
β βββ templates/ # README and commit templating
βββ styles/ # CSS stylesheets
βββ tests/ # Test files
Customize how your commits and READMEs are generated:
Commit Message Template:
feat(leetcode): AC {{id}}. {{title}} [{{difficulty}}] ({{lang}}) β runtime: {{runtime}}, memory: {{memory}}
Available Variables:
{{id}}- Zero-padded problem ID (e.g., "0001"){{title}}- Problem title{{difficulty}}- Problem difficulty (easy/medium/hard){{lang}}- Programming language{{runtime}}- Your solution's runtime{{memory}}- Your solution's memory usage{{link}}- LeetCode problem URL
- Fine-grained Personal Access Tokens for secure GitHub authentication
- Minimal permissions - only repository access you grant
- Encrypted token storage using browser secure storage APIs
- No telemetry by default - you control what data is sent
- Local processing - your code is processed locally before GitHub
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverageWe welcome contributions! Please see CONTRIBUTING.md for guidelines.
- π Additional language support for syntax highlighting
- π Enhanced LeetCode problem detection
- π Statistics and analytics features
- π¨ UI/UX improvements
- π§ͺ Additional test coverage
- π Documentation improvements
By default, LeetShip does not include full problem statements in your GitHub commits to respect LeetCode's Terms of Service. The extension only includes:
- Problem title and metadata
- Link to the original problem
- Your solution code
- Your performance statistics
This project is licensed under the MIT License - see the LICENSE file for details.
LeetShip is not affiliated with LeetCode or GitHub. This is an independent project designed to help developers organize their coding practice.
- Chrome Web Store publication
- Firefox Add-ons publication
- GitHub repository creation from extension
- Advanced statistics and progress tracking
- Multiple repository support
- Team/organization repository support
- Export functionality (JSON, CSV)
- Problem difficulty progression analytics
- Integration with other coding platforms
LeetShip is created by Yousef Dergham
- π Portfolio: yousefdergham.vercel.app
- πΌ LinkedIn: linkedin.com/in/yousefdergham
- π GitHub: github.com/yousefdergham
Made with β€οΈ by Yousef Dergham
Automatically sync your coding journey from LeetCode to GitHub