Skip to main content

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.

```bash pip install interviewprep-cli ```

Or install with pipx for isolated installation:

pipx install interviewprep-cli

Install from source (for development)

git clone https://github.com/aldohl95/InterviewPrepCli.git
cd InterviewPrepCli
python3 -m venv .venv
source .venv/bin/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 review command 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 review instead.

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) from Attempt (per-session data)
  • Recalculate next_review_date on edit when scheduling fields change
  • Add filtering to list command (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

Metadata

Release files for interviewprep-cli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interviewprep-cli 0.1.2
File Size Uploaded Provenance Actions
interviewprep_cli-0.1.2.tar.gz 16.2 kB Without provenance Details for interviewprep_cli-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for interviewprep-cli 0.1.2
File Interpreter ABI Platform Actions
interviewprep_cli-0.1.2-py3-none-any.whl Python 3 none any Details for interviewprep_cli-0.1.2-py3-none-any.whl

Total release size: 31.4 kB

Release files / interviewprep_cli-0.1.2.tar.gz

Download URL interviewprep_cli-0.1.2.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
036821c97e0bd4dcc12c956b2ca558c6babc4817b491182fc060245f4e1e7bc3
BLAKE2b-256 checksum
How to use checksums
35761b2846e7d0ea535204c2649f70bd021e4e4430dcd8e4de784ac41657f5ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / interviewprep_cli-0.1.2-py3-none-any.whl

Download URL interviewprep_cli-0.1.2-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
437c8e490056f704b2d992340aa05931b9047cb5255cd6c9a70a808b6c535987
BLAKE2b-256 checksum
How to use checksums
e5a9d0e763825ebb8828919a5d57ac63d69cf221c59c5605bf6b371a307047db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for interviewprep-cli 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page