Skip to content

Convert entire GitHub repositories to a simple txt file to pass to your favorite AI

Notifications You must be signed in to change notification settings

MartinPSDev/repo2txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

repo2txt

Converts public Github repositories into txt files that can then be used by LLMs to help you analyze, modify, improve, train an AI, or whatever you need. Returns the entire folder, file, and code structure.

  • 🪟 🐧 Cross-platform support

Installation

Usage

 python repo2txt <repository-url>

Example

python repo2txt https://github.com/username/repository

@M4rt1n_0x1337

🚀Updates

A new feature has been added so that if the file is very large it can be split into several smaller files that fit the maximum accepted by the LLM. The size of each file can be chosen with the parameter -f / --fragment followed by the number in megabytes.

$ python repo2txt.py -h 
usage: repo2txt.py [-h] [-f FRAGMENT] repo_url

Convert GitHub repository to text file

positional arguments:
  repo_url              GitHub repository URL

options:
  -h, --help            show this help message and exit
  -f FRAGMENT, --fragment FRAGMENT
                        Split output into files of specified size in MB

Example

split image

License

MIT

About

Convert entire GitHub repositories to a simple txt file to pass to your favorite AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages