Skip to main content

LeetCode CLI

A sleek command-line tool for LeetCode - solve, test, and submit problems directly from your terminal.

image

🚀 Quick Start

1. Using pip

pip install leetcli

2. clone the repository

git clone https://github.com/yuvrajsinh5252/leetcode-cli
cd leetcode-cli
python -m venv .venv
source ./.venv/bin/activate
pip install -r requirements.txt
pip install -e .

Available Commands

Command Description Options
lc login Login to LeetCode account -
lc logout Logout from LeetCode -
lc profile Display LeetCode profile -
lc daily Show today's challenge {lang} - Language (optional)
-e/--editor - Preferred editor
-f/--full - Show full description
-s/--save - Save to file
--no-editor - Skip editor
lc list List available problems -d/--difficulty - Difficulty
-s/--status - Status
-t/--tag - Tag
-c/--category-slug - Category
lc show Display problem details {Problem Name/Number}
-c/--compact - Compact layout
lc test Test your solution {Problem Name/Number} {FILE}
lc submit Submit your solution {Problem Name/Number} {FILE}
--lang - Language
-f/--force - Skip confirmation
lc edit Edit solution in editor {Problem Name/Number} {lang}
-e/--editor - Preferred editor
lc solutions View problem solutions {Problem Name/Number}
-b/--best - Show best solutions

Usage Examples

lc list -d easy -s attempted -t array
lc edit 1 py
lc test 1 two-sum.py
lc submit 1 two-sum.py
lc solutions two-sum --best
lc daily py -e vim

🚧 Work in Progress

Todo

  • Add support for custom test cases
  • Add solution templates

Metadata

Release files for leetcli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leetcli 0.1.0
File Size Uploaded Provenance Actions
leetcli-0.1.0.tar.gz 23.8 kB Without provenance Details for leetcli-0.1.0.tar.gz

Release files / leetcli-0.1.0.tar.gz

Download URL leetcli-0.1.0.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e0fa6bbf17c92164138948e1aa37fb062e0587bdeaa4e39e8f8b5af9a7201afb
BLAKE2b-256 checksum
How to use checksums
50ac1d6cb6d8d769cbd4e0c621f5ad379ada1df28e0fbb9a848ccfa92c033bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for leetcli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page