![Screenshot 2024-08-16 at 5 33 47 PM](https://private-user-images.githubusercontent.com/11506905/358576170-5d650269-addd-4bd0-851e-ab29b0be9f36.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5ODUwNzksIm5iZiI6MTczOTk4NDc3OSwicGF0aCI6Ii8xMTUwNjkwNS8zNTg1NzYxNzAtNWQ2NTAyNjktYWRkZC00YmQwLTg1MWUtYWIyOWIwYmU5ZjM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDE3MDYxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZiNmU0NDQyMTU4ZmI2ZjhiNzk2MGRmYmIzMjAwZGJjNWQ5ZDc0ZjQxYWRkMzYxOTZkYzdlNDVjMjliNjJiZjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.l5SmJ0fFClKxhzxy0AyhPE_7VuC9U99_fRg14j17cCU)
This repository contains a Python script that automatically generates README.md files for GitHub repositories using Google AI.
- Clones a given GitHub repository.
- Merges all code files into a single file for analysis.
- Sends the merged code to Google AI's Gemini Pro model.
- Uses a prompt engineered to generate human-like and informative README content.
- Writes the generated README back to the cloned repository.
- Python 3.7+
- gitpython
- google-cloud-aiplatform
- vertexai
You can install the necessary packages using:
pip install -r requirements.txt
-
Set up Google Cloud Project and Vertex AI API:
- Create a Google Cloud Project (https://cloud.google.com/).
- Enable the Vertex AI API.
- Create a service account and download its JSON key file.
- Set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of your JSON key file:export GOOGLE_APPLICATION_CREDENTIALS="path/to/your/keyfile.json"
-
Get Repository URL:
- Get the repository URL from Github. This should be the complete path with the
.git
extension
- Get the repository URL from Github. This should be the complete path with the
-
Run the script:
python helpme_readme.py --repo_url=<Github URL>
The script will generate or update the README.md
file in the cloned repository directory.
- The quality of the generated README depends on the complexity and clarity of the codebase.
- This is an experimental tool and may require further refinement or customization.