LeetVibe is an AI pair programmer for LeetCode that lives in your terminal. It doesn't just talk about your code — it writes it, runs it against the real test cases, measures the Big-O complexity, and coaches you through 2,800+ problems without ever opening a browser tab.
uv tool install leetvibe
For each x we already know exactly what we need: target - x. Storing the values we have seen in a hash map turns the inner scan into an O(1) lookup, so a single pass is enough.
class Solution(object): def twoSum(self, nums, target): seen = {} for i, x in enumerate(nums): if target - x in seen: return [seen[target - x], i] seen[x] = i
We improved from O(n²) → O(n) by trading a rescan for a hash map.
Every session is a live conversation — ask follow-ups, push back, go deeper. The modes differ in one thing: how much help you want today.
A strict 7-step workflow: brute force first, name its complexity, find the one key insight, write the optimal, measure the gain, and close with an algorithm mnemonic that makes the pattern stick.
You write first. LeetVibe runs your code, reports exactly what passed, diagnoses the precise lines, and nudges you with Socratic hints before revealing anything.
Alex, a senior engineer, runs a 30-minute mock technical interview — spoken aloud via ElevenLabs. He probes your complexity and edge cases, gives one hint, and never hands you the answer.
Skip the agent entirely. Browse problems, write code, run tests, pull up hints, and read the built-in solution on your own. No API key required.
An in-terminal algorithm reference covering 52 patterns — from Arrays and Binary Search to Network Flow, Segment Tree, and Digit DP. Every topic teaches the intuition, walks through annotated templates, and tells you which pattern it's most often confused with.
Requires Python 3.11 or newer. Works on Windows, macOS, and Linux.
LeetVibe is a free, open-source command-line application that turns LeetCode practice into a guided session with an AI coach. It runs entirely in your terminal: browse problems, write Python, run the real test cases, and have the agent teach, coach, or interview you.
Only for the AI modes. LeetVibe uses your own Mistral API key for reasoning, and an optional ElevenLabs key for interview voice narration. Practice mode works with no keys at all.
LeetVibe itself is free and MIT-licensed. You bring your own Mistral API key, and those requests are billed to your Mistral account according to your plan.
Problem statements and code go to the Mistral API during sessions, and replies go to ElevenLabs
if voice is enabled. Progress syncs to the cloud only if you create an account. Your API keys
never leave ~/.leetvibe/.env.
Any modern terminal with truecolor support. On Windows, use Windows Terminal rather than
legacy cmd.exe.
uv tool upgrade leetvibe or pip install -U leetvibe. LeetVibe also
checks PyPI once a day and shows a toast when a newer version is available.