A multi-language LeetCode workspace for offline development and testing, currently supporting C++, Python, and Rust.
- macOS (uses Homebrew for dependencies)
- Homebrew
- just - task runner (
brew install just) - pyenv with virtualenv support (
brew install pyenv pyenv-virtualenv) - direnv (optional, for automatic environment activation) (
brew install direnv) - Claude Code (optional, for auto-generating tests)
Language-specific dependencies are installed automatically during setup:
- C++: cmake, GoogleTest
- Python: pytest
- Rust: cargo (via rustup)
- Clone the repository and install the task runner:
git clone <repo-url> leetcode
cd leetcode
brew install just- Run setup for your preferred language(s):
just setup cpp # C++ only
just setup py # Python only
just setup cpp py rs # All languagesThe setup will prompt you to select a default language for just start.
- Start working on a problem:
just start 1 # Fetch problem #1 (Two Sum) in your default language
just start 1 -l cpp,py # Fetch for multiple languages- Run tests:
just test # Run all tests
just test 1 # Run tests for problem #1 onlyYou can also run tests from within a language directory (cpp/, py/, rs/) for language-specific commands.