pi-smart-commit
Auto-generate conventional commit messages from Pi session diffs — feat, fix, refactor, chore with confirmation
Package details
Install pi-smart-commit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-smart-commit- Package
pi-smart-commit- Version
1.0.0- Published
- May 22, 2026
- Downloads
- not available
- Author
- jaraxxxx
- License
- MIT
- Types
- extension
- Size
- 10.9 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
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 -12
Classification 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-commit
Usage
| 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