Rails LLMinator is a Python script that analyzes a local Ruby on Rails project and generates a zip file containing the relevant project files along with analysis instructions. This tool is designed to help you understand the structure, purpose, and functionality of a Ruby on Rails project.
Before running the script, make sure you have the following dependencies installed:
- Python 3.x
gitpython
libraryrubyparser
librarytqdm
library
You can install the required libraries using pip:
pip install gitpython rubyparser tqdm
-
Clone or download this repository to your local machine.
-
Open a terminal or command prompt and navigate to the directory where the
repototxt.py
script is located. -
Run the script using the following command:
python repototxt.py
-
When prompted, enter the path to your local Ruby on Rails project.
-
The script will analyze the project and generate a zip file named
<project_name>_contents.zip
in the same directory as the script. -
The zip file will contain the relevant project files and a set of instructions to guide you in analyzing the project.
The script will provide the following output:
- Project summary: A summary of the project, including its structure, dependencies, and key components.
- Zip file: A zip file containing the relevant project files for further analysis.
- Analysis instructions: A set of instructions to guide you in understanding the project's purpose, functionality, and potential areas for improvement.
If you want to customize the analysis or extract additional information from the Ruby on Rails project, you can modify the analyze_rails_project
function in the repototxt.py
script. This function is responsible for extracting relevant information from the project's controllers, models, views, routes, and dependencies.
- The script currently supports analyzing Ruby on Rails projects only.
- The accuracy and completeness of the analysis depend on the implementation of the
analyze_rails_project
function. You may need to adapt it based on your specific project structure and requirements.
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.
Rails LLMinator is originally forked from https://github.com/Doriandarko/RepoToTextForLLMs/ by https://github.com/Doriandark
This project is licensed under the MIT License.