Github2Text is a Python application that allows users to easily convert the contents of a GitHub repository into a single text file. It provides a graphical user interface for selecting specific files from the repository and generating a comprehensive text output.
- Fetch files from any public GitHub repository
- Select/deselect specific files to include in the output
- Real-time preview of the generated content
- Save the output as a .txt file
- Copy the generated content to clipboard
- Display character count and estimated token count
-
Clone this repository:
git clone https://github.com/yourusername/Github2Text.git cd Github2Text -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required dependencies:
pip install -r requirements.txt
-
Run the script:
python Github2Text.py -
Enter the URL of the GitHub repository you want to convert.
-
Click "Fetch Files" to retrieve the repository structure.
-
Select/deselect the files you want to include in the output.
-
Use the "Save as .txt" button to save the generated content to a file, or "Copy Content" to copy it to your clipboard.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.

