Skip to main content

A CLI tool for LeetCode daily problems and submissions

Project description

LeetBuddy CLI

A command-line tool to help you solve LeetCode problems more efficiently.

Features

  • Sign in to LeetCode and save credentials
  • Get today's Problem of the Day
  • Automatically create workspace with problem statement and solution template
  • Submit solutions (coming soon)

Installation

  1. Clone this repository:
git clone <repository-url>
cd leetbuddy
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Make the script executable:
chmod +x leetbuddy.py
  1. Create a symbolic link to make it available system-wide (optional):
sudo ln -s $(pwd)/leetbuddy.py /usr/local/bin/leetbuddy

Or install it via PyPI (after publishing):

pip install leetbuddy

Usage

Sign in to LeetCode

leetbuddy signin

This will prompt you for your LeetCode username and password and save them securely.

Get Today's Problem

leetbuddy today

This will:

  1. Fetch today's Problem of the Day
  2. Create a new directory with the problem name
  3. Create a README.md with the problem statement
  4. Create a solution.cpp file with a basic template
  5. Open VS Code in the problem directory

Submit Solution (Coming Soon)

leetbuddy submit

This will submit your solution to LeetCode and show the results.

Requirements

  • Python 3.7+
  • Chrome browser (for Selenium)
  • VS Code (for opening the workspace)
  • click
  • requests
  • urllib3

License

MIT

Note

Your LeetCode credentials are stored in ~/.leetbuddy_config.json. Make sure to keep this file secure.

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

leetbuddy-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

leetbuddy-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file leetbuddy-0.1.0.tar.gz.

File metadata

  • Download URL: leetbuddy-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for leetbuddy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8343d63c7a925db18a1fdddf5ea103e10080b87e1b31b5303eaf6cab09fc181a
MD5 19d41e1eaabfacf0b121a29e420ab14e
BLAKE2b-256 3b819d447d5da6241436fbc4369507ba8994cb90efebf043ddb7b632b0c038fd

See more details on using hashes here.

File details

Details for the file leetbuddy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: leetbuddy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for leetbuddy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce787be4e9a75ce72446d17bee22fe686c74fdca1b6e057919dacf0093308683
MD5 95fab10c743bd15fc75135f1cd96a26f
BLAKE2b-256 b29e149b3ca61ab447ae26eda19f30996b22cba4555dedac41de0716317a01ba

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