AI-powered code completion and educational hints for LeetCode with BYOK (Bring Your Own Key) privacy
Features • Installation • Contributing • Issues • Releases
LeetPilot enhances your LeetCode experience with powerful AI-driven tools:
| Feature | Shortcut | Description |
|---|---|---|
| Code Completion | Ctrl+Space |
Get intelligent code suggestions while solving problems |
| Error Explanations | Alt+E |
Understand and fix coding errors with detailed explanations |
| Optimization Suggestions | Alt+O |
Improve your solution's performance and efficiency |
| Step-by-Step Hints | Alt+H |
Get educational guidance without spoiling the solution |
LeetPilot uses a Bring Your Own Key (BYOK) model that prioritizes your privacy:
- ✅ Your API keys are stored locally in your browser
- ✅ Code and data go directly to your chosen AI provider
- ✅ No third-party servers or data collection
- ✅ Complete control over your data and privacy
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude)
- Google Gemini
- OpenAI-Compatability-Format
# Clone the repository
git clone https://github.com/leetpilot/extension.git
cd extension
# Install dependencies
npm install
# Build the extension
npm run build:extension
# Load in Chrome:
# 1. Open Chrome → chrome://extensions/
# 2. Enable "Developer mode"
# 3. Click "Load unpacked" → select the `dist` folderDownload the latest release from our Releases page and follow the Chrome extension installation instructions.
- Click the LeetPilot extension icon in your browser toolbar
- Select your preferred AI provider (OpenAI, Anthropic, or Google Gemini)
- Enter your API key (get one from your chosen provider's dashboard)
- Save the configuration
- Navigate to any LeetCode problem
- Use keyboard shortcuts while coding:
Ctrl+Space- Code completionAlt+E- Error explanationAlt+O- Optimization suggestionsAlt+H- Step hints
We welcome contributions from the community! Whether you want to report a bug, suggest a feature, or contribute code, your help is appreciated.
- 🐛 Report Bugs: Help us identify and fix issues
- 💡 Suggest Features: Share your ideas for new functionality
- 🔧 Submit Pull Requests: Contribute code improvements
- 📝 Improve Documentation: Help make our docs better
- 🧪 Test: Report issues and verify fixes
-
Fork the Repository
Click the "Fork" button at the top right of this page to create your own fork.
-
Clone Your Fork
git clone https://github.com/YOUR-USERNAME/extension.git cd extension -
Set Upstream Remote
git remote add upstream https://github.com/leetpilot/extension.git
-
Create a Branch
git checkout -b feature/your-feature-name # or for bug fixes: git checkout -b fix/your-bug-fix -
Make Changes & Test
# Install dependencies npm install # Make your changes # Run tests npm test # Build to verify npm run build:extension
-
Submit a Pull Request
- Push your branch to your fork
- Create a Pull Request against the
mainbranch - Fill in the PR template with details about your changes
- Follow existing code style and conventions
- Write clear commit messages
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass before submitting
Found a bug or have a feature request? We appreciate your feedback!
- Search existing issues to avoid duplicates
- Check if the issue is already reported or being worked on
- Go to our Issues page
- Click New Issue
- Choose the appropriate template:
## Bug Description
Describe the bug clearly and concisely.
## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
## Expected Behavior
What you expected to happen.
## Actual Behavior
What actually happened (include screenshots if applicable).
## Environment
- OS: [e.g., Windows 11, macOS]
- Browser: [e.g., Chrome 120+]
- Extension Version: [e.g., 1.2.1]
## Additional Context
Any other context about the problem.## Feature Description
Describe the feature you'd like to see.
## Problem Statement
What problem does this solve?
## Proposed Solution
Describe your proposed solution.
## Alternatives Considered
What alternatives have you considered?
## Additional Context
Any other context or screenshots.All releases are available on our Releases page.
This project uses GitHub Actions for automated releases:
- Build & Test: Runs on every push to validate code
- Release: Creates releases automatically when tags are pushed
- Version Tagging: Uses semantic versioning (MAJOR.MINOR.PATCH)
# Patch release (bug fixes)
npm run version:patch
# Minor release (new features)
npm run version:minor
# Major release (breaking changes)
npm run version:major
# Push the tag
git push origin v1.2.1This triggers the GitHub Actions workflow to:
- Build the extension
- Run all tests
- Create a GitHub release
- Upload the extension package (
.zip) - Create a version tag
- LeetPilot Team - GitHub
This project uses the following open source software:
| Library | Version | License | Purpose |
|---|---|---|---|
| TypeScript | ^5.5.3 | Apache-2.0 | Type-safe JavaScript |
| Webpack | ^5.104.1 | MIT | Module bundler |
| Jest | ^29.7.0 | MIT | Testing framework |
| Terser Webpack Plugin | ^5.3.16 | BSD-2-Clause | Code minification |
- LeetCode - For providing an amazing platform
- All Contributors - For their contributions
- The open source community for making this project possible
leetpilot/
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── src/
│ ├── background/ # Background service worker
│ │ ├── background-service.js
│ │ ├── index.js
│ │ ├── message-router.js
│ │ └── request-orchestrator.js
│ ├── content/ # Content scripts for LeetCode
│ │ ├── content-orchestrator.js
│ │ ├── editor-integration.js
│ │ ├── index.js
│ │ ├── keyboard-handler.js
│ │ └── monaco-detector.js
│ ├── core/ # Core functionality
│ │ ├── api-client.js
│ │ ├── context-manager.js
│ │ ├── error-handler.js
│ │ ├── hint-system.js
│ │ ├── index.js
│ │ ├── input-validator.js
│ │ ├── prompt-engineer.js
│ │ ├── rate-limiter.js
│ │ ├── security-monitor.js
│ │ ├── service-container.js
│ │ ├── storage-manager.js
│ │ └── validation-utils.js
│ ├── ui/ # User interface
│ │ ├── completion-display.js
│ │ ├── error-display.js
│ │ ├── hint-display.js
│ │ ├── index.js
│ │ ├── popup-manager.js
│ │ ├── popup-modules.js
│ │ ├── popup-styles.css
│ │ ├── popup.html
│ │ ├── popup.js
│ │ ├── theme-manager.js
│ │ └── markdown-viewer.js
│ ├── utils/ # Utilities
│ │ ├── dom-utils.js
│ │ ├── index.js
│ │ ├── logger.js
│ │ └── validation-utils.js
│ ├── background.js # Background entry point
│ ├── content.js # Content script entry point
│ └── index.js # Main entry point
├── test/ # Test files
├── scripts/ # Build and utility scripts
├── icons/ # Extension icons
├── docs/ # Documentation
├── manifest.json # Chrome extension manifest
├── package.json # NPM configuration
├── tsconfig.json # TypeScript configuration
└── webpack.config.js # Webpack configuration
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub Issues: Report bugs or suggest features
- Repository: https://github.com/leetpilot/extension
Made with ❤️ by the LeetPilot Team

