All apps/leetcode-cli

leetcode-cli

leetcode-cli

A command-line tool for solving LeetCode problems.

Runs as leetcode|macOS, Linux, Windows|github.com

Command form

ai-draft · 5 tasks · 11 fields

Pick, edit, test and submit LeetCode problems by id, or work on today's daily challenge. List, stat, data and completions commands are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui leetcode-cli

leetcode pick

Pick a problem

Pick a problem by id, name or daily challenge and print its description.

Pick a problemExample values, fixed in this page — nothing here reaches a terminal
Basic
Problem id*
integer
TasksEach one presets the form for one job
Pick by id
id
Today's challenge
daily
ParametersOnly these flags are editable in the form
Problem id
integer · positional 0
Problem name
string
--name
Tag
string
--tag
Daily challenge
boolean
--daily

leetcode edit

Edit a solution

Open a problem's code file in your editor.

Edit a solutionExample values, fixed in this page — nothing here reaches a terminal
Basic
Problem id*
integer
Language
string
TasksEach one presets the form for one job
Edit by id
idlang
ParametersOnly these flags are editable in the form
Problem id
integer · positional 0
Language
string
--langrustpython3cpp
Daily challenge
boolean
--daily

leetcode test

Test a solution

Run the sample test cases for a problem.

Test a solutionExample values, fixed in this page — nothing here reaches a terminal
Basic
Problem id*
integer
Re-run on save
--watch
TasksEach one presets the form for one job
Test by id
idwatch
ParametersOnly these flags are editable in the form
Problem id
integer · positional 0
Re-run on save
boolean
--watch
Daily challenge
boolean
--daily

leetcode exec

Submit a solution

Submit the solution for a problem.

Submit a solutionExample values, fixed in this page — nothing here reaches a terminal
Basic
Problem id*
integer
TasksEach one presets the form for one job
Submit by id
id
ParametersOnly these flags are editable in the form
Problem id
integer · positional 0
SourcesEvery flag above is checked against these
readme
leetcode pick 1 # pick a problem and print its description | `pick` | `p` | Pick a problem by id, `--name`, `--tag`, `--query`, `--plan`, or `--daily` |
help2026-10

github.com

readme
leetcode edit 1 # open the solution file in your editor | `edit` | `e` | Open a problem's code file; `--lang` overrides the configured language, `--daily` opens today's challenge |
help2026-10

github.com

readme
leetcode test 1 # run the sample test cases | `test` | `t` | Run test cases; `--watch` re-runs on save, `--daily` targets today's challenge |
help2026-10

github.com

readme
leetcode exec 1 # submit the solution | `exec` | `x` | Submit the solution |
help2026-10

github.com

Before it fills your prompt, Otty checks the installed leetcode against its version. A form that does not match your version is not offered.