A simple utility to convert repository files to text including specific file extensions
Project description
repo2text
repo2text is a Python utility designed to convert entire code repositories into text format. This tool is particularly useful for those who want to feed repository contents into large language models like Gemini 1.5, GPT-4, Claude, and others that can process extensive context windows. By turning repositories into plain text, repo2text facilitates easy ingestion of codebases into models for tasks such as code analysis, summarization, or other AI-driven evaluations.
Features
- Clone repositories and convert all files or specific types of files into a single text file.
- Ignore non-essential files like
.gitand__pycache__. - Flexible command-line interface to specify file types.
Installation
Install repo2text using pip:
pip install repo2text
Usage
After installation, repo2text can be used directly from the command line:
To convert all files in a repository:
repo2text https://github.com/YashJain14/Mini-Twitter
To convert only specific file types (e.g., Python files):
repo2text .py https://github.com/YashJain14/Mini-Twitter
Requirements
- Python 3.6 or higher
- GitPython
Contributing
Contributions are welcome! If you have suggestions for improvements or bug fixes, please create an issue or pull request.
License
repo2text is released under the MIT License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo2text-0.1.1.tar.gz.
File metadata
- Download URL: repo2text-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7fec2f18adb5831a22b96a87ce0f0b1ccc87bb1c4af62aee8e84dc4766f512
|
|
| MD5 |
ea75e2a0ddd2e63035f62f188b4eba6c
|
|
| BLAKE2b-256 |
5b001f40923c45fce9fa2fa8967526f11aad9cd3ba8f97798a7553ae4641e1d6
|
File details
Details for the file repo2text-0.1.1-py3-none-any.whl.
File metadata
- Download URL: repo2text-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
725b16ee482800ca23fed189e4aa63a2f5ace09d45a61399fd02b05f3883467b
|
|
| MD5 |
31cf83e16552b7dcf77bd5205b13f7bc
|
|
| BLAKE2b-256 |
19fff364daca25a8695adb5a31d8937ca8645c989d089cdc036b83166166b5f9
|