Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajofearth/github-repo-to-prompt
A web app that fetches a GitHub repository's structure and file contents, then generates a clean, LLM-readable prompt. Perfect for analyzing or processing repos with AI tools. Built with Python, Streamlit, and GitHub API.
https://github.com/rajofearth/github-repo-to-prompt
ai llm prompt python streamlit
Last synced: about 1 month ago
JSON representation
A web app that fetches a GitHub repository's structure and file contents, then generates a clean, LLM-readable prompt. Perfect for analyzing or processing repos with AI tools. Built with Python, Streamlit, and GitHub API.
- Host: GitHub
- URL: https://github.com/rajofearth/github-repo-to-prompt
- Owner: rajofearth
- Created: 2024-12-30T15:33:23.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-12-30T16:33:14.000Z (about 1 month ago)
- Last Synced: 2024-12-30T17:28:47.721Z (about 1 month ago)
- Topics: ai, llm, prompt, python, streamlit
- Language: Python
- Homepage: https://gh-repo-to-prompt.streamlit.app/
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Repo to LLM Prompt
## Description
A Streamlit web application that fetches the contents of a GitHub repository and generates a structured prompt for large language models (LLMs).
- View it live [here](https://gh-repo-to-prompt.streamlit.app/)
## Features
- Fetches repository contents using GitHub API.
- Generates a tree-like structure of the repository.
- Includes file contents in the prompt.
- User-friendly interface with sidebar for settings.## Prerequisites
- Python 3.7 or higher
- Streamlit, requests libraries
- A GitHub Personal Access Token## Installation
1. Clone the repository:
```bash
git clone https://github.com/rajofearth/github-repo-to-prompt.git
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Obtain a GitHub Personal Access Token and save it in `api_key.txt`(Optional):
```
your_token_here
```
4. Add `api_key.txt` to `.gitignore` to prevent it from being tracked.## Usage
1. Run the app:
```bash
streamlit run app_streamlit.py
```
2. Open a web browser and navigate to [http://localhost:8501/](http://localhost:8501/).
3. Enter a GitHub repository URL and submit to generate the prompt.## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
## License
MIT License
## Contact
For questions or feedback, contact [[email protected]] or visit [github.com/rajofearth].