@alecsibilia/commit
v1.0.9
Published
Interactive CLI tool for creating standardized commit messages with customizable types and scopes
Downloads
647
Maintainers
Readme
commit
Interactive CLI tool for creating standardized commit messages with customizable types and scopes.
Installation & Usage
Option 1: One-time use with npx or bunx (Recommended)
bunx --bun @alecsibilia/commitOr via a package.json script:
{
"scripts": {
"commit": "bunx --bun @alecsibilia/commit"
}
}Option 2: Global installation
npm install -g @alecsibilia/commit
# or
bun add -g @alecsibilia/commit
# Then run:
commitOption 3: Local installation as dev dependency
npm install -D @alecsibilia/commit
# or
bun add -d @alecsibilia/commit
# Then run:
bun run commitOr add to your package.json scripts:
{
"scripts": {
"new:commit": "bun run --bun commit"
}
}Note you must name your script something other than
commitwhen running locally.
And run:
npm run new:commit
# or
bun run new:commitCommand Line Options
--help,-h- Show help information--version,-V- Display version number--config,-c <path>- Specify custom config file--dry-run- Preview commit message without executing
Configuration
TypeScript Configuration (Recommended)
Create a commit.config.ts file in your project root. TypeScript config files are supported when using bun run --bun commit:
import { type CommitConfig } from '@alecsibilia/commit'
export default {
types: [
{ value: 'feat', name: '✨ feat: A new feature' },
{ value: 'fix', name: '🐛 fix: A bug fix' },
{ value: 'chore', name: '🧹 chore: Maintenance tasks' }
],
scopes: ['repo', 'cli', 'config']
} satisfies CommitConfigJavaScript Configuration
Alternatively, create a commit.config.js file for broader compatibility:
export const commitConfig = {
types: [
{ value: 'feat', name: '✨ feat: A new feature' },
{ value: 'fix', name: '🐛 fix: A bug fix' },
{ value: 'chore', name: '🧹 chore: Maintenance tasks' }
],
scopes: ['repo', 'cli', 'config']
}Note: TypeScript configuration files (
.ts) require usingbun run --bun committo leverage Bun's native TypeScript support. For Node.js environments, use JavaScript configuration files (.js) instead.
Development
# Install dependencies
bun install
# Run locally
bun run dev
# Build
bun run build
# Test
bun testRelease Process
This project uses automated semantic releases. See RELEASE.md for details on versioning and deployment.
License
Apache-2.0
