A standardized commit convention and release management tool for your repository using standard-version.
- β Enforced Commit Conventions - Uses Conventional Commits format
- π― Automated Versioning - Semantic versioning (major, minor, patch)
- π Changelog Generation - Automatic CHANGELOG.md with icons
- π Git Hooks - Pre-commit and commit-msg validation via Husky
- π¨ Icon Support - Each commit type has a dedicated icon in releases
Install the package globally or as a dev dependency in your project:
# Install globally
npm install -g @programinglive/commiter
# Or install as dev dependency
npm install --save-dev @programinglive/commiter
# Or use npx (no installation required)
npx @programinglive/commiterAfter installation in your project, the Husky hooks will be automatically set up for commit message validation.
All commits must follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
| Type | Icon | Description | Changelog Section |
|---|---|---|---|
feat |
β¨ | New feature | β¨ Features |
fix |
π | Bug fix | π Bug Fixes |
perf |
β‘ | Performance improvement | β‘ Performance |
refactor |
β»οΈ | Code refactoring | β»οΈ Refactors |
docs |
π | Documentation changes | π Documentation |
style |
π | Code style changes | π Styles |
test |
β | Test additions/changes | β Tests |
build |
ποΈ | Build system changes | ποΈ Build System |
ci |
π· | CI/CD changes | π· Continuous Integration |
chore |
π§Ή | Maintenance tasks | π§Ή Chores |
revert |
βͺ | Revert previous commit | βͺ Reverts |
# Feature
git commit -m "feat(auth): add JWT authentication"
# Bug fix
git commit -m "fix(api): resolve null pointer exception"
# Breaking change
git commit -m "feat(api)!: redesign user endpoint
BREAKING CHANGE: The user endpoint now returns different data structure"
# With scope and body
git commit -m "perf(database): optimize query performance
Reduced query time by 50% using indexed columns"For bug fixes and minor changes:
npm run release:patchFor new features (backwards compatible):
npm run release:minorFor breaking changes:
npm run release:majorLet standard-version determine the version bump based on commits:
npm run release- π§ͺ Detects your package manager and runs the
testscript automatically - π Analyzes commits since last release
- π’ Bumps version in
package.json - π Updates
CHANGELOG.mdwith icons - π·οΈ Creates a git tag
- πΎ Commits changes with format:
chore(release): v1.2.3 π
After running a release command, push to remote:
git push --follow-tags origin mainThe following hooks are automatically enforced:
- commit-msg: Validates commit message format using commitlint
- pre-commit: Runs tests before allowing commits
package.json- Containsstandard-versionconfigurationcommitlint.config.js- Commitlint rules.husky/commit-msg- Commit message validation hook.husky/pre-commit- Pre-commit test hook
Ensure your commit message follows the format:
type(scope): subject
Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Release commits generated by standard-version such as chore(release): 1.0.0 π are automatically ignored by commitlint.
If this is your first release and you don't have a version tag yet:
npm run release -- --first-releaseRunning the setup command ensures the default npm test script is echo "No tests specified", preventing the Husky pre-commit hook from failing during this initial release. Replace it with your real test command once available.
To see what would happen without making changes:
npm run release -- --dry-runContributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
MIT License - see the LICENSE file for details.
This project is open source and free to use, modify, and distribute at your own risk.