Skip to main content

LeetCLI - Solve, practice, and fetch LeetCode challenges from your terminal

Project description

LeetCLI

LeetCLI is a command-line interface (CLI) tool to interact with LeetCode directly from your terminal.
You can search, view, download, run sample testcases, and submit solutions without opening a browser.


Features

-Login/logout using your LEETCODE_SESSION cookie.

-List problems with pagination.

-Search problems by keyword.

-View problem description in Markdown.

-Download starter code for your preferred language.

-Run official sample testcases locally.

-Submit solutions to LeetCode.

-Show daily challenge and user stats.


Commands

                                                LeetCode CLI - Commands

┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Command ┃ Syntax / Example ┃ Description ┃ ┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ login │ lc login │ Login by pasting LEETCODE_SESSION cookie │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ logout │ lc logout │ Remove saved session │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ list │ lc list --limit 50 --skip 0 │ List problems with optional pagination │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ search │ lc search "two sum" │ Search problems by keyword and pick one to view │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ view │ lc view two-sum │ View full problem description by slug │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ download │ lc download two-sum --lang python3 │ Download starter code │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ run │ lc run two-sum --file solution.py --lang python3 │ Run your solution on LeetCode's official sample testcases │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ submit │ lc submit two-sum solution.py │ Submit solution to LeetCode │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ daily │ lc daily │ Show today's daily challenge │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ stats │ lc stats │ Show stats for logged-in user or given username │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ Home │ lc │ Show Welcome Screen │ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────┤ │ help │ lc help │ Show this help table │ └──────────┴──────────────────────────────────────────────────┴───────────────────────────────────────────────────────────┘


Installation

Install via pip:

pip install leetcode-terminal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leetcode_terminal-0.1.3.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leetcode_terminal-0.1.3-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file leetcode_terminal-0.1.3.tar.gz.

File metadata

  • Download URL: leetcode_terminal-0.1.3.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.7

File hashes

Hashes for leetcode_terminal-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0760c46f993f09baf511bb7ce218f9f0814d691f110a0cc98cd637b3294166be
MD5 e31e3d8629955b665f8bb075f655d06c
BLAKE2b-256 fa7cc8036d20540a23746887cc633e954e7152fc1bb21f9d697df9e546990788

See more details on using hashes here.

File details

Details for the file leetcode_terminal-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for leetcode_terminal-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c9fe995165e22ac994a914885187e5c63b69098558e6766fd5ab6531cffd8b16
MD5 b7897dc438091c879b428925bff4bf1d
BLAKE2b-256 5bcd3427139373297233fb4e20c49a5fe602d15068c0c71a2bfda28547f2515a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page