-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(README): add new features and update installation
- Add support for multiple commit formats (Conventional, Angular, Semantic, Linux Kernel) - Introduce repository and author-specific commit styles - Add instructions for updating the tool - Expand usage examples for different commit formats BREAKING CHANGE: Remove basic auth support in favor of OAuth2
- Loading branch information
1 parent
c472f72
commit 54e1a22
Showing
1 changed file
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# auto-commit | ||
|
||
Automatically generate git commit messages using AI. Analyzes your staged changes and creates clear, conventional commit messages. | ||
Automatically generate git commit messages using Claude 3 Haiku. Analyzes your staged changes and creates clear commit messages. Uses the conventional commit format by default, but you can also train it to use a repo or author-specific style. | ||
|
||
## Features | ||
|
||
- Generates clear, concise commit messages from staged changes | ||
- Interactive editing with vim | ||
- Secure API key storage | ||
- Supports multiple commit formats: | ||
- Conventional Commits (default) | ||
- Angular | ||
- Semantic Git Commits (with emojis) | ||
- Linux Kernel style | ||
- Repository or author-specific commit styles | ||
- Simple CLI interface | ||
|
||
## Installation | ||
|
@@ -45,15 +49,41 @@ cd auto-commit | |
deno task install | ||
```` | ||
|
||
### Updating | ||
|
||
```bash | ||
# If installed from source | ||
cd auto-commit | ||
deno task update | ||
|
||
# If using pre-built binary | ||
# Download the latest release and follow installation steps above | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
# Optional: Set up git alias | ||
git config --global alias.ac '!auto-commit' | ||
|
||
# Use the tool | ||
# Use the tool with default commit style (conventional) | ||
git add <files> | ||
auto-commit # or 'git ac' if alias configured | ||
|
||
# Use a specific commit format | ||
auto-commit --format=conventional # default | ||
auto-commit --format=angular # Angular style | ||
auto-commit --format=semantic # with emojis | ||
auto-commit --format=kernel # Linux kernel style | ||
|
||
# View repository authors | ||
auto-commit --list-authors | ||
|
||
# Learn commit style from repository history | ||
auto-commit --learn | ||
|
||
# Learn commit style from specific author | ||
auto-commit --learn --author="[email protected]" | ||
``` | ||
|
||
Example output: | ||
|
@@ -78,10 +108,59 @@ Proposed commit: | |
|
||
On first run, you'll be prompted to enter your [Anthropic API key](https://console.anthropic.com/account/keys). | ||
|
||
### Commit Formats | ||
|
||
The tool supports several commit message formats: | ||
|
||
1. **Conventional** (default): `type(scope): description` | ||
``` | ||
feat(auth): add OAuth2 authentication | ||
``` | ||
|
||
2. **Angular**: Similar to conventional but with stricter rules | ||
``` | ||
feat(auth): implement OAuth2 authentication | ||
* Add login endpoints | ||
* Set up token management | ||
BREAKING CHANGE: Remove basic auth support | ||
``` | ||
|
||
3. **Semantic** (with emojis): `emoji description` | ||
``` | ||
✨ Add new user authentication system | ||
- Implement OAuth2 flow | ||
- Add session management | ||
Closes #123 | ||
``` | ||
|
||
4. **Linux Kernel**: `subsystem: change summary` | ||
``` | ||
auth: implement secure token rotation | ||
Previous implementation had security flaws. | ||
This patch adds automatic rotation with | ||
proper invalidation of old tokens. | ||
Signed-off-by: John Doe <[email protected]> | ||
``` | ||
|
||
5. **Repository or Author-Specific**: Learn from repository history or specific author's style | ||
``` | ||
# Learn commit style from repository history | ||
auto-commit --learn | ||
# Learn commit style from specific author | ||
auto-commit --learn --author="[email protected]" | ||
``` | ||
|
||
## Requirements | ||
|
||
- Git | ||
- Vim | ||
- Vim (for editing commit messages) | ||
- Anthropic API key | ||
|
||
## License | ||
|