@agent-smith/feat-git
v0.0.31
Published
Git features for Agent Smith cli
Downloads
299
Readme
@agent-smith/feat-git — AI-Powered Git Commit Management
Smart git commit message generation powered by language models. Part of the Agent Smith toolkit.
Features
- 🤖 AI-Generated Commit Messages — Automatically generates meaningful commit messages from your changes
- 🎯 Smart Context Awareness — Analyzes staged/unstaged modifications to understand what you're committing
- ✏️ Custom First Line — Provide a custom first line while letting AI generate the body
- 💬 Additional Instructions — Give the model extra context or constraints for message generation
- 📦 Package-Aware — Include package names in generated commit messages
- 🔄 Interactive Confirmation — Review and confirm generated messages before committing
- ⚙️ Model Flexibility — Use any supported language model with customizable templates
- 🔧 File-Specific Commits — Target specific files or directories for focused commits
Documentation
For AI Agents
- Codebase Summary — Architecture, key files, and patterns for the feat-git plugin
- Git Plugin — Complete plugin documentation and usage guide
For Humans
- Git Plugin — Usage guide and configuration
Installation
npm i -g @agent-smith/feat-gitConfiguration
Add the plugin to your config.yml file:
plugins:
- "@agent-smith/feat-git"Then run the configuration command to update the CLI:
lm confQuick Start
Generate a commit message for all staged changes:
lm commitThe model will analyze your changes and generate a commit message, then prompt you to confirm.
Usage
Basic Commit
In a git repository with uncommitted or staged modifications:
lm commitFile-Specific Commit
Target specific files or directories:
lm commit srcCustom First Line
Provide your own first line while AI generates the body:
lm commit --msg "Custom first line"Additional Instructions
Give the model extra context or constraints:
lm commit --instructions "Omit the version number change"Package-Aware Messages
Include a package name in the generated first line:
lm commit --pkg "git plugin"Model Configuration
Using a Specific Model
The default model is qwencoder 30b a3b. To use another model:
lm commit -m mymodelModel with Template
Specify both model and template:
lm commit -m "gemma3:4b-it-q8_0" -t "gemma"Automatic Template Detection
Omit the template name and it will be guessed based on the model:
lm commit -m "deepseek-coder-v2:16b-lite-instruct-q8_0"In this example, the Deepseek v2 template will be automatically detected.
Format: -m modelname -t templatename
Command Reference
| Command | Description |
|---------|-------------|
| lm commit | Generate and confirm a commit message for all staged changes |
| lm commit <path> | Generate commit message for specific files/directories |
| lm commit --msg "<line>" | Use custom first line for the commit message |
| lm commit --instructions "<text>" | Provide additional instructions to the model |
| lm commit --pkg "<name>" | Include package name in generated first line |
| lm commit -m <model> | Use a specific language model |
| lm commit -m <model> -t <template> | Use model with specific template |
Important Notes
- 📌 Requires an active git repository with modifications
- 🔒 The command prompts for confirmation before executing the commit
- 🤖 A language model must be available and configured in Agent Smith
- ⚠️ Unstaged changes must be staged first or passed as arguments
- 🔧 Ensure the plugin is properly configured via
lm confbefore use
License
MIT
