Git AI Summarize
A command-line tool for summarizing changes in Git repositories using AI.
Installation
pip install git-ai-summarize
Requirements
- Python 3.8 or higher
- An API key for Anthropic (or your preferred LLM)
Setup
Set an environment variable with your LLM API key. To use the default Anthropic model, use:
export ANTHROPIC_API_KEY='your-api-key-here'
Add this to your shell profile to make it permanent.
Commands
Summarize changes between commits
Provide a commit hash or a range of commits to get a summary of the changes.
# Compare with HEAD
git summarize <commit-hash>
# Compare any two commits
git summarize <commit1>..<commit2>
Pull and summarize changes
Pass the --pull flag to pull changes from the remote and summarize the changes since the last pull.
git summarize --pull
Using alternative LLM providers/models
You can pass the --provider and --model argument to use a different LLM provider/model. The default provider is anthropic, and the default model is claude-3-5-sonnet-latest. To get a list of all supported providers, run:
git summarize --list-providers
To get a list of all supported models for a provider, see the LLM providers' documentation.
Depending on the provider, you may need to set additional environment variables with that provider's API key (e.g., ANTHROPIC_API_KEY for Anthropic/Claude, OPENAI_API_KEY for OpenAI/GPT, etc.).
To change your default provider/model, you can set the GIT_SUMMARIZE_PROVIDER and GIT_SUMMARIZE_MODEL environment variables.
If you would like to use a model by a provider that is not currently supported by this package, feel free to submit an Issue with the name of the model/provider and we can look into it. If it is supported by LangChain, we can most likely add it.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
GNU GPLv3 License
Metadata
Release files for git-ai-summarize 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git_ai_summarize-0.1.4.tar.gz | 18.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_ai_summarize-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.4 kB
Release files / git_ai_summarize-0.1.4.tar.gz
| Download URL | git_ai_summarize-0.1.4.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64154137fe451805c47c7a1696f4c3c21440ff2408f259a532c0398f83a12254
|
|
BLAKE2b-256 checksum How to use checksums |
1d65868bd359ea5a3da39f1acd8b0736db45ead95c251df5553ed6f69e311aa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / git_ai_summarize-0.1.4-py3-none-any.whl
| Download URL | git_ai_summarize-0.1.4-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c9801e7d912d58588ffda9fb3a8515be2708c20fd8f0caadc3dacd7994ac399
|
|
BLAKE2b-256 checksum How to use checksums |
344e0d0dc8f13cd1528c57169d07e4393a11e17420e28cf92839a0e326514ebe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|