RepoToText  by JeremiahPetersen

Web app for LLM-based repo analysis

created 2 years ago
579 stars

Top 56.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a web application and a Python script to convert GitHub repositories and local folders into a single, organized text file. This consolidated file is designed for use with Large Language Models (LLMs), enabling users to interact with the entire codebase or documentation through a chatbot interface. The primary audience includes developers and researchers who need to analyze or query codebases efficiently.

How It Works

The web application utilizes Python Flask on the backend and React.js for the frontend, containerized with Docker. It leverages the GitHub API (via PyGithub) to scrape repository files and an optional documentation URL. The content is structured with '''--- delimiters, followed by file paths, and then the file content. This format allows LLMs to easily parse and understand the context of each file within the repository.

Quick Start & Requirements

  • Clone the repository, create a .env file with GITHUB_API_KEY, build with docker compose build, and run with docker compose up.
  • Access the web app at http://localhost:3000.
  • Requires Docker and a GitHub API key.
  • See Demo.

Highlighted Details

  • Converts entire GitHub repos or local folders into a single .txt file.
  • Appends optional documentation URLs to the beginning of the text file.
  • Supports filtering by specific file types.
  • Output files are saved in the /data folder with user, repo, and timestamp information.

Maintenance & Community

The project is maintained by JeremiahPetersen. The README indicates a web app build for repototext.com is planned.

Licensing & Compatibility

The README does not explicitly state a license.

Limitations & Caveats

The project is currently in development, with noted issues including broken handling for .ipynb files and a limitation in FolderToText requiring individual file selection rather than folder selection. Functionality for private repositories and tracking changes is listed as a future enhancement.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
11 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.