CLI tool to convert GitHub repos to text files for LLMs
Top 62.3% on sourcepulse
This CLI tool converts GitHub repositories into single text files, ideal for LLM training, analysis, or documentation. It targets developers and researchers needing to process codebases efficiently, offering automatic binary exclusion and configurable file size limits.
How It Works
The tool recursively downloads a specified GitHub repository, excluding binary files and those exceeding a configurable size threshold (default 100KB). It then concatenates the content of eligible files into a single text file, clearly marking each file's path and size before its content. This approach simplifies large-scale code processing for AI models.
Quick Start & Requirements
npm install -g git2txt
git2txt username/repository
or git2txt https://github.com/username/repository
.--output
, --threshold
, --include-all
, --debug
.Highlighted Details
.git
directories.Maintenance & Community
The project is open for contributions, with a guide available for interested parties.
Licensing & Compatibility
Limitations & Caveats
By default, files larger than 100KB and binary files are excluded, which might require using the --include-all
flag for comprehensive processing.
8 months ago
Inactive