This is a Node.js terminal application and CLI tool that converts a GitHub repository (public or private) or a local repository to a single XML or TXT file for LLM input.
- Clone from GitHub (supports authentication for private repos) or use a local path (interactive mode)
- Outputs a single XML or TXT file with the full contents of each file
- Default exclusion list (
node_modules,.git, etc.) - XML output follows a standardized schema (interactive mode)
- Global CLI: Flatten any directory to a single
repo.txtfile with no prompts - Skips binary files and large files by default
npm install -g .From any directory:
repotoxml --flat
# or
repotoxml -f- Recursively collects all text/code files (skipping hidden/system folders)
- Outputs a single
repo.txtfile in the current directory - No prompts or interaction
From any directory:
repotoxml- Choose between flattening the directory or using the interactive workflow
- Interactive workflow allows cloning GitHub repos, custom exclusions, XML/TXT output, and more
You can also run locally with:
npm install
node index.jsFollow the prompts to select your repo and output options.