Release Notes
v3.0.0
Release Date: 2026-03-10 Focus: Credential Backend Overhaul (Keychain-First) + Auth Hardening
⚠️ Breaking Changes
- Credential persistence model is now backend-driven and no longer reads legacy plaintext
~/.leetcode/credentials.json. - Existing users with only legacy plaintext credentials must run
leetcode loginagain. - Default credential backend is now OS keychain (
keytar).
🔐 Security & Auth
- Added deterministic credential backend resolver:
env-readonlymode whenLEETCODE_SESSIONandLEETCODE_CSRF_TOKENare both set.keychainbackend by default.- Explicit encrypted-file backend via
LEETCODECLI_CREDENTIAL_BACKEND=file+LEETCODECLI_MASTER_KEY.
- Added typed auth storage status/reason handling across CLI and TUI:
ENV_PARTIAL,KEYCHAIN_UNAVAILABLE,KEYCHAIN_ERROR,FILE_MISSING_MASTER_KEY,FILE_DECRYPT_FAILED,LEGACY_CREDENTIALS_IGNORED.
- Updated
login,logout,whoami, and shared auth checks with consistent remediation messaging.
⚙️ Runtime & Platform
- Added Linux keychain prerequisites in CI for deterministic native module builds (
libsecret-1-dev,pkg-config). - Updated Docker image build/runtime dependencies for keytar compatibility in Linux containers.
- Docker/headless guidance now documents env-readonly auth usage.
🧪 Testing
- Added dedicated credential-store tests for resolver precedence, reason states, encrypted file read/write, and legacy-ignore behavior.
- Added CLI and TUI auth tests for env-readonly mode and keychain-unavailable handling.
🔧 Additional Merged Fixes
- Included merged PR #5:
- Config file write normalization:
configwrites now include a trailing newline for POSIX-friendly file formatting.
- Config file write normalization:
v2.4.1
Release Date: 2026-03-08 Focus: TUI Config Editing Hotfix
🐛 Bug Fixes
- TUI Config Key Hijacking (#3): Fixed an issue where global navigation hotkeys (
h,l,tab) would intercept keystrokes while editing a config field in the TUI. For example, typingpython3as the default language would fail because thehkey triggered a focus-toggle instead of inserting text. The fix ensures that when a config field is in edit mode (isEditing), text input takes precedence over all interface hotkeys.
v2.4.0
Release Date: 2026-02-28 Focus: SQL Language Support + Cross-OS CLI E2E Coverage + Sync Security Hardening
🚀 Features
- Added
sqlas a first-class supported language for CLI and TUI flows. leetcode config -l sqlandleetcode pick ... -l sqlare now supported.- SQL solution files are generated and recognized with
.sqlextension.
⚙️ Improvements
- Centralized language normalization and slug resolution logic in a shared utility.
- Added SQL dialect resolution fallback (
mysqldefault) for test/submit compatibility. - Updated config and help surfaces to display SQL as a supported language.
- Replaced shell-interpolated command strings in
syncwith argument-vector execution for dynamic values. - Updated
git commit -m,git remote add origin, andgh repo createdynamic flows to saferexecFileSync(command, args)usage.
🔒 Security
- Resolves CodeQL alert
js/incomplete-sanitizationby removing custom shell-escaping dependence for user/config-derived arguments.
🧪 Testing
- Added dedicated SQL language unit tests for mapping, extension detection, and slug resolution.
- Added deterministic cross-OS CLI E2E command-flow tests (config/workspace/snapshot/help) running in Linux/macOS/Windows CI matrix.
v2.3.0
Release Date: 2026-02-11 Focus: TUI Functionality + Stability + Cross-Platform Fixes
✅ Compatibility
This is a minor, non-breaking release.
- Existing CLI command signatures are unchanged.
- Existing problem action shortcuts remain available in TUI (
p/t/s/h/H/V/b/n/e).
🚀 Highlights
TUI Functionality (leetcode)
- Running
leetcode(no args, interactive terminal) launches full-screen TUI mode. - Problem screen uses a single-column statement layout with a unified bottom drawer for hints, submissions, snapshots, notes, diff, and status/test/submit output.
- Added focus toggle (
Tab) between statement body and drawer, withj/kand arrows scrolling the focused region. - Action shortcuts are available in problem view:
p/t/s/h/H/V/b/n/e. - Close behavior is consistent:
Esccloses drawer first, then navigates back. - Rendering and terminal handling include full-screen redraw and cleanup guards (ANSI reset, cursor/raw-mode restoration) to reduce residue/flicker issues.
Cross-Platform Sync Fixes
- Fixed
syncrepository-name extraction on Windows by usingpath.basename()instead of Unix-style path splitting. - Updated shell argument escaping to use double quotes for better cross-platform behavior.
🧪 Quality
- Added dedicated TUI tests for problem-screen drawer routing and state transitions.
- Verified with
npm run typecheck,npm run test, andnpm run build.
v2.2.2
Release Date: 2026-01-18 Focus: Critical Bug Fix (Update Command)
🐛 Bug Fixes
- Update Command: Fixed a logic inversion where
leetcode updatewould incorrectly report “You’re on the latest version” even when updates were available. It now correctly prompts for updates.
v2.2.1
Release Date: 2026-01-17 Focus: Security Hotfix & CI/CD Enhancements
🔒 Security Fixes
- HTML Injection: Fixed vulnerabilities in problem descriptions, hints, and code templates by replacing regex-based sanitization with
striptags(#security). - Double Escaping: Fixed issue where HTML entities (like
") could be double-unescaped (#security). - Dependencies: Updated CodeQL actions to v4 and added Dependency Review workflow.
🔧 Improvements
- CI/CD: Added Stale issue management and optimized Docker builds with caching.
- Linting: Resolved all ESLint warnings and enforced stricter type safety.
v2.2.0
Release Date: 2026-01-17 Focus: Problem Hints & Performance
🚀 New Features
Hint Command (leetcode hint)
Get hints for a problem when you’re stuck.
leetcode hint <id>- Show hints one at a time (press Enter for next)leetcode hint <id> --all- Show all hints at once- Supports both problem ID and slug
- Cleans HTML formatting for terminal display
- Alias:
h
⚡ Performance Improvements
Submission Polling Optimization
- Exponential backoff: Reduced API calls by 60% (30 → 12 calls)
- Faster results: 500ms initial delay for quicker feedback
- Network resilience: Added retry logic for transient network errors
- Better error messages: “Test” vs “Submission” context in timeouts
v2.1.1
Release Date: 2026-01-17 Focus: Refactoring & Robustness
🔧 Improvements
- Code Refactoring: Extracted shared semver utility for consistent version comparison
- Improved Parsing: Enhanced changelog parser regex to handle various version formats
- Robustness: Integration tests now verify against real npm/GitHub APIs
- Network Reliability: Fixed potential hangs by enforcing strict 10s total timeout for registry checks
v2.1.0
Release Date: 2026-01-16 Focus: CLI Updates & Changelog
🚀 New Features
Update Command (leetcode update)
Check for CLI updates from npm registry with automatic update notifications.
- Visual notification box when updates are available
- Detects breaking changes (major version bumps) and warns users
- 24-hour caching to avoid excessive registry calls
--forceflag to bypass cache and re-check
Changelog Command (leetcode changelog)
View release notes directly from the CLI.
- Fetches changelog from GitHub (works for global installs)
- Default: shows only versions newer than your installed version
--all- Show full changelog--latest- Show only latest version--breaking- Filter to breaking changes only- Enhanced terminal display with emojis and formatting
Startup Update Notifications
Non-blocking check on startup shows a subtle banner if updates are available.
⚡ Performance Improvements
- Build minification enabled: bundle size reduced ~40% (163KB → 98KB)
- Tree-shaking for better dead code elimination
v2.0.1
Release Date: 2026-01-12 Focus: Security Hotfix
🔒 Security Fixes
- Path Traversal Prevention: Fixed vulnerability where
test,submit, anddiff --filecommands accepted file paths outside the configured workspace. Now validates that files are insideworkDirbefore reading/submitting. - Command Injection Prevention: Fixed
synccommand to sanitize repository names, validate git URLs, and properly escape shell arguments to prevent command injection attacks.
v2.0.0
Release Date: 2026-01-11 Focus: Workspaces, Visual Debugging, Snapshots & Diff
⚠️ Breaking Change
This release introduces workspace-aware storage. Existing data in ~/.leetcode/ will not be automatically migrated. Delete the folder to start fresh with the new workspace system or manually move the data to the new workspace directory.
🚀 New Features
Workspaces (leetcode workspace)
Isolate your problem-solving contexts with separate config, timer history, and snapshots.
workspace current- Show active workspaceworkspace list- List all workspacesworkspace create <name>- Create new workspaceworkspace use <name>- Switch workspacesworkspace delete <name>- Delete workspace
Solution Snapshots (leetcode snapshot)
Save, restore, and compare different versions of your solutions. Supports save/list/restore/diff/delete operations with auto-backup on restore.
Solution Diff (leetcode diff)
Compare your current solution with past submissions or files. Shows both solutions with line numbers, or use --unified for line-by-line diff.
Visual Debugging (leetcode test --visualize)
ASCII visualization for test outputs based on problem tags.
- Supports: Array, Linked List, Tree, Binary Tree, Graph, Matrix, String, Stack, Queue, Heap
- Highlights mismatches in red
- Auto-detects 2D arrays as matrices
🏗️ Architecture Improvements
- Workspace-aware storage: Config, timer, collab, and snapshots are now isolated per-workspace
🧪 Testing Improvements
- Comprehensive test suite with 194 tests
- Integration tests for CLI binary verification
- Multi-workspace isolation tests
- Visual debugging unit tests
🐛 Bug Fixes
- Fixed command help text alignment
- Fixed empty stdout display
v1.6.0
Release Date: 2026-01-10 Focus: Collaborative Coding & Storage Improvements
🚀 New Features
Collaborative Coding (leetcode collab)
- Pair Programming: Solve problems together with a partner.
- Room System: Host creates a room, partner joins with a 6-character code.
- Code Sync: Upload solutions to the cloud for comparison.
- Solution Compare: View both solutions with line numbers.
- Status Tracking: See who has synced their code.
🏗️ Architecture Improvements
- Separated Storage: Config, credentials, collab, and timer data now stored in separate files (
~/.leetcode/) for cleaner organization.
v1.5.0
Release Date: 2026-01-09 Focus: Interview Timer & Bug Fixes
🚀 New Features
Interview Timer (leetcode timer)
- Interview Mode: Start problems with a countdown timer to simulate interview pressure.
- Default Limits: Easy (20 min), Medium (40 min), Hard (60 min).
- Custom Time: Use
-m <minutes>for custom time limits. - Time Tracking: Records your solve time when you submit successfully.
- Statistics: View your historical solve times with
--stats.
🐛 Bug Fixes
- File Search: Fixed issue where
leetcode submit <id>would find notes files instead of solution files. Now correctly skips hidden directories (.notes) and only matches valid code files.
v1.4.0
Release Date: 2026-01-08 Focus: Advanced Statistics & Git Sync
🚀 New Features
Advanced Statistics (leetcode stat)
-c, --calendar: Weekly activity summary showing submissions and active days for the last 12 weeks.-s, --skills: Skill breakdown by topic tags (Fundamental/Intermediate/Advanced).-t, --trend: Daily trend bar chart showing submissions for the last 7 days.
Automated Git Sync (leetcode sync)
- One-Command Sync: Automatically commit and push all your solutions to a Git repository.
- Smart Initialization: Detects if your folder is a git repo; if not, handles
git initfor you. - GitHub Integration: If you have
ghCLI installed, auto-creates private repositories on GitHub. - Improved Commit Messages: Commits include file count and a clean timestamp.
⚙️ Configuration
- Repo URL: New
-r, --repo <url>option inconfigcommand. - Unset Repo: You can now clear the repo URL by leaving it blank in interactive mode or passing an empty string.
v1.3.2
Release Date: 2026-01-06 Focus: Critical Hotfix.
🐛 Bug Fixes
- CLI Execution: Fixed missing shebang (
#!/usr/bin/env node) that prevented global CLI execution on Unix-like systems.
v1.3.1
Release Date: 2026-01-06 Focus: Bug Fixes & Code Quality. Warning: This release has a broken binary on Unix/Linux/macOS due to missing shebang.
🐛 Bug Fixes
API & Polling
- Fixed redundant conditional in
pollSubmission()- both branches were identical.
Premium Problem Handling
- Refactored
pick.tspremium problem flow for clearer control with explicit branches. - Now shows helpful message when language not available in code snippets.
File Search Safety
- Added depth limiting (max 5 levels) to recursive file searches to prevent runaway traversal.
Type Safety
- Fixed nullable types in
ProblemDetailinterface to match Zod schema validation. - Fixed type assertion order in
config.ts- now validates before casting. - Added parseInt validation in
submissions.tsbefore API calls.
Code Cleanup
- Consolidated duplicate
isProblemId/validateProblemIdfunctions. - Removed unused
configimports fromdaily.tsandshow.ts.
Documentation
- Updated Docker alias commands with shell-specific variations (Bash/Zsh, Fish, PowerShell).
v1.3.0
Release Date: 2026-01-06 Focus: Productivity & Code Quality.
🚀 New Features
Productivity Boosters
- Today’s Progress: New
todaycommand shows streak, daily challenge, and solved stats. - Bookmarks: Save interesting problems with
bookmark add/list/remove. - Problem Notes: Keep personal notes for problems using
note <id>. - Batch Pick: Pick multiple problems at once with
pick-batch.
🔧 Improvements
Code Quality & Robustness
- Validation: Strict input validation for problem IDs in
bookmarkandnotecommands. - Error Handling: Improved error reporting for batch operations and API failures.
- Refactored Utilities: Extracted shared logic for file finding and validation.
- Better UX: Improved spinner messages and premium problem feedback.
- Resilience: Added session auto-validation to detect expired cookies.
- Security: Enforced global authentication checks across all commands.
v1.2.0
Release Date: 2026-01-05 Focus: Developer Experience & Type Safety.
🔧 Improvements
Dynamic Help Text
- Each command now shows contextual examples with
--help. - Login shows step-by-step cookie instructions.
- Commands show ID vs. slug usage, custom testcase syntax, etc.
Editor Utility Refactor
- Moved
openInEditorto dedicatedsrc/utils/editor.tsutility. - Uses
opennpm package for robust cross-platform file opening. - Better support for VS Code family, terminal editors, and GUI editors.
Type Safety: Zod Validation
- Added Zod schemas in
src/schemas/api.tsfor all LeetCode API responses. - Validates data at the API “edge” to catch issues early.
- Prevents “undefined” errors deep in application logic.
v1.1.0
Release Date: 2026-01-04 Focus: Feature Completion and Docker.
🚀 New Features
Random Problem Picker (leetcode random)
- Fetch a random LeetCode problem instantly.
- Filter by difficulty (
-d) and tag (-t). - Options to auto-generate file (
--pick) or skip opening (--no-open).
Past Submissions Viewer (leetcode submissions)
- View your last 20 submissions.
- Retrieve code from the last accepted submission (
--lastor--download).
Docker Support 🐳
- Official Docker image available at
nightslayer/leetcode-cli. - Run the CLI without Node.js installation.
Documentation Site 📚
- Comprehensive guides hosted on GitHub Pages.
v1.0.1
🐛 Bug Fixes
- Premium Problem Handling: Fixed a crash when attempting to
showorpickPremium-only problems.
v1.0.0
🎉 Initial Release
- Core commands:
list,show,pick,test,submit. - Cookie-based authentication.