The rendergit CLI tool clones a GitHub repository and flattens its contents into a single, searchable HTML page. This page includes a directory tree, a table of contents, syntax-highlighted code, and a specialized "LLM View" containing the repository content in CXML format for easy copying into an LLM.
Basic Usage
Run the script with a GitHub repository URL:
python3 rendergit.py https://github.com/owner/repo
CLI Arguments
| Argument | Flag | Description |
|---|
repo_url | | The GitHub repository URL (e.g., https://github.com/owner/repo or https://github.com/owner/repo.git). |
--out | -o | Specify the output HTML file path. If omitted, a temporary file is created in your system's temp directory named after the repository. |
--max-bytes | | The maximum file size (in bytes) to render. Files exceeding this limit are listed in the HTML but their content is skipped. Default is 51200 (50 KiB). |
--no-open | | Prevents the script from automatically opening the generated HTML file in your default web browser. |
Example: Customizing output and size limit
To save the output to my_repo.html and allow files up to 1MB:
python3 rendergit.py https://github.com/owner/repo -o my_repo.html --max-bytes 1048576