This project streamlines the integration of GitHub repositories into a single Markdown file, making it easier to feed the content into large language models like Kimi for enhanced learning and analysis of source code. This tool is ideal for developers and researchers who seek to leverage AI to understand and document complex codebases efficiently.
- Repository Cloning: Clone repositories using a simple command with the URL of the repository.
- File Traversal: Traverse the file structure of the cloned repository and process files based on predefined or user-specified patterns.
- Markdown Generation: Convert code and comments within the repository into a Markdown format for easier viewing and analysis.
- Configurable File Handling: Use a YAML configuration file to specify patterns of files to skip during the traversal process, making the tool adaptable to different project needs.
Ensure you have the following installed on your system:
- Go 1.15 or higher
- Git
- Clone this repository:
git clone https://github.com/yourusername/your-repository.git cd your-repository
- Build the project:
go build -o code-analysis ./cmd
Edit the config/config.yml
file to specify patterns of files you wish to skip during analysis:
skip_patterns:
- "*.tmp"
- "*.log"
- ".git"
To analyze a repository, run the following command:
./code-analysis <repository-url>
This will clone the repository, traverse its structure based on your configuration, and output a Markdown file in the outputs
directory.
Contributions to enhance functionality, improve efficiency, or fix bugs are always welcome. Please feel free to fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all the contributors who have helped shape this project.
- Special thanks to the developers and researchers of the Kimi language model for providing the inspiration and foundational technologies necessary for this project.