A command-line application for organizing and optimizing technical interview preparation. Instead of tracking LeetCode problems, study notes, and review schedules across spreadsheets and multiple apps, everything lives in a single terminal-based tool with spaced repetition built in.
- Problem Tracker — full CRUD for practice attempts with problem name, pattern, difficulty, time taken, and self-assessment fields
- Spaced Repetition Engine — automatic scheduling of review dates based on personal difficulty and whether hints were used
- Progress Dashboard — aggregated statistics on problems solved, patterns practiced, and difficulty distribution
- Daily Study Planner — shows what's due for review today with streak tracking
- Data Import / Export — JSON-based backup and restore with merge and replace modes
Requires Python 3.11 or higher.
```bash pip install interviewprep-cli ```
Or install with pipx for isolated installation:
pipx install interviewprep-cligit clone https://github.com/aldohl95/InterviewPrepCli.git
cd InterviewPrepCli
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]" --no-build-isolationVerify the installation:
interviewprep --helpinterviewprep addWalks through interactive prompts for problem name, pattern (e.g. "hash map"), LeetCode difficulty, personal difficulty (1–10), time taken, whether you needed help, and an optional recognition sentence.
interviewprep listDisplays a summary table with problem number, name, date attempted, personal difficulty, and whether it needs resolving.
interviewprep view 1Shows every field for the numbered problem.
interviewprep edit 1Prompts field-by-field with current values as defaults. Press Enter to keep any field unchanged.
interviewprep delete 1Confirmation prompt before deletion.
interviewprep review 1Creates a new attempt record for an existing problem and calculates the next review date based on the spaced repetition algorithm.
interviewprep dashboardDisplays statistics: total problems solved, breakdown by LeetCode difficulty, top patterns practiced, and problems still needing resolve.
interviewprep todayShows problems due for review today, falls back to upcoming reviews if nothing is due, and tracks your daily streak.
interviewprep export --output=backup.jsonWrites all problems to a JSON file for backup.
interviewprep import --input=backup.json --mode=merge
interviewprep import --input=backup.json --mode=replaceMerge mode adds imported problems to existing data. Replace mode overwrites everything.
interviewprep-cli/
├── src/
│ └── interviewprep/
│ ├── __init__.py
│ ├── cli.py — Click entry point and command registration
│ ├── models.py — Problem dataclass and LeetcodeDifficulty enum
│ ├── storage.py — JSON persistence via platformdirs
│ ├── prompts.py — shared interactive prompt logic
│ ├── scheduler.py — spaced repetition algorithm
│ └── commands/ — one file per CLI command
│ ├── __init__.py
│ ├── add.py
│ ├── list.py
│ ├── view.py
│ ├── edit.py
│ ├── delete.py
│ ├── review.py
│ ├── dashboard.py
│ ├── today.py
│ ├── export.py
│ └── import_problems.py
│
├── tests/
│ ├── test_basic.py
│ ├── test_model.py
│ ├── test_storage.py
│ ├── test_scheduler.py
│ └── test_command.py
│
├── docs/
│ └── scheduler.md — algorithm design and tradeoffs
│
├── README.md
├── SPEC.md
├── LICENSE
└── pyproject.toml — project config, dependencies, tool settings
Problems are stored as JSON at the platform-appropriate user data directory (via platformdirs):
- Linux:
~/.local/share/interviewprep/problems.json - macOS:
~/Library/Application Support/interviewprep/problems.json - Windows:
%LOCALAPPDATA%\interviewprep\problems.json
A custom piecewise algorithm designed for interview preparation. First reviews use gentle intervals (1 or 3 days). Subsequent reviews scale from 1 day (needed help or difficulty ≥ 8) up to 30 days (mastered). Full details in docs/scheduler.md.
Several deliberate tradeoffs are documented in-code and worth calling out:
- JSON over SQLite — chosen for simplicity and human-readable data. SQLite migration is noted as future work.
- Custom scheduling algorithm over SM-2 — the industry-standard SM-2 algorithm was overkill for the expected data size. The custom algorithm is simpler to test, defend, and reason about.
- Problem name as identifier — prior attempts are looked up by name rather than by a separate ID system. Acceptable tradeoff for a single-user tool.
- New attempts as separate records — the
reviewcommand creates new records rather than mutating existing ones, preserving history. - Edit does not recalculate schedules — editing a problem is treated as metadata correction. Users who want to update their schedule should use
reviewinstead.
pytestCurrent test count: 42 tests passing across models, storage, scheduler, and all commands.
black src/ tests/
ruff check src/ tests/Configuration lives in pyproject.toml.
- Data model validation (boundary values, invalid inputs)
- Storage round-trip (save then load produces equivalent data)
- Scheduler algorithm (every branch and boundary tested)
- Every CLI command (success paths and error cases)
- Migrate storage layer from JSON to SQLite for efficient querying
- Add CSV import/export format
- Refactor to split
Problem(identity) fromAttempt(per-session data) - Recalculate
next_review_dateon edit when scheduling fields change - Add filtering to
listcommand (by pattern, difficulty, date range) - CI pipeline with GitHub Actions
- Python 3.11+
- Click — CLI framework
- Rich — formatted terminal output
- platformdirs — cross-platform data directory handling
- pytest — testing framework
- Black and Ruff — code formatting and linting
MIT