Skip to main content

💻 CLI Command Overview

leetrs provides a clean set of command-line subcommands built with clap.


📋 Command Summary Table​

SubcommandArguments / FlagsPurpose
auth—Interactively authenticate via auto-detected browser (Chrome, Firefox, Brave, Edge, Arc) or cURL / Cookie header
status—Display active authentication status and token previews
tui[language]Launch interactive Ratatui terminal problem browser
pick<identifier> [language] [-p, --preview] [-b, --browser]Fetch problem description & stub, generate local files, and open editor
daily[language] [-p, --preview] [-b, --browser]Pick today's LeetCode Problem of the Day
test<file> [-c, --cases <input> | --cases-file <path>]Test local solution against sample test cases without official submission
submit<file>Submit local solution to LeetCode for full judging and statistics
completion<shell>Generate shell autocomplete scripts (bash, zsh, fish, elvish, powershell, nushell)
clean—Invalidate and purge local cache (data.json, user.json) and stored credentials (credentials.json)

🌐 Global Flags​

FlagShortDescription
--help-hPrint help information for leetrs or any subcommand
--version-VPrint version information (leetrs 1.2.2)

⚡ Default Action​

Running leetrs with no arguments defaults to launching the interactive TUI:

leetrs
# is equivalent to:
leetrs tui