pi extension that adds the /commit command to generate Conventional Commits messages from staged diffs and commit directly.
- Generates Conventional Commits messages using the active LLM
- Interactive confirmation loop: commit, edit, regenerate, or cancel
- Animated loader during message generation
- Smart scope detection from changed files
- Handles edge cases: initial commits, merge resolutions, large diffs, binary files
- Safe git operations using array-form arguments
pi install npm:pi-commit-messagepi install git:github.com/s1lver091/pi-commit-messagepi install /path/to/pi-commit-message/commit # generates message from diff
/commit closes #42 # adds extra context to the LLM
/commit feat(auth): add login # bypasses generation with explicit message
/commit:config # open settings
You can pass custom instructions to influence the message generation:
/commit write in Italian
/commit focus on the API changes
Run /commit:config to customize:
- Max diff length: Controls when to prompt for truncation (1000–50000 chars)
- Verbosity: Controls message length and detail level
- Short — single subject line, max 50 chars
- Simple — subject line, max 72 chars
- Normal — subject + standard Conventional Commits rules (default)
- Verbose — subject + explanatory body
Settings are stored in:
~/.pi/agent/data/commit-message/commit-message-settings.json
npm run check├── extensions/
│ └── commit-message.ts — main extension implementation
├── tests/
│ ├── commit-message.test.ts — automated tests
│ ├── functions.test.ts — pure function tests
├── package.json
└── README.md
MIT