This app is to be used in conjunction with mckaywrigley's xml parser.
The RePrompt is a tool designed to create a comprehensive context file (repo-context.txt
) for AI coding assistants like ChatGPT. The context file aggregates essential information from your repository, including an overview, directory tree, excluded and included files, highlighted file contents, and additional static sections like a to-do list.
- Streamlit Web App: Intuitive interface to select folders, configure file inclusions/exclusions, and generate the context file.
- Context File Generation: Produces a
repo-context.txt
file tailored for AI assistants. - Configurable Directory Tree: Exclude specified directories and files from the context.
- File Content Integration: Includes syntax-highlighted contents of key files.
- Static Content Integration: Adds static sections from files such as
overview.txt
andto-do_list.txt
. - Save & Load Configurations: Retain file inclusion/exclusion preferences for future sessions.
- Default Exclusions: Automatically excludes common directories and files to avoid unnecessary content.
- Python 3.7 or higher: Download from python.org
- Git: Download from git-scm.com
RePrompt/
├── src/
│ ├── app.py # Main Streamlit application
│ ├── generate_repo_context.py # Context generation script
│ ├── config.yaml # Configuration file
│ ├── index.html # The webpage file
│ └── requirements.txt # Python dependencies
git clone https://github.com/PR0M3TH3AN/RePrompt
cd RePrompt
# Create virtual environment
python -m venv venv
# Activate using Command Prompt
venv\Scripts\activate
# Create virtual environment
python3 -m venv venv
# Activate
source venv/bin/activate
cd src
Update pip first:
python -m pip install --upgrade pip
pip install -r requirements.txt
Required packages:
streamlit
PyYAML
pyperclip
streamlit run app.py
The application will open in your default web browser at http://localhost:8501
.
- There is a basic
config.yaml
file created for you in the src directory:
exclude_dirs:
- node_modules
- venv
- __pycache__
- .git
- dist
- build
- logs
- .idea
- .vscode
important_files: []
custom_sections: []
- Click "Choose Folder" in the sidebar
- Navigate to your target repository
- Select the folder
- Select directories to include in the "Include in Directory Tree" section
- Exclude specific files if needed
- Review the "Final Included Files" list
- Click "Generate Context File"
- Download or copy the generated context
- Save your configuration if desired
Edit DEFAULT_EXCLUDED_DIRS
and DEFAULT_EXCLUDED_FILES
in app.py
:
DEFAULT_EXCLUDED_DIRS = [
"node_modules",
"venv",
"__pycache__",
".git",
"dist",
"build",
"logs",
".idea",
".vscode"
]
DEFAULT_EXCLUDED_FILES = ["repo-context.txt"]
-
Tcl_AsyncDelete Warning
Tcl_AsyncDelete: async handler deleted by the wrong thread
This warning can be safely ignored; it doesn't affect functionality.
-
Permission Denied When Creating Directories
- Run terminal/command prompt as administrator
- Check folder permissions
- Ensure you have write access to the installation directory
-
Package Installation Failures
# If pip install fails, try: python -m pip install --upgrade pip pip install -r requirements.txt
-
Streamlit Port Already in Use
- Kill any running Streamlit processes
- Change the port:
streamlit run app.py --server.port 8502
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.