English | ไธญๆ | ๆฅๆฌ่ช | Franรงais | Espaรฑol | ุงูุนุฑุจูุฉ | ํ๊ตญ์ด | Portuguรชs | ะ ัััะบะธะน | Deutsch
Format git commit messages according to conventional commits. No API key needed.
- ๐ Quick Start
- ๐ What It Does
- ๐ก Examples
- โ๏ธ Options
- ๐ Type Detection
- ๐ง CI Integration
- ๐ See Also
- ๐ License
# Stage your changes
git add .
# Auto-format and commit
npx @liangzhengtao/git-format
# Or just preview (dry run)
npx @liangzhengtao/git-format --dry-run- Reads your staged files
- Detects the commit type (feat/fix/docs/test/etc.)
- Detects the scope from file paths
- Generates a conventional commit message
- Commits with the formatted message
# Stage a new feature
git add src/auth/login.ts
npx @liangzhengtao/git-format
# โ feat(auth): add new feature in src/auth/login.ts
# Stage a bug fix
git add src/api/users.ts
git commit -m "fix bug"
npx @liangzhengtao/git-format
# โ fix(api): fix issue in src/api/users.ts
# Stage documentation
git add README.md
npx @liangzhengtao/git-format
# โ docs: update documentationnpx @liangzhengtao/git-format [options]
Options:
-d, --dry-run Show message without committing
-j, --json Output as JSON
-q, --quiet Suppress output
-h, --help Display help
-V, --version Display version
| Pattern | Type |
|---|---|
*.test.ts, *.spec.ts |
test |
*.md, *.txt |
docs |
*.css, *.scss |
style |
package.json |
chore |
.github/* |
ci |
Dockerfile |
build |
| Diff contains "fix", "bug" | fix |
| Diff contains "add", "new" | feat |
| Default | refactor |
# GitHub Actions
- name: Auto-format commits
run: |
git add .
npx @liangzhengtao/git-format
git push| Project | Description |
|---|---|
| agent-trace | Visualize and debug AI agent execution traces |
| ai-commit | npx @liangzhengtao/commit-ai โ AI writes your commit messages |
| vibe-check | npx @liangzhengtao/vibe-check โ Is your project AI-ready? |
| awesome-ai-rules | 20 production AI coding rules |