Assists with git workflows using LLMs.
Project description
DiffWeave AI
DiffWeave is a tool that automatically generates meaningful Git commit messages and pull request descriptions using large language models (LLMs). It analyzes your staged changes and creates descriptive commit messages, saving you time and ensuring consistent documentation.
Installation & Quick Start
You can run DiffWeave via uvx diffweave-ai or from a local checkout using uv run diffweave-ai while developing this repo.
DiffWeave is installed as an isolated tool using uv:
# Make sure you have uv installed first
# https://docs.astral.sh/uv/getting-started/installation/
uvx diffweave-ai
Usage
Configure a model
Before generating commit messages, configure your model. DiffWeave supports two authentication types:
Token-based (OpenAI-compatible endpoints):
uvx diffweave-ai set-token-model "your-model-name" \
--token "$YOUR_API_TOKEN" \
--endpoint "https://your-endpoint-url"
The --endpoint flag defaults to https://api.openai.com/v1 if omitted.
Databricks (browser-based authentication):
uvx diffweave-ai set-databricks-browser-model "your-model-name" \
--account "your-databricks-account"
This opens a browser window for authentication and caches the resulting token automatically.
Generate a commit message
Once you have a model configured and some changes staged in your current Git repository, run:
uvx diffweave-ai
This will:
- Show the current
git status. - Prompt you to stage files interactively.
- Generate a commit message using your configured model.
- Let you review and refine the message before committing.
- Run
git commit, then prompt whether togit push. - Optionally open the repository in a browser (requires
--open-browser).
If you prefer a simpler, natural-language style instead of Conventional Commits, pass --simple:
uvx diffweave-ai --simple
To preview a message without committing:
uvx diffweave-ai --dry-run
For scripted or automated workflows (skips all prompts, commits, and pushes automatically):
uvx diffweave-ai --non-interactive
Generate a pull request description
To generate a PR title and body based on the diff between your branch and main:
uvx diffweave-ai pr
The result is copied to your clipboard automatically. Use --branch to diff against a branch other than main:
uvx diffweave-ai pr --branch my-base-branch
Features
- AI-powered commit message generation based on staged diffs
- Pull request description generation with automatic clipboard copy
- Interactive or non-interactive workflows
- Token-based (OpenAI-compatible) and Databricks browser authentication
- Optional simpler commit style via
--simple - Optional push and browser-open flow after committing
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 diffweave_ai-2.0.2.tar.gz.
File metadata
- Download URL: diffweave_ai-2.0.2.tar.gz
- Upload date:
- Size: 659.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b8711edb378850bfadb8bcd036a9fc3c5e75e82025bbd80bdc4a999935c549
|
|
| MD5 |
d96e8c62704038cdc97c43d29d839605
|
|
| BLAKE2b-256 |
5a8272a11bb855fa904bc61f346741473f7dc2cd4b20793fccbbb8a5c5f9c352
|
Provenance
The following attestation bundles were made for diffweave_ai-2.0.2.tar.gz:
Publisher:
release.yml on block/diffweave-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffweave_ai-2.0.2.tar.gz -
Subject digest:
61b8711edb378850bfadb8bcd036a9fc3c5e75e82025bbd80bdc4a999935c549 - Sigstore transparency entry: 1243605626
- Sigstore integration time:
-
Permalink:
block/diffweave-ai@fddfe181dfb751b6db60613638c2bd674a87a5d2 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/block
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fddfe181dfb751b6db60613638c2bd674a87a5d2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file diffweave_ai-2.0.2-py3-none-any.whl.
File metadata
- Download URL: diffweave_ai-2.0.2-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a9da79ff778f1b32c437d2b124e69eaf080df34e25a23ede757ace60402203d
|
|
| MD5 |
c06f02ee77017f79c5e0fb24072f54a1
|
|
| BLAKE2b-256 |
6984f8c97b29caf1cbe29c5bbc8a6d255a34fc88459dfe0d0268a1d3bb39cd26
|
Provenance
The following attestation bundles were made for diffweave_ai-2.0.2-py3-none-any.whl:
Publisher:
release.yml on block/diffweave-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffweave_ai-2.0.2-py3-none-any.whl -
Subject digest:
6a9da79ff778f1b32c437d2b124e69eaf080df34e25a23ede757ace60402203d - Sigstore transparency entry: 1243605656
- Sigstore integration time:
-
Permalink:
block/diffweave-ai@fddfe181dfb751b6db60613638c2bd674a87a5d2 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/block
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fddfe181dfb751b6db60613638c2bd674a87a5d2 -
Trigger Event:
release
-
Statement type: