AI Code Merge is a tool for concatenating codebases and preparing them for input into AI systems. It combines multiple code files from projects or repositories to facilitate codebase analysis or documentation generation.
- Concatenate multiple code files into a single file
- Support for various file types
- Customizable file inclusion/exclusion
- Command-line interface
- Graphical user interface
aicodemerge.py
: Core script for merging code files (CLI functionality)aicodemerge-gui.py
: Graphical interface for the AI Code Merge tool
-
Ensure Python 3.6 or later is installed.
-
Clone the repository:
git clone https://github.com/yourusername/ai-code-merge.git cd ai-code-merge
-
Install dependencies:
pip install -r requirements.txt
Run:
python aicodemerge.py [options] [file/directory paths]
Options:
-d, --max-depth
: Maximum depth for directory traversal-s, --max-size
: Maximum file size in KB to include-p, --patterns
: File patterns to include-o, --output
: Specify the output file name-v, --verbose
: Enable verbose output-c, --custom
: Use custom configuration mode
Example:
python aicodemerge.py -d 4 -s 100 -p "*.py,*.js" -o output.md ./project
Run:
python aicodemerge-gui.py
Features:
- Select or drag and drop a project folder
- Set maximum directory depth and file size
- Specify file patterns to include
- Customize exclude patterns
- Choose output file location
- Process the folder and generate output
This project is licensed under the MIT License - see the LICENSE file for details.
For issues or questions, please file an issue on the GitHub repository.