AI-powered git commit message generator that works completely offline. Analyzes your staged changes and generates meaningful commit messages following the format: type(action): description.
- 🤖 Intelligent Analysis: Analyzes code changes, file types, and patterns
- 📚 Learning from History: Adapts to your existing commit style
- 🎯 Conventional Commits: Generates messages in
type(action): descriptionformat - 💬 Interactive Mode: Choose from multiple suggestions or write custom
- 🔒 Completely Offline: No API keys or external services required
- ⚡ Zero Configuration: Works out of the box
npm install -g @neabyte/git-smartOr use directly:
npx @neabyte/git-smartgit add .
npx @neabyte/git-smartExample output:
🔍 Analyzing changes...
💡 Suggested commit: "feat(auth): implement user authentication system"
Use this message? (Y/n): y
✅ Committed successfully!
npx @neabyte/git-smart --interactiveExample output:
🔍 Analyzing changes...
• Files: 2 added, 1 modified
• Types: JavaScript, TypeScript
• Functions: authenticateUser, validateToken
• Type: feat (85% confidence)
💡 Suggested commit messages:
1. feat(auth): implement user authentication system 🎯 (85%)
2. feat(auth): add user authentication system 👍 (75%)
3. feat(auth): create user authentication system 👍 (65%)
4. Edit custom message
Choose (1-4): 1
✅ Committed successfully!
npx @neabyte/git-smart [options]
Options:
-i, --interactive Interactive mode with multiple suggestions
-v, --verbose Show detailed analysis information
-d, --dry-run Show suggested message without committing
-h, --help Show help messageOr if installed globally:
git-smart [options]Git-Smart generates commits in the format: type(action): description
Core Types:
feat: New features and functionalityfix: Bug fixes and patchesrefactor: Code refactoring without changing functionalitydocs: Documentation changestest: Test additions/changesstyle: Code style changes (formatting, etc.)chore: Maintenance tasksperf: Performance improvements
Extended Types:
build: Build system changes (webpack, babel, etc.)ci: CI/CD pipeline changes (GitHub Actions, etc.)security: Security fixes and improvementsdeps: Dependency updatesrevert: Revert previous changeshotfix: Critical/urgent fixeswip: Work in progressmerge: Merge branches/pull requestsinit: Initial commit or project setuprelease: Version releases and publishing
Core Actions:
create: New files/componentsupdate: Modify existing coderemove: Delete files/codeimplement: Add new functionalitycore: Core functionality changes
Architecture:
api: API endpoints and routesservice: Service layer changescontroller: Controller logicmodel: Data models and entitiesdata: Data layer and repositoriesmiddleware: Middleware components
Frontend:
ui: User interface componentscomponent: React/Vue/Angular componentsview: Templates and viewslayout: Page layoutsstyle: CSS/SCSS styling
Backend:
database: Database operationsmigration: Database migrationsschema: Database schema changesquery: Database queries
User Management:
auth: Authentication systemsuser: User managementadmin: Admin functionalitysecurity: Security measurespermission: Permissions and roles
DevOps:
build: Build configurationci: Continuous integrationdeploy: Deployment scriptsconfig: Configuration filesdocker: Containerization
Business Features:
payment: Payment systemsorder: Order managementcart: Shopping cartproduct: Product catalognotification: Alerts and emails
Monitoring:
logging: Logging systemsmonitoring: System monitoringanalytics: Analytics trackingperformance: Performance optimization
Utilities:
utils: Utility functionstest: Testing frameworksdocs: Documentationi18n: Internationalization
feat(auth): implement JWT token validation
fix(api): resolve null pointer exception in user service
refactor(ui): restructure component hierarchy
docs(readme): update installation instructions
test(auth): add unit tests for login functionality
security(auth): patch authentication vulnerability
build(webpack): update build configuration
ci(github): add automated testing workflow
perf(database): optimize user query performance
deps(package): upgrade React to v18
hotfix(payment): fix critical billing calculation error
init(project): setup initial project structure
- Analyzes Staged Changes: Examines git diff, file types, and patterns
- Learns from History: Studies your existing commit messages for style preferences
- Generates Smart Messages: Creates contextually appropriate commit messages
- Provides Options: Offers multiple suggestions or custom message input
- Node.js 14.0.0 or higher
- Git repository with staged changes
- No external dependencies or API keys needed
$ git add src/auth.js src/login.js
$ npx @neabyte/git-smart
🔍 Analyzing changes...
💡 Suggested commit: "feat(auth): implement user authentication system"$ git add src/api/users.js
$ npx @neabyte/git-smart
🔍 Analyzing changes...
💡 Suggested commit: "fix(api): resolve null response handling"$ git add README.md docs/
$ npx @neabyte/git-smart
🔍 Analyzing changes...
💡 Suggested commit: "docs(readme): update API documentation"$ git add tests/auth.test.js
$ npx @neabyte/git-smart
🔍 Analyzing changes...
💡 Suggested commit: "test(auth): add authentication test coverage"- Fork the repository at https://github.com/NeaDigitra/Git-Smart
- Create your feature branch:
git checkout -b feat/new-feature - Commit your changes:
npx @neabyte/git-smart - Push to the branch:
git push origin feat/new-feature - Submit a pull request
Git-Smart intelligently detects the most appropriate commit type based on:
- File paths: Recognizes patterns like
auth/,test/,.github/workflows/ - File extensions: Understands
.css,.sql,.yml,.md, etc. - Code changes: Analyzes new functions, classes, imports, and patterns
- Keywords: Detects security, performance, build-related terms
Over 70+ actions/scopes are automatically detected:
- Security:
auth,security,permission,oauth,jwt - DevOps:
build,ci,deploy,docker,k8s - Business:
payment,order,cart,product,notification - Architecture:
api,service,controller,model,middleware - And many more...
- 📦 18 commit types (8 core + 10 extended)
- 🎯 70+ actions/scopes for precise categorization
- 🚀 15.9 kB compressed package size
- 🔒 Zero dependencies - completely self-contained
- ⚡ Offline operation - no internet required
- Saves Time: No more thinking about commit message format
- Consistent Style: Maintains uniform commit history
- Better Documentation: Clear, descriptive commit messages
- Team Friendly: Easy for teams to adopt consistent practices
- Zero Overhead: No setup, configuration, or API costs
- Industry Standard: Follows conventional commits specification
- Intelligent: Learns from your project's commit history
Start using Git-Smart today and never write another boring commit message!
MIT License - see LICENSE file for details.