Giter Club home page Giter Club logo

repo2text's Introduction

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.

repo2text's People

Contributors

yashjain14 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.