DiffAgent
A tool for automatically committing and summarizing git changes.
Installation
Install via pip:
pip install diff_agent
Usage
from diff_agent import DiffAgent
# Initialize the DiffAgent with desired model and prompt
agent = DiffAgent(
model="ollama/llama3.1", # Default model
prompt="Summarize the code changes clearly and concisely",
strong_model="openai/gpt-4o-mini", # Strong model for larger diffs
strong_model_threshold=10, # Threshold to switch to strong model
max_diff_len=5000, # Max chars to send to the model
log_file="whatIdid.txt" # Optional log file to track changes
)
# Run the process and get the summary of changes
change_summary = agent.run()
# Print the result
print(change_summary)
Features
- Automatically switch to a branch for commits and back to your original branch
- Summarize code changes using LLMs
- Ignore specified files from Git tracking
- Log changes to a human-readable file
- Switch to a more powerful model for complex changes
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for diff-agent 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| diff_agent-0.1.3.tar.gz | 7.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diff_agent-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.5 kB
Release files / diff_agent-0.1.3.tar.gz
| Download URL | diff_agent-0.1.3.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2aa4ac44544cf5abae41146f1d0be38000e35482c9d29033c7b5526fce379c1
|
|
BLAKE2b-256 checksum How to use checksums |
6cc0da7d59654c7d4e7955966caee2864ca8dde26c45e0b9c914ab5b5e1f1663
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / diff_agent-0.1.3-py3-none-any.whl
| Download URL | diff_agent-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b8f7ce3a5c00bb80406902ba6111e9eefc37465481fa8e161ce824ea9ccf41d
|
|
BLAKE2b-256 checksum How to use checksums |
7f2e13b57321f76bf63f656663ae37e9d14c9efcf93c297fb213cf225a374366
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for diff-agent 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.