thePR0M3TH3AN f08b3f1e82 Refactor README.md to introduce RePrompt repository-context generator
Update README.md to reflect the new purpose of the repository as a context generator for AI coding assistants. Replace previous content about lagged oil and unemployment charting with detailed features, installation instructions, and usage guidelines for the RePrompt tool.
2025-05-30 16:09:03 -04:00
2025-05-29 16:18:32 -04:00
2025-05-30 16:02:18 -04:00

RePrompt – Repository-Context Generator

RePrompt creates a single repo-context.txt file that gives AI coding assistants (e.g. ChatGPT) a concise, opinionated snapshot of your repository.
It combines an overview, directory tree, highlighted file contents, and optional static sections such as to-do lists—all configurable through a Streamlit UI.

Works great with
mckaywrigley’s XML parser.


✨ Features

Category What it does
Streamlit UI Choose a target repo, set include/exclude rules, and generate the context file in one screen.
Context builder Produces repo-context.txt tailored for AI assistants.
Configurable tree Exclude or include directories/files interactively (defaults skip noisy folders like node_modules, .git, etc.).
File highlights Embeds syntax-highlighted contents of “important” files you pick.
Static sections Auto-appends overview.txt, to-do_list.txt, or any custom text snippets.
Save & load config Persist your include/exclude selections for future sessions.

🛠 Prerequisites


🗂 Directory layout


RePrompt/
├── src/
│   ├── app.py                   # Streamlit entry-point
│   ├── generate\_repo\_context.py # Core context-builder
│   ├── config.yaml              # Default config (auto-generated if absent)
│   ├── index.html               # Single-page static explanation
│   └── requirements.txt         # Python dependencies
└── README.md


🚀 Installation

1 Clone the repo

git clone https://github.com/PR0M3TH3AN/RePrompt.git
cd RePrompt

2 Create & activate a virtual-environment

Windows (PowerShell)
python -m venv venv
venv\Scripts\Activate.ps1
macOS / Linux
python3 -m venv venv
source venv/bin/activate

3 Install dependencies

python -m pip install --upgrade pip
pip install -r src/requirements.txt

requirements.txt contains only three packages:

streamlit
PyYAML
pyperclip

▶️ Running the app

streamlit run src/app.py

The UI opens at http://localhost:8501.


📝 Usage walk-through

  1. Config file A starter config.yaml is created in src/:

    exclude_dirs:
      - node_modules
      - venv
      - __pycache__
      - .git
      - dist
      - build
      - logs
      - .idea
      - .vscode
    
    important_files: []
    custom_sections: []
    
  2. Select repo Click “Choose Folder” in the sidebar, navigate to the repository you want to summarise, and select it.

  3. Fine-tune files

    • Tick directories to include in the rendered tree.
    • Exclude noisy or irrelevant files.
    • Review the final list.
  4. Generate Hit “Generate Context File”. Download or copy the result; optionally save the configuration for later.


🔧 Customisation tips

Change default exclusions

Edit these constants in src/app.py:

DEFAULT_EXCLUDED_DIRS = [
    "node_modules", "venv", "__pycache__", ".git",
    "dist", "build", "logs", ".idea", ".vscode"
]
DEFAULT_EXCLUDED_FILES = ["repo-context.txt"]

Different port

If port 8501 is busy:

streamlit run src/app.py --server.port 8502

❓ Troubleshooting

Problem Fix
Tcl_AsyncDelete warning Harmless—ignore it.
“Permission denied” when creating dirs Run your terminal as admin or check folder write permissions.
Packages won’t install python -m pip install --upgrade pip then reinstall.
Port already in use Kill other Streamlit processes or use --server.port.

🤝 Contributing

  1. Fork → create a feature branch
  2. Commit & push your changes
  3. Open a Pull Request

📄 License

Distributed under the MIT License – see LICENSE for details.

S
Description
No description provided
Readme MIT
54 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 95.5%
Shell 3.5%
Makefile 1%