pi-commit-message

Pi extension that generates Conventional Commit messages from staged diff and commits via /commit

Package details

extension

Install pi-commit-message from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-commit-message
Package
pi-commit-message
Version
0.5.0
Published
Apr 27, 2026
Downloads
140/mo · 140/wk
Author
s1lver091
License
MIT
Types
extension
Size
19.4 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/commit-message.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-commit-message

pi extension that adds the /commit command to generate Conventional Commits messages from staged diffs and commit directly.

Features

  • 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

Installation

From npm

pi install npm:pi-commit-message

From GitHub

pi install git:github.com/s1lver091/pi-commit-message

Local development

pi install /path/to/pi-commit-message

Usage

/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

Extra context

You can pass custom instructions to influence the message generation:

/commit write in Italian
/commit focus on the API changes

Configuration

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

Local verification

npm run check

Project structure

├── extensions/
│   └── commit-message.ts    — main extension implementation
├── tests/
│   ├── commit-message.test.ts  — automated tests
│   ├── functions.test.ts      — pure function tests
├── package.json
└── README.md

License

MIT