A tool for automatically committing and summarizing git changes
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
diff_agent-0.1.3.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diff_agent-0.1.3.tar.gz.
File metadata
- Download URL: diff_agent-0.1.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2aa4ac44544cf5abae41146f1d0be38000e35482c9d29033c7b5526fce379c1
|
|
| MD5 |
d26494eff93acb545740bcada3b40761
|
|
| BLAKE2b-256 |
6cc0da7d59654c7d4e7955966caee2864ca8dde26c45e0b9c914ab5b5e1f1663
|
File details
Details for the file diff_agent-0.1.3-py3-none-any.whl.
File metadata
- Download URL: diff_agent-0.1.3-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b8f7ce3a5c00bb80406902ba6111e9eefc37465481fa8e161ce824ea9ccf41d
|
|
| MD5 |
dc79cbbb1615c73a858923baed8636b9
|
|
| BLAKE2b-256 |
7f2e13b57321f76bf63f656663ae37e9d14c9efcf93c297fb213cf225a374366
|