Skip to content

Commit 92dfcdf

Browse files
fix: add --prompt flag for custom LLM behavior guidance
1 parent 901a8fb commit 92dfcdf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ aicommits --all # or -a
100100
- `--generate` or `-g`: Number of messages to generate (default: **1**)
101101
- `--exclude` or `-x`: Files to exclude from AI analysis
102102
- `--type` or `-t`: Git commit message format (default: **plain**). Supports `plain`, `conventional`, and `gitmoji`
103+
- `--prompt` or `-p`: Custom prompt to guide the LLM behavior (e.g., specific language, style instructions)
103104
- `--yes` or `-y`: Skip confirmation when committing after message generation (default: **false**)
104105

105106
#### Generate multiple recommendations
@@ -130,6 +131,24 @@ aicommits --type plain # or -t plain (default)
130131

131132
This feature is useful if your project follows a specific commit message standard or if you're using tools that rely on these commit formats.
132133

134+
#### Custom Prompts
135+
136+
You can customize the LLM's behavior with the `--prompt` flag to guide commit message generation:
137+
138+
```sh
139+
# Write commit messages in a specific language
140+
aicommits -p "Write commit messages in Italian"
141+
142+
# Focus on specific aspects of the changes
143+
aicommits -p "Focus on performance implications of changes"
144+
145+
# Use a specific style or tone
146+
aicommits -p "Use technical jargon suitable for senior developers"
147+
148+
# Include specific details in the message
149+
aicommits -p "Always mention the specific function names and file paths changed"
150+
```
151+
133152
### Git hook
134153

135154
You can also integrate _aicommits_ with Git via the [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. This lets you use Git like you normally would, and edit the commit message before committing.

0 commit comments

Comments
 (0)