Converting Remote Repositories
The primary use case for repo2pdf is converting remote GitHub repositories into well-formatted PDF documents. When you run the tool, it guides you through an interactive configuration process.Quick Start
Simply run the command to start the interactive setup:Step-by-Step Process
Choose Repository Type
When asked “Do you want to use a local repository?”, select No to clone a remote GitHub repository.
Provide GitHub URL
Enter a valid GitHub repository URL in the format
https://github.com/owner/repo.The URL must match the pattern
https://github.com/[owner]/[repo] - other Git hosting services are not currently supported.Select Features
Choose which features to include in your PDF using the spacebar to select/deselect:See Configuration for detailed feature descriptions.
Set Output Name
Specify the output filename for your PDF:
This prompt only appears when One PDF per file is not selected. The default is
output.pdf.Processing Output
Once configured, repo2pdf will:- Clone the repository to a temporary directory
- Process all files according to your selected features
- Generate the PDF(s)
- Optionally clean up the temporary repository
What Gets Included
By default, repo2pdf includes all text-based files in your repository while automatically excluding:Excluded Files
.gitignore,.gitmodulespackage-lock.json,yarn.lock.gitdirectory.vscode,.idea,.vs(IDE directories)node_modulesrepo2pdf.ignore
Excluded Extensions
- Image files:
.png,.jpg,.jpeg,.gif,.svg,.bmp,.webp,.ico - Video files:
.mp4,.mov,.avi,.wmv - YAML files:
.yml - PDF files:
.pdf
You can customize these exclusions using a
repo2pdf.ignore file. See Configuration for more details.Binary Files
Binary files that aren’t excluded will be included in the PDF as base64-encoded strings:Repository Validation
The GitHub URL must be a valid repository URL. The tool validates:- Protocol must be
https:// - Domain must be
github.com - Path must follow the pattern
/owner/repo
Next Steps
Local Repositories
Use local repositories instead of cloning
Configuration
Explore all available features and options
Output Options
Learn about different PDF output modes
Installation
Installation requirements and setup