GitLit is a Python-based tool designed to analyze GitHub repositories and generate informative articles about the latest and greatest open source projects. It leverages the power of OpenAI's GPT-4 model to create detailed outlines and articles about the technical details of the repositories, focusing on system architecture, design decisions, and unique features of the code.
This tool is perfect for technical writers, software developers, and anyone interested in learning more about the inner workings of trending GitHub repositories. GitLit takes the hassle out of manually analyzing code and provides a comprehensive overview of the project in an easy-to-understand format. 📖
To install GitLit, clone the repository and install the required dependencies:
git clone https://github.com/username/gitlit.git
cd gitlit
pip install -r requirements.txt
To use GitLit, you need to have a GitHub token. This token should be stored in a .env
file in the root directory of the project. The token is used to query the GitHub API for trending repositories.
Once you have the token set up, you can run the generate.py
script to start analyzing repositories:
python git_lit/generate.py
.gitignore
: Specifies intentionally untracked files to ignore.git_lit/config.py
: Contains configuration settings for the project.git_lit/generate.py
: Main script for analyzing GitHub repositories and generating articles.LICENSE
: MIT License for the project.output.md
: Example output of an article generated by GitLit.turbo_docs.toml
: Configuration file for Turbo Docs.
Here's an example of how to use the generate_article
function in generate.py
:
from git_lit.generate import generate_article
# Get the content of a repository
repo_content = get_repo_content(user="username", repo="repository")
# Generate an article about the repository
article, logs = generate_article(repo_content)
# Print the article
print(article)
GitLit is licensed under the MIT License. See the LICENSE
file for more details.