Leetrs-Solving LeetCode problems
Leetrs is built for developers who live in the terminal and rely on Neovim. It strips away browser friction by providing a complete LeetCode workflow directly within your terminal:
Browse & Search: Search problems using an interactive terminal interface (TUI) with fuzzy search, difficulty filters, and topic overlays.
Fetch & Format: Instantly generate clean Markdown problem descriptions and language-specific code templates.
Edit in Neovim: Launch Neovim automatically with a vertical split (vsplit) placing the problem description and code template side-by-side. Test & Submit: Asynchronously execute sample test cases or submit your solution for full judging, with colorized terminal feedback and runtime statistics. ๐ฅ๏ธ Interactive TUI Browser (leetrs tui / leetrs)
Instant fuzzy search across thousands of LeetCode problems. Difficulty filters (Easy, Medium, Hard) and topic tag overlays. Visual status indicators for solved status (ACCEPTANCE), subscription locks, and premium gates. Quick keys to toggle help popups or open selected problems directly in your system browser. ๐ Intelligent Cookie Authentication (leetrs auth)
Automatically extracts LEETCODE_SESSION and csrftoken cookies across Firefox, Chrome, Brave, Edge, and Arc on macOS and Linux (including Snap, Flatpak, and privacy forks). Supports single-paste cURL commands and raw Cookie: headers for instant manual authentication.
๐ Frictionless Problem Fetching (leetrs pick)
Fetch problems using URL slugs (e.g., two-sum) or numerical IDs (e.g., 1). Converts raw LeetCode HTML into clean, wrapped terminal Markdown text. Generates idiomatic code files (e.g., two_sum.rs, two_sum.py, two_sum.sql) with pre-populated function stubs and metadata headers. โก Native Neovim Integration
Seamlessly launches Neovim and opens a side-by-side vertical split (vsplit). Problem description sits in the left pane; code solution sits in the right pane. ๐งช Async Testing & Submission Engine (leetrs test / leetrs submit)
Run code against sample test cases locally without polluting your official submission history. Submit directly to LeetCode's judging servers and view real-time judge results, runtime/memory percentiles, and compiler error logs. ๐งน Cache & Credential Reset (leetrs clean / leetrs reset)
Reset and invalidate corrupted cache files (data.json, user.json) and stored credentials with a single command.
Download : https://crates.io/crates/leetrs Git : https://github.com/shadowmkj/leetrs