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 commitsrun: | 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 |