A CLI tool for organizing technical interview preparation
Project description
InterviewPrep CLI
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.
Features
- 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
Installation
Requires Python 3.11 or higher.
git clone https://github.com/aldohl95/InterviewPrepCli.git
cd InterviewPrepCli
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]" --no-build-isolation
Verify the installation:
interviewprep --help
Usage
Adding a problem
interviewprep add
Walks 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.
Listing all problems
interviewprep list
Displays a summary table with problem number, name, date attempted, personal difficulty, and whether it needs resolving.
Viewing full details
interviewprep view 1
Shows every field for the numbered problem.
Editing a problem
interviewprep edit 1
Prompts field-by-field with current values as defaults. Press Enter to keep any field unchanged.
Deleting a problem
interviewprep delete 1
Confirmation prompt before deletion.
Logging a new review
interviewprep review 1
Creates a new attempt record for an existing problem and calculates the next review date based on the spaced repetition algorithm.
Progress dashboard
interviewprep dashboard
Displays statistics: total problems solved, breakdown by LeetCode difficulty, top patterns practiced, and problems still needing resolve.
Daily study planner
interviewprep today
Shows problems due for review today, falls back to upcoming reviews if nothing is due, and tracks your daily streak.
Exporting data
interviewprep export --output=backup.json
Writes all problems to a JSON file for backup.
Importing data
interviewprep import --input=backup.json --mode=merge
interviewprep import --input=backup.json --mode=replace
Merge mode adds imported problems to existing data. Replace mode overwrites everything.
Architecture
Directory structure
Full project structure
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
Data storage
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
Spaced repetition
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.
Design Decisions
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.
Development
Running tests
pytest
Current test count: 42 tests passing across models, storage, scheduler, and all commands.
Formatting and linting
black src/ tests/
ruff check src/ tests/
Configuration lives in pyproject.toml.
Test coverage areas
- 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)
Future Work
- 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
Tech Stack
- 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
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interviewprep_cli-0.1.0.tar.gz.
File metadata
- Download URL: interviewprep_cli-0.1.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99da1219b15f960e7a03c998fc1a660e14e75b4d4f2a8a21278136201983face
|
|
| MD5 |
adeb3654f268238b39d5be8670ca8306
|
|
| BLAKE2b-256 |
589b0d3dd5145cbd5badeaf0f5c156760f55c93ff4c1d488326c4e77e43d2926
|
File details
Details for the file interviewprep_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: interviewprep_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63c337dc4ccd64ae03993cfd0c32cb7977fb6a4fa2609ba840e7f79ba69f6552
|
|
| MD5 |
d95b68abc6dd46ce5dca59a69bcbea25
|
|
| BLAKE2b-256 |
ff32c5de0280d9de9bf4e677c2efbaaf9ec82db6e88b8951ea406d161ccef686
|