Download free NCERT textbooks as merged PDFs, organised by class and subject. NCERT (National Council of Educational Research and Training) publishes the official school textbooks used across India — this tool lets you download and save any of them offline as a single clean PDF, without navigating the NCERT website manually.
- Lets you pick a class and subject interactively, or specify them via flags
- Downloads the official chapter files from NCERT's servers
- Merges them into a single PDF per book, saved to a
downloads/folder - Skips books already downloaded — safe to re-run at any time
Install uv, then run:
uv run main.pyuv installs all dependencies automatically on first run. The script will guide you through picking a class, subject, and which books to download.
If you already have Python 3.10+ installed:
pip install pypdf questionary requests rich
python main.pyWhen you run the script without any flags, it walks you through three steps:
- Pick a class — choose from Class 1 to 14, or download all classes at once
- Pick a subject — filtered to what's available for that class
- Pick books — download everything, or select specific titles with the spacebar
Navigation works like a file browser:
| Key | Does |
|---|---|
↑ ↓ |
move between entries |
→ or enter |
select / go forward |
← |
go back a level |
Ctrl+C |
same as ←; cancels at the first level |
Each menu also carries a ← Back row at the top — where .. would be in a directory
listing — and a ✕ Cancel row at the bottom. The cursor starts on the first real
entry, so enter never steps backwards by accident. Going back remembers what you
already chose. In the book picker, space checks and unchecks.
Once downloading starts, Ctrl+C stops it; partial files are kept, so re-running
resumes where it left off.
Books are saved to downloads/Class <N>/<Subject>/<Title>.pdf.
Pass flags to skip the prompts entirely — useful for scripting or automation:
uv run main.py --class 10 # all Class 10 books
uv run main.py --class 10 --subject Mathematics # specific class + subject
uv run main.py --list # browse the full catalog without downloading
uv run main.py --download-only # download zip files, skip PDF merging
uv run main.py --merge-only # merge already-downloaded zips into PDFs
uv run main.py --keep-zips # keep zip files after merging
uv run main.py --out ./books # save to a custom directory
uv run main.py --concurrency 5 # limit parallel downloads
uv run main.py --merge-concurrency 4 # limit parallel merge processes (default: one per CPU)
uv run main.py --no-probe # skip the size check (no total or ETA)Before downloading, the script asks the server how big each book is (a quick
concurrent HEAD pass — about 3 seconds for 45 books). That buys two things:
- a progress bar measured in bytes rather than books, with a percentage, running total and ETA. Books range from a few MB to over 2 GB, so "3/10 done" says very little about how far along you are.
- books NCERT lists but never published are reported up front and skipped, instead of failing partway through the download. About 17% of the catalog (185 of 1,114 entries) is in this state.
Pass --no-probe to skip it and go straight to downloading.
Re-running is always safe — files already downloaded or merged are skipped automatically.
The list of available books is stored in data.json. Regenerate it if the NCERT catalog changes:
uv run generate_data.pyuv sync --group dev # install dependencies including dev tools
uv run main.py # run the scriptuv run pytest tests/