leetgo  by j178

CLI tool for LeetCode practice in the terminal

Created 2 years ago
613 stars

Top 53.6% on SourcePulse

GitHubView on GitHub
Project Summary

This tool provides a command-line interface for LeetCode users, automating the process of problem fetching, code generation, local testing, and submission. It aims to streamline the competitive programming workflow, allowing users to manage their LeetCode practice entirely within the terminal.

How It Works

Leetgo leverages LeetCode's GraphQL API to interact with the platform. Upon initialization, it can fetch problem details, generate skeleton code in various languages, and create test case files. Its core advantage lies in its local testing capabilities, which allow users to run their solutions against provided test cases using their preferred IDE and debugger, significantly improving the development and debugging cycle.

Quick Start & Requirements

  • Install: Download binaries from releases, or use package managers like Homebrew (brew install j178/tap/leetgo), Scoop (scoop install j178/leetgo), or go install github.com/j178/leetgo@latest.
  • Initialize: leetgo init -t <us or cn> -l <lang>
  • Usage: leetgo pick <id or name>, leetgo test last, leetgo submit last.
  • Dependencies: Go toolchain for source builds. Browser access for cookie-based authentication.
  • Docs: Leetgo GitHub

Highlighted Details

  • Supports both leetcode.com and leetcode.cn.
  • Automatically reads cookies from browsers for authentication.
  • Offers OpenAI integration for experimental code fixing.
  • Generates contest questions and allows batch submission.
  • Supports customizable filename templates and code blocks.

Maintenance & Community

  • Active development with contributions from multiple developers.
  • Credits JetBrains for license support.
  • Contributions are welcomed via GitHub issues and pull requests.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial and closed-source projects.

Limitations & Caveats

  • Local testing is not yet supported for all languages (e.g., Java, JavaScript, C#, etc.).
  • Browser cookie decryption may be impacted by browser updates (e.g., Chrome/Edge v127 on Windows).
  • Password authentication is not recommended and not supported by leetcode.com.
Health Check
Last Commit

4 days ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
11 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Travis Fischer Travis Fischer(Founder of Agentic), and
6 more.

AlphaCodium by Codium-ai

0.1%
4k
Code generation research paper implementation
Created 1 year ago
Updated 9 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Meng Zhang Meng Zhang(Cofounder of TabbyML), and
3 more.

qodo-cover by qodo-ai

0.2%
5k
CLI tool for AI-powered test generation and code coverage enhancement
Created 1 year ago
Updated 2 months ago
Feedback? Help us improve.