A semi-autonomous framework for easily developing repo-wide changes
Project description
diffdev
diffdev is a command-line tool that helps you make repo-wide code changes using an AI assistant. It allows you to interactively select files, provide a prompt describing the desired changes, and apply the AI-generated modifications as a git patch.
Key Features
- File Selection: Use a TUI to select files to include in the context
- Context-Aware Changes: The AI assistant analyzes the selected files and your prompt to generate contextual changes
- Structured Patch Generation: Changes are returned as a git-style patch for easy application and review
- Revision Control Integration: Apply patches using
git applyand rollback changes when needed - Claude AI Assistant: Leverages the powerful Claude language model from Anthropic
Requirements
- Python 3.11 or higher
- Git installed and available in PATH
- Anthropic API key
Installation
# Install from PyPI
pip install diffdev
# Set your Anthropic API key
export ANTHROPIC_API_KEY="your-api-key-here"
Usage
- Navigate to your git repository
- Run
diffdev - Use the TUI to select files for context:
- Space: Toggle file/directory selection
- Tab: Expand/collapse directories
- Enter: Confirm selection
- q: Quit selection
- Enter your prompt describing the desired changes
- Review and confirm the generated patch
Commands
select: Open file selector to update contextundo: Rollback last applied changesredo: Reapply last rolled back changesexit: Exit diffdev
Example
$ cd my-project
$ diffdev
Starting diffdev...
Select files to include in the context:
[ ] + src/
[ ] + tests/
[ ] README.md
# After selecting files and confirming...
Enter command or prompt: Add type hints to the User class methods
# AI will analyze files and generate changes
# Changes are applied as a git patch that can be rolled back if needed
Development
Contributions are welcome! Please feel free to submit a Pull Request.
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
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 diffdev-0.1.2.tar.gz.
File metadata
- Download URL: diffdev-0.1.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c60408ac5c5e672b08bc20e038b0b2b85356b08f2feab6456020520622f9d5f
|
|
| MD5 |
4e1ccf88403f7f8e66f81758776e9154
|
|
| BLAKE2b-256 |
d9d5c3ecb41f3f56f1382789f22a856236acc203ca6134b44d7550730316d0bc
|
Provenance
The following attestation bundles were made for diffdev-0.1.2.tar.gz:
Publisher:
publish.yml on Mockapapella/diffdev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffdev-0.1.2.tar.gz -
Subject digest:
1c60408ac5c5e672b08bc20e038b0b2b85356b08f2feab6456020520622f9d5f - Sigstore transparency entry: 153734812
- Sigstore integration time:
-
Permalink:
Mockapapella/diffdev@7813f6237b3b9da263728e60f5dd68aac4f98354 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Mockapapella
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7813f6237b3b9da263728e60f5dd68aac4f98354 -
Trigger Event:
release
-
Statement type:
File details
Details for the file diffdev-0.1.2-py3-none-any.whl.
File metadata
- Download URL: diffdev-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63ee38066d8a25dcbe55ef8d7250119db2582061501f52d676ad93beecf68fc9
|
|
| MD5 |
f5c97b926b19dbd6a76bc11855ae3af1
|
|
| BLAKE2b-256 |
b54e79283719c99bf88be75555889f1e83fcd0e487552a899094e9c03a9b31ac
|
Provenance
The following attestation bundles were made for diffdev-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Mockapapella/diffdev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffdev-0.1.2-py3-none-any.whl -
Subject digest:
63ee38066d8a25dcbe55ef8d7250119db2582061501f52d676ad93beecf68fc9 - Sigstore transparency entry: 153734815
- Sigstore integration time:
-
Permalink:
Mockapapella/diffdev@7813f6237b3b9da263728e60f5dd68aac4f98354 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Mockapapella
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7813f6237b3b9da263728e60f5dd68aac4f98354 -
Trigger Event:
release
-
Statement type: