A simple tool that converts your local directory into a structured prompt for Large Language Models (LLMs). It helps you pick which files to include or ignore, then outputs everything in a format you can copy directly into an LLM for code review, analysis, or documentation.
Try it here: CodebaseToPrompt Web App
CodebaseToPrompt scans your chosen folder right in the browser (no files are uploaded anywhere) and builds a file tree. You can expand folders, see which files are text or code, and select only what you need. The selected files are then compiled into a snippet of structured text, which you can copy for use with an LLM.
-
Interactive File Tree
Explore and expand your local folders in a simple interface. -
File Filtering
Automatically ignores system or binary files (e.g.,.DS_Store
,node_modules
, images, videos). -
Local Storage
Your selections are remembered so you can pick up where you left off. -
LLM-Ready Output
Generates a format that’s easy to paste into chatbots and other AI tools. -
Token Count Estimate
Provides a rough calculation of how many tokens the selected content might use.
-
Open the App
Clone this repository, then openindex.html
in a modern browser (Chrome or Firefox recommended).git clone https://github.com/path-find-er/CodebaseToPrompt.git
-
Select Your Folder
Click “Select Directory” to choose the folder you want to analyze. -
Pick Files
Expand or collapse directories. Check or uncheck files to decide what gets included. -
Copy Output
View or copy your selected files in the generated prompt format by clicking “Copy to Clipboard.”
- Creating context for AI-based code review or Q&A
- Quickly extracting only the important parts of a large project for analysis
- Preparing short or large code snippets for LLM debugging
- Generating reference material for new developers or documentation
Certain folders and file types are automatically ignored (e.g., node_modules
, .git
, venv
, common binary files). You can modify the lists inside the JavaScript code (app.js
) if you need more control.
- Chrome/Chromium (recommended)
- Edge
- Firefox
- Safari (basic directory selection may vary)
Contributions are welcome! Feel free to open issues for bugs or requests. For major changes, create an issue to discuss them first.
- Fork and clone the repo
- Make your changes in a branch
- Open a Pull Request describing your updates
- Built with vanilla JavaScript and Web APIs
- Uses SheetJS for spreadsheet parsing
- Uses PDF.js for PDF parsing
- Open an issue on GitHub for ideas or bug reports
- Submit a Pull Request for direct contributions
- Reach out via the repo’s issues page if you have questions