Code Combine is a Python application that merges multiple code files from a selected directory into a single markdown file. This is particularly useful for preparing code snippets for Large Language Models (LLMs), as they process code more efficiently when provided with full context rather than individual file uploads.
- Select a directory containing code files.
- Combines all code files into a single markdown file.
- Handles encoding issues gracefully.
- Outputs the markdown file with a naming convention based on the directory and date.
- Python 3.x
- PyQt5
-
Clone the repository:
git clone https://github.com/yourusername/code-combine.git cd code-combine -
Install the required packages:
pip install PyQt5
-
Run the application:
python code-combine.py
-
Click on "Select Directory" to choose the folder containing your code files.
-
The application will create a markdown file named
directoryName_YYYY-MM-DD_output.mdin the current working directory.
I created this tool because I've noticed that LLMs process code more efficiently when you paste in the full context rather than uploading individual files. This application helps streamline that process.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.