Caution
Disclaimer: This code is provided "as is" without any warranties, express or implied. The author is not responsible for any damages resulting from its use.
This repository contains a Python script, RepoRipper.py, downloads your whole git repo to a .txt file so you can share it with any AI model.
OpenAI | Claude | Gemini
MODEL | WEBSITE |
---|---|
OpenAI 1 | https://openai.com/chatgpt |
Claude 2 | https://claude.ai/ |
Gemini 3 | dont know why their link so long |
Caution
Be aware that large repositories may encounter rate limits when using this script due to GitHub API restrictions. This is an inherent limitation and not a fault of the script itself.
Requirements:
- Python 3
requests
librarybase64
librarydotenv
librarytqdm
librarycolorama
library
Setup:
-
Create a
.env
file:-
In the same directory as the script, create a file named
.env
. -
Add the following line to the file, replacing the placeholder with your actual GitHub personal access token:
GITHUB_TOKEN=your_github_token
-
-
Install dependencies:
-
Open a terminal in the script's directory and run the following command:
pip install requests base64 dotenv tqdm colorama
-
Usage:
-
Run the script:
-
Execute the script using:
python3 reporipper.py https://github.com/yourname/yourrepo
-
-
** Select an ouput directory:**
- Enter -o followed by the path to the directory where you want to save the downloaded text file.
python3 reporipper.py https://github.com/yourname/yourrepo -o /path/to/save/directory
-
Custom Exclusions List:
- Enter -e followed by the path to the exclusion list file.
python3 reporipper.py https://github.com/yourname/yourrepo -e /path/to/exclusion_list.txt
-
Wait for download:
- The script will fetch the files and save them to a single text file in the current directory or the specified
SAVE_DIRECTORY
in the.env
file.
- The script will fetch the files and save them to a single text file in the current directory or the specified
Customization:
- You can modify the
exclusion_list.txt
file to add or remove file types and directories to be excluded by default. - You can set the
SAVE_DIRECTORY
environment variable in the.env
file to specify where the downloaded text file should be saved.
Note
- Make sure your GitHub personal access token` has the necessary permissions to access the repository.
- The script will skip binary or non-UTF-8 files.
- The script will overwrite any existing file with the same name in the save directory.
- #1
- Validate User Inputs
- Handle API Rate Limiting
- Cross-Platform Testing
- Legal and Ethical Considerations
- Enhance Binary File Handling
Footnotes
-
here is the raw link lol https://openai.com/chatgpt ↩
-
here is the raw link lol https://claude.ai/ ↩
-
here is the raw link lol https://gemini.google.com/?utm_source=google&utm_medium=cpc&utm_campaign=2024enUS_gemfeb&gad_source=1&gclid=CjwKCAjwh4-wBhB3EiwAeJsppOWzLIcw-EAxub7vOFjZb_hcQoMWw1sPL-BPdHTQ99DZnQtS5NzRnhoC41oQAvD_BwE ↩
-
Legal
https://docs.github.com/en/site-policy/github-terms/github-community-guidelines ↩ -
Legal
https://docs.github.com/en/site-policy/github-terms/github-open-source-applications-terms-and-conditions ↩ -
Legal
https://docs.github.com/en/site-policy/github-terms/github-marketplace-developer-agreement ↩ -
Legal
https://docs.github.com/en/site-policy/github-terms/github-terms-of-service ↩