When you select the local repository option, repo2pdf processes files directly from the directory you specify instead of cloning from GitHub.
1
Select Local Repository
When prompted, choose Yes to use a local repository:
Copy
? Do you want to use a local repository? (Use arrow keys) No❯ Yes
2
Provide Directory Path
Enter the full absolute path to your local repository:
Copy
? Please provide the full path to the local repository: /home/user/projects/my-app
The path must exist on your filesystem. The tool validates the directory exists before proceeding.
3
Configure Features
Select your desired features just like with remote repositories:
Copy
? Select the features you want to include: (Press <space> to select)❯ ◉ Add line numbers ◉ Add highlighting ◯ Add page numbers ◯ Remove comments ◯ Remove empty lines ◯ One PDF per file
4
Set Output Options
Specify the output filename or folder name:
Copy
? Please provide an output file name: my-project.pdf
Here’s a complete example of converting a local repository:
Copy
$ repo2pdf ██████╗ ███████╗██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗ ██╔══██╗██╔════╝██╔══██╗██╔═══██╗ ╚════██╗ ██╔══██╗██╔══██╗██╔════╝ ██████╔╝█████╗ ██████╔╝██║ ██║ █████╔╝ ██████╔╝██║ ██║█████╗ ██╔══██╗██╔══╝ ██╔═══╝ ██║ ██║ ██╔═══╝ ██╔═══╝ ██║ ██║██╔══╝ ██║ ██║███████╗██║ ╚██████╔╝ ███████╗ ██║ ██████╔╝██║ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ Welcome to Repo-to-PDF! Let's get started...✔ Setup complete? Do you want to use a local repository? Yes? Please provide the full path to the local repository: /home/user/my-app? Select the features you want to include: Add line numbers, Add highlighting? Please provide an output file name: my-app.pdfProcessing your request...✔ Processing files... (23 processed)✔ PDF created with 23 files processed.
The directory doesn’t need to be a Git repository. Any directory structure works, as the tool processes files based on directory traversal, not Git metadata.
This means you can convert:
Git repositories (.git directory is automatically excluded)