Piro is a 100% client-side web application designed to completely automate the tedious process of converting GitHub repositories into readable, formatted documents.
Whether you are a Computer Science student compiling 50 source files into a Microsoft Word (.docx) report for a final project, or a developer trying to feed an entire codebase into an LLM (like ChatGPT or Claude) via Markdown (.md), Piro does the heavy lifting in seconds.
Try it directly in your browser: https://mtalha1012.github.io/Piro/
- Instant Document Generation (.docx): Compiles selected codebase files into a single, clean Microsoft Word document.
- Flawless Syntax Highlighting: Replicates the VS Code experience directly inside Word with dynamic Dark and Light themes.
- AI Context Export (.md): Instantly stitch your entire repository into a flat Markdown file—the most token-efficient format for feeding large codebases into AI context windows.
- Interactive File Tree: Fetch any public repository and use the graphical file tree to precisely include or exclude specific files and folders.
- 100% Serverless Architecture: Everything runs locally in your browser. There is no backend, no database, no sign-ups, and no code ever leaves your machine.
- Cross-Platform Resiliency: Documents are strictly sanitized at the byte level to prevent XML corruption, ensuring the
.docxfiles open perfectly on Windows, macOS, and iOS. - Personal Access Token Support: Seamlessly bypass GitHub's 60-request/hour unauthenticated API limit for massive repositories by providing a local-only token.
Piro was built as a lightweight, lightning-fast vanilla web app.
- Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+)
- APIs: GitHub REST API (Trees, Contents)
- Libraries:
docx- For client-side Word document generation.highlight.js- For precise, multi-language syntax parsing.FileSaver.js- For triggering local file downloads.
Piro operates in a two-phase client-side pipeline:
- Mapping (Phase 1): The app makes a
recursive=1call to the GitHub API to fetch the complete directory tree. It filters out binary files (like.exe,.mp4) and unsupported images, then dynamically renders an interactive DOM tree for the user. - Stitching (Phase 2): Based on the user's selection, Piro batches raw file requests. For Word exports, the code is parsed by
highlight.jsto assign color classes, which are then mapped todocxTextRuns to preserve indentation and color. For Markdown exports, it simply concatenates the raw text wrapped in appropriate language backticks.
Since Piro has no backend, running it locally is incredibly simple.
- Clone the repository:
git clone [https://github.com/mtalha1012/piro.git](https://github.com/mtalha1012/piro.git)
