Skip to main content

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 .git and __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.

Metadata

Release files for repo2text 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repo2text 0.1.1
File Size Uploaded Provenance
repo2text-0.1.1.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for repo2text 0.1.1
File Interpreter ABI Platform
repo2text-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / repo2text-0.1.1.tar.gz

Download URL repo2text-0.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c7fec2f18adb5831a22b96a87ce0f0b1ccc87bb1c4af62aee8e84dc4766f512
BLAKE2b-256 checksum
How to use checksums
5b001f40923c45fce9fa2fa8967526f11aad9cd3ba8f97798a7553ae4641e1d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release files / repo2text-0.1.1-py3-none-any.whl

Download URL repo2text-0.1.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
725b16ee482800ca23fed189e4aa63a2f5ace09d45a61399fd02b05f3883467b
BLAKE2b-256 checksum
How to use checksums
19fff364daca25a8695adb5a31d8937ca8645c989d089cdc036b83166166b5f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Security for repo2text 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page