claude-commit 0.7.0__tar.gz → 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {claude_commit-0.7.0/src/claude_commit.egg-info → claude_commit-0.8.0}/PKG-INFO +6 -10
- {claude_commit-0.7.0 → claude_commit-0.8.0}/README.md +5 -9
- {claude_commit-0.7.0 → claude_commit-0.8.0}/pyproject.toml +1 -1
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit/main.py +51 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0/src/claude_commit.egg-info}/PKG-INFO +6 -10
- {claude_commit-0.7.0 → claude_commit-0.8.0}/LICENSE +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/setup.cfg +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit/__init__.py +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit/config.py +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit.egg-info/SOURCES.txt +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit.egg-info/dependency_links.txt +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit.egg-info/entry_points.txt +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit.egg-info/requires.txt +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/src/claude_commit.egg-info/top_level.txt +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/tests/test_config.py +0 -0
- {claude_commit-0.7.0 → claude_commit-0.8.0}/tests/test_main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-commit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: AI-powered git commit message generator using Claude Agent SDK
|
|
5
5
|
Author-email: Johannlai <johannli666@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -35,10 +35,6 @@ Dynamic: license-file
|
|
|
35
35
|
|
|
36
36
|
`claude-commit` uses Claude AI to analyze your code changes and write meaningful commit messages. Claude reads your files, understands the context, and generates commit messages following best practices.
|
|
37
37
|
|
|
38
|
-
## Demo
|
|
39
|
-
|
|
40
|
-
[](https://asciinema.org/a/ZubvhPFyP7hPFLsqZiZUc930L?autoplay=1&speed=3)
|
|
41
|
-
|
|
42
38
|
## Installation
|
|
43
39
|
|
|
44
40
|
### Prerequisites
|
|
@@ -181,12 +177,12 @@ claude-commit alias unset quick
|
|
|
181
177
|
|
|
182
178
|
## How It Works
|
|
183
179
|
|
|
184
|
-
Claude autonomously analyzes your changes:
|
|
180
|
+
Claude autonomously analyzes your changes using [subagents](https://platform.claude.com/docs/agent-sdk/subagents) for parallel analysis:
|
|
185
181
|
|
|
186
|
-
1. **
|
|
187
|
-
2. **
|
|
188
|
-
3. **
|
|
189
|
-
4. **Generates** a clear commit message
|
|
182
|
+
1. **Detects style** — a lightweight subagent checks git history for commit conventions (conventional commits, gitmoji, language, etc.)
|
|
183
|
+
2. **Analyzes changes** — a dedicated subagent reads modified files, searches for context, and understands the intent
|
|
184
|
+
3. **Runs in parallel** — both subagents execute concurrently for faster results
|
|
185
|
+
4. **Generates** a clear commit message combining style and change analysis
|
|
190
186
|
|
|
191
187
|
**Example:**
|
|
192
188
|
```
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
`claude-commit` uses Claude AI to analyze your code changes and write meaningful commit messages. Claude reads your files, understands the context, and generates commit messages following best practices.
|
|
8
8
|
|
|
9
|
-
## Demo
|
|
10
|
-
|
|
11
|
-
[](https://asciinema.org/a/ZubvhPFyP7hPFLsqZiZUc930L?autoplay=1&speed=3)
|
|
12
|
-
|
|
13
9
|
## Installation
|
|
14
10
|
|
|
15
11
|
### Prerequisites
|
|
@@ -152,12 +148,12 @@ claude-commit alias unset quick
|
|
|
152
148
|
|
|
153
149
|
## How It Works
|
|
154
150
|
|
|
155
|
-
Claude autonomously analyzes your changes:
|
|
151
|
+
Claude autonomously analyzes your changes using [subagents](https://platform.claude.com/docs/agent-sdk/subagents) for parallel analysis:
|
|
156
152
|
|
|
157
|
-
1. **
|
|
158
|
-
2. **
|
|
159
|
-
3. **
|
|
160
|
-
4. **Generates** a clear commit message
|
|
153
|
+
1. **Detects style** — a lightweight subagent checks git history for commit conventions (conventional commits, gitmoji, language, etc.)
|
|
154
|
+
2. **Analyzes changes** — a dedicated subagent reads modified files, searches for context, and understands the intent
|
|
155
|
+
3. **Runs in parallel** — both subagents execute concurrently for faster results
|
|
156
|
+
4. **Generates** a clear commit message combining style and change analysis
|
|
161
157
|
|
|
162
158
|
**Example:**
|
|
163
159
|
```
|
|
@@ -15,6 +15,7 @@ from typing import Optional
|
|
|
15
15
|
|
|
16
16
|
import pyperclip
|
|
17
17
|
from claude_agent_sdk import (
|
|
18
|
+
AgentDefinition,
|
|
18
19
|
AssistantMessage,
|
|
19
20
|
ClaudeAgentOptions,
|
|
20
21
|
CLINotFoundError,
|
|
@@ -151,6 +152,20 @@ You have access to these tools for analyzing the codebase:
|
|
|
151
152
|
**Pro tip**: Grep is faster than reading entire files. Use it to quickly assess impact before deciding which files to read in detail.
|
|
152
153
|
</available_tools>
|
|
153
154
|
|
|
155
|
+
<subagents>
|
|
156
|
+
You have access to specialized subagents via the **Task** tool. Use them to parallelize your analysis for faster results.
|
|
157
|
+
|
|
158
|
+
Available subagents:
|
|
159
|
+
- **style-detector**: Detects commit message style/conventions from git history. Use this to check commit style while you analyze changes in parallel.
|
|
160
|
+
- **diff-analyzer**: Deep-dives into code changes, reads files, greps for context. Use this for understanding complex or large diffs.
|
|
161
|
+
|
|
162
|
+
**Parallelization strategy**: When analyzing a repository, launch subagents in parallel to speed things up. For example:
|
|
163
|
+
- Launch `style-detector` AND `diff-analyzer` simultaneously in a single response
|
|
164
|
+
- Combine their results to generate the final commit message
|
|
165
|
+
|
|
166
|
+
To invoke a subagent, use the Task tool with `subagent_type` set to the agent name.
|
|
167
|
+
</subagents>
|
|
168
|
+
|
|
154
169
|
<analysis_approach>
|
|
155
170
|
Follow this approach (you decide what's necessary based on the changes):
|
|
156
171
|
|
|
@@ -368,7 +383,43 @@ Begin your analysis now.
|
|
|
368
383
|
"Grep", # Search patterns in files (POWERFUL!)
|
|
369
384
|
"Glob", # Find files by pattern
|
|
370
385
|
"Edit", # Make precise edits to files (useful for analyzing multi-line changes)
|
|
386
|
+
"Task", # Invoke subagents for parallel analysis
|
|
371
387
|
],
|
|
388
|
+
agents={
|
|
389
|
+
"style-detector": AgentDefinition(
|
|
390
|
+
description="Detect commit message style and conventions from git history. Use this to determine the project's commit format (conventional commits, gitmoji, language, etc.) by examining recent commits.",
|
|
391
|
+
prompt="""You are a commit style detector. Your ONLY job is to analyze the git commit history and report the style conventions used.
|
|
392
|
+
|
|
393
|
+
Steps:
|
|
394
|
+
1. Run: git log -10 --oneline
|
|
395
|
+
2. Analyze the output for:
|
|
396
|
+
- Format: conventional commits (feat:, fix:), gitmoji, plain text, etc.
|
|
397
|
+
- Language: English, Chinese, or other
|
|
398
|
+
- Emoji usage: gitmoji style or none
|
|
399
|
+
- Any other patterns (scope, capitalization, etc.)
|
|
400
|
+
|
|
401
|
+
Output a concise summary of the detected style, for example:
|
|
402
|
+
"Conventional commits format, English, no emoji. Example: feat: add user auth"
|
|
403
|
+
""",
|
|
404
|
+
tools=["Bash"],
|
|
405
|
+
model="haiku",
|
|
406
|
+
),
|
|
407
|
+
"diff-analyzer": AgentDefinition(
|
|
408
|
+
description="Deep-dive into code changes to understand what changed and why. Use this for analyzing complex or large diffs, reading modified files, and understanding code relationships.",
|
|
409
|
+
prompt="""You are a code change analyzer. Your job is to deeply understand what changed in the repository and WHY.
|
|
410
|
+
|
|
411
|
+
Steps:
|
|
412
|
+
1. Run git status and git diff (or git diff --cached for staged changes) to see what changed
|
|
413
|
+
2. For significant changes, READ the modified files to understand context
|
|
414
|
+
3. Use GREP to understand code relationships (where functions are called, imports, etc.)
|
|
415
|
+
4. Summarize: what changed, why it changed, and the impact
|
|
416
|
+
|
|
417
|
+
Output a clear, structured summary of the changes suitable for writing a commit message.
|
|
418
|
+
""",
|
|
419
|
+
tools=["Bash", "Read", "Grep", "Glob"],
|
|
420
|
+
model="sonnet",
|
|
421
|
+
),
|
|
422
|
+
},
|
|
372
423
|
permission_mode="acceptEdits",
|
|
373
424
|
cwd=str(repo_path.absolute()),
|
|
374
425
|
max_turns=30,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-commit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: AI-powered git commit message generator using Claude Agent SDK
|
|
5
5
|
Author-email: Johannlai <johannli666@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -35,10 +35,6 @@ Dynamic: license-file
|
|
|
35
35
|
|
|
36
36
|
`claude-commit` uses Claude AI to analyze your code changes and write meaningful commit messages. Claude reads your files, understands the context, and generates commit messages following best practices.
|
|
37
37
|
|
|
38
|
-
## Demo
|
|
39
|
-
|
|
40
|
-
[](https://asciinema.org/a/ZubvhPFyP7hPFLsqZiZUc930L?autoplay=1&speed=3)
|
|
41
|
-
|
|
42
38
|
## Installation
|
|
43
39
|
|
|
44
40
|
### Prerequisites
|
|
@@ -181,12 +177,12 @@ claude-commit alias unset quick
|
|
|
181
177
|
|
|
182
178
|
## How It Works
|
|
183
179
|
|
|
184
|
-
Claude autonomously analyzes your changes:
|
|
180
|
+
Claude autonomously analyzes your changes using [subagents](https://platform.claude.com/docs/agent-sdk/subagents) for parallel analysis:
|
|
185
181
|
|
|
186
|
-
1. **
|
|
187
|
-
2. **
|
|
188
|
-
3. **
|
|
189
|
-
4. **Generates** a clear commit message
|
|
182
|
+
1. **Detects style** — a lightweight subagent checks git history for commit conventions (conventional commits, gitmoji, language, etc.)
|
|
183
|
+
2. **Analyzes changes** — a dedicated subagent reads modified files, searches for context, and understands the intent
|
|
184
|
+
3. **Runs in parallel** — both subagents execute concurrently for faster results
|
|
185
|
+
4. **Generates** a clear commit message combining style and change analysis
|
|
190
186
|
|
|
191
187
|
**Example:**
|
|
192
188
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|