CLI tool to convert your repositories into clean PDFs and structured JSON outputs, designed for giving LLMs full context of your codebase
- Convert local or remote GitHub repositories
- Generate PDFs containing full file structures and contents
- Output structured JSON summaries
- Exclude unnecessary file types automatically
Option 1: Install from PyPI (Recommended)
pip install repo2pdf
Clone the repository and install locally:
git clone https://github.com/haris-sujethan/repo-2-pdf
cd repo-2-pdf
pip install -r requirements.txt
Then choose one of the following:
Local development install (recommended):
pip install -e .
repo2pdf
Run without installing:
python -m repo2pdf.cli
Run the CLI tool:
repo2pdf
Follow the interactive prompts:
- Select local or remote repository
- Provide the local repo path or GitHub URL
- Choose an output location
- Exclude any file types you don't want included (e.g.,
.png
,.jpg
) - Optionally generate a JSON summary alongside the PDF
Example outputs are available in the /examples
folder:
- repo_output.pdf
- repo_output.json