LeetVibe
Free & open source

LeetVibe

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
leetvibe
← Back Two Sum  ·  Learn ⎘ Copy Code ↺ Reset
Step 1 — Understand ▶
Step 2 — First Pass ▶
Step 3 — Spot The Bottleneck ▶
Step 4 — The Insight ▼

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.

Step 5 — Optimize ▼
python
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
▶ run_code — 2/2 tests passed
Step 6 — Measure The Gain ▼
▶ analyze_complexity — O(n) time, O(n) space

We improved from O(n²) → O(n) by trading a rescan for a hash map.

Ask a follow-up question… Send

Four ways to practice

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.

LearnTeach me how to solve this

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.

Pair ProgrammingReview my attempt

You write first. LeetVibe runs your code, reports exactly what passed, diagnoses the precise lines, and nudges you with Socratic hints before revealing anything.

InterviewTest me for real

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.

PracticeNo AI in the loop

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.

The Playbook

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.

2,800+Problems
1,900+Solutions
52Patterns
4Modes

Beyond the modes

Get started

Requires Python 3.11 or newer. Works on Windows, macOS, and Linux.

install
# with uv (recommended)
$ uv tool install leetvibe
# or with pip
$ pip install leetvibe
# first launch opens the onboarding wizard
$ leetvibe

FAQ

What is LeetVibe?

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.

Do I need an API key?

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.

What does it cost?

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.

What leaves my machine?

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.

Which terminals are supported?

Any modern terminal with truecolor support. On Windows, use Windows Terminal rather than legacy cmd.exe.

How do I update?

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.