pi-smart-commit
v1.0.0
Published
Auto-generate conventional commit messages from Pi session diffs — feat, fix, refactor, chore with confirmation
Downloads
156
Maintainers
Readme
pi-smart-commit
Auto-generate conventional commit messages from your Pi session diffs — with confirmation.
How it works
- Reads your
git diff - Classifies the change:
feat,fix,refactor,chore,docs,test, orstyle - Extracts context from your recent conversation
- Generates a proper conventional commit message
- Shows it to you for confirmation before committing
Example
git diff → +45 -12 across 3 files
fix(auth): refactor JWT middleware to use async verification
Changed: auth.ts, middlewares/, types.ts
Context: Refactor the auth middleware to use JWT instead of sessions
Changes: +45 -12Classification logic
| Type | Triggered by |
|------|-------------|
| feat | New files created |
| fix | ≤2 files changed or small diffs |
| refactor | Mostly deletions |
| docs | .md, docs/, README, CHANGELOG |
| test | .test., .spec., tests/, __tests__/ |
| chore | package.json, config files, CI |
| style | CSS, SCSS, theme files |
Install
# npm
pi install npm:pi-smart-commit
# GitHub
pi install git:github.com/Jaraxxxx/pi-smart-commitUsage
| Method | Action |
|--------|--------|
| /commit | Generate commit message, confirm, commit |
| Ctrl+K | Same as /commit (keyboard shortcut) |
The LLM can also call the smart_commit tool directly.
Workflow
User: "Let's refactor the auth middleware"
Agent: [reads files, makes changes]
Agent: [calls smart_commit]
→ fix(auth): refactor JWT to use async verify
→ "Changed: auth.ts, middleware/, types.ts"
User confirms → committed ✅Requirements
- Pi coding agent
- Git repository
