Mirrorepo is a tool designed for efficient code file consolidation with real-time updates and monitoring. Mirrorepo is ideal for developers who need to maintain a consolidated view of their codebase to prepare code for AI-assisted review.
To convert code files to a single text file:
- Select your code repo local folder.
- Click List Files and confirm the files selected. Press Download to Text.
- Now copy and paste the downloaded text file into your favorite A.I.
- You can also use the Code Watcher to have the text file automatically update when a file changes in your local code repo. Just press 'Start Watching' button.
- File consolidation with custom filtering and metadata inclusion
- Real-time file watching and incremental updates
- Smart ignore patterns for common build and configuration folders
- Support for multiple popular programming languages
- Compression support for output files
- Cross-platform compatibility (Windows, macOS, Linux)
- Dark mode support
- Keyboard shortcuts for common operations
- Detailed logging and progress tracking
- Language: Python 3.6+
- GUI Framework: Tkinter
- File Watching: watchdog library
- Diff Algorithm: difflib
- Compression: gzip
- Encoding Detection: chardet
-
Clone the repository:
git clone https://github.com/flexfinRTP/mirrorepo.git
-
Install dependencies:
pip install -r requirements.txt
Launch the application:
python autocodetext.py
While the current version focuses on GUI operation, CLI support is planned for future releases.
- Source Folder Selection: Choose the root folder containing your source code files.
- Output File Specification: Select where to save the consolidated text file.
- File Extension Filtering: Specify which file types to include.
- Ignore Patterns: Set patterns for files or folders to ignore.
- Custom Separator: Define a separator for file sections in the output.
- Compression Option: Compress the output file to save space.
- File Listing: Preview files that will be processed before consolidation.
- Download to Text: Consolidate selected files into a single text file.
- Real-time Watching: Monitor and update the consolidated file as changes occur.
- Dark Mode: Toggle between light and dark interface themes.
Default ignore patterns and popular file extensions are pre-configured in the script. Users can modify these in the GUI as needed.
- Incremental updates minimize I/O operations
- Multi-threading support for large codebases
- Efficient diff algorithm for change detection
- Asynchronous file reading and writing for improved responsiveness
- File Permission Issues: Ensure appropriate read/write permissions for source and output directories.
- Watcher Not Detecting Changes: Verify the correct folder is being watched and check IDE save behavior.
- High CPU Usage: Exclude frequently changing files or large binary files using ignore patterns.
- Encoding Errors: The tool attempts to detect file encoding, but may struggle with uncommon encodings.
Contributions to Mirrorepo are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License.
For more information or to report issues, please visit our GitHub repository.