Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ryanmachancock/shpleetcode

Repository files navigation

ShpleetCode

Terminal-based NeetCode/LeetCode practice environment with Claude Code integration.

Features

  • Interactive problem browser with fzf
  • 3-pane tmux layout: solution editor, Claude assistant, problem description
  • Automatic file tracking - Claude sees your code without manual copying
  • Progress tracking by category and difficulty
  • 150 NeetCode problems with descriptions and examples

Installation

git clone https://github.com/ryanmachancock/shpleetcode.git
cd shpleetcode
./install.sh

The installer will:

  • Check for required dependencies (fzf, tmux, nvim, claude, node)
  • Install MCP server dependencies
  • Scrape NeetCode problems
  • Configure Claude Code to use the MCP server

Usage

Start the environment:

./start-leetcode

This launches a tmux session with:

  • Left: Neovim with your solution file
  • Top-right: Claude Code with MCP server
  • Bottom-right: Neovim displaying the problem description

Files auto-save after 1 second of inactivity, so Claude always sees your latest code.

Dependencies

MCP Tools

Claude has access to these tools:

  • get_current_problem() - Get your current file contents
  • list_problems() - Browse all problems with filters
  • get_problem(id) - Get problem details
  • mark_solved(id) - Mark problem complete (or use ./start-leetcode --mark <id>)
  • get_progress() - View your stats
  • search_problems(query) - Search by title or tags

Project Structure

shpleetcode/
├── start-leetcode # Main launcher
├── install.sh # Setup script
└── leetcode-mcp-server/
 ├── index.js # MCP server
 ├── scraper.js # Problem fetcher
 └── package.json
~/.leetcode/
├── problems.json # Problem database
├── progress.json # Your progress
└── workspace/ # Your solutions
 ├── arrays-hashing/
 ├── two-pointers/
 └── ...

Tips

  • First-time setup: ./start-leetcode --setup-auth (paste browser cookies once)
  • Filter by difficulty: ./start-leetcode Easy (case-insensitive)
  • Run sample tests: ./start-leetcode --run (or tell Claude "run the tests")
  • Submit solution: ./start-leetcode --submit (or tell Claude "submit")
  • Mark a problem solved: ./start-leetcode --mark 0001-two-sum
  • Regenerate all description files: ./start-leetcode --regen
  • Regenerate one description file: ./start-leetcode --regen 0001-two-sum
  • Problems marked [B75] are from the Blind 75 list
  • Ask Claude for hints, not solutions
  • Navigate panes with Prefix + arrow (standard tmux), or Ctrl-b o to cycle

License

MIT

About

Terminal LeetCode environment with tmux, Neovim, and Claude integration via a custom MCP server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /