Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 84 additions & 5 deletions README.md
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
Expand Down Expand Up @@ -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="user@example.com"
```

Example output:
Expand All @@ -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 <john@example.com>
```

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="user@example.com"
```

## Requirements

- Git
- Vim
- Vim (for editing commit messages)
- Anthropic API key

## License
Expand Down
Empty file removed build.ts
Empty file.
7 changes: 4 additions & 3 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"tasks": {
"start": "deno run --allow-net --allow-read --allow-write --allow-env --allow-run=\"git,vim\" main.ts",
"install": "deno run --allow-read --allow-write --allow-run install.ts",
"build": "deno run --allow-read --allow-write --allow-run scripts/build.ts"
"install": "deno run --allow-read --allow-write --allow-run scripts/install.ts",
"build": "deno run --allow-read --allow-write --allow-run scripts/build.ts",
"update": "git pull && deno task install"
},
"name": "auto-commit",
"version": "1.0.0",
"exports": "./main.ts",
"description": "AI-powered git commit message generator using Claude 3",
"description": "Automatically generate git commit messages.",
"author": "Sid Edwards",
"license": "MIT"
}
40 changes: 38 additions & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading