1
1
*codecompanion-gitcommit.txt* For Neovim >= 0.8.0 Last change: 2025 Jan 02
2
2
3
- CODECOMPANION GIT COMMIT EXTENSION *codecompanion-gitcommit*
3
+ CODECOMPANION GITCOMMIT EXTENSION *codecompanion-gitcommit*
4
4
5
- A CodeCompanion extension that generates AI-powered git commit messages
6
- following the Conventional Commits specification, with powerful Git tool
7
- integration.
5
+ A Neovim plugin extension for CodeCompanion that generates AI-powered Git
6
+ commit messages following the Conventional Commits specification, with
7
+ comprehensive Git workflow integration.
8
8
9
9
==============================================================================
10
10
CONTENTS *codecompanion-gitcommit-contents*
@@ -21,14 +21,16 @@ CONTENTS *codecompanion-gitcommit-contents*
21
21
==============================================================================
22
22
1. INTRODUCTION *codecompanion-gitcommit-intro*
23
23
24
- The CodeCompanion Git Commit Extension is a powerful tool that leverages AI
25
- to generate meaningful git commit messages following the Conventional Commits
26
- specification. It integrates seamlessly with CodeCompanion's LLM adapters to
27
- analyze your staged changes and create appropriate commit messages.
24
+ The CodeCompanion GitCommit Extension is a powerful Neovim plugin that
25
+ leverages AI to generate meaningful Git commit messages following the
26
+ Conventional Commits specification. It integrates seamlessly with
27
+ CodeCompanion's LLM adapters to analyze your staged changes and create
28
+ appropriate commit messages.
28
29
29
- The extension provides comprehensive Git operations through @git_read,
30
- @git_edit, and @git_bot tools, offering a natural language interface for
31
- Git workflow management within CodeCompanion chat buffers.
30
+ The extension provides comprehensive Git operations through @git_read (15
31
+ operations), @git_edit (16 operations), and @git_bot tools, offering a
32
+ natural language interface for Git workflow management within CodeCompanion
33
+ chat buffers.
32
34
33
35
==============================================================================
34
36
2. FEATURES *codecompanion-gitcommit-features*
@@ -38,19 +40,22 @@ Git workflow management within CodeCompanion chat buffers.
38
40
• Conventional Commits specification compliance
39
41
• Multi-language support for commit messages
40
42
• Support for regular commits and amend commits
43
+ • Smart diff analysis with file filtering capabilities
41
44
42
45
🛠️ Git Tool Integration
43
- • @git_read tool - Execute read-only Git operations through chat
44
- • @git_edit tool - Execute write-access Git operations through chat
45
- • @git_bot tool group - Comprehensive Git assistant combining read/write ops
46
+ • @git_read tool - 15 read-only Git operations (status, log, diff, etc.)
47
+ • @git_edit tool - 16 write-access Git operations (stage, commit, push, etc.)
48
+ • @git_bot tool - Comprehensive Git assistant combining all operations
46
49
• Natural language interface for Git workflow control
47
- • Automatic approval requirements for destructive operations
50
+ • Async operations with proper error handling
51
+ • Safety confirmations for destructive operations
48
52
49
53
📝 Smart Integration
50
- • Smart keymap integration for gitcommit buffers
51
- • Automatic git repository detection
52
- • Support for user commands and slash commands
53
- • File filtering support using glob patterns
54
+ • GitCommit buffer keymap integration with auto-generation
55
+ • Automatic Git repository detection
56
+ • Slash commands (/gitcommit) for chat integration
57
+ • Configurable file filtering using glob patterns
58
+ • Programmable API for external integrations
54
59
55
60
==============================================================================
56
61
3. INSTALLATION *codecompanion-gitcommit-install*
@@ -98,29 +103,34 @@ Add this extension to your CodeCompanion configuration:
98
103
==============================================================================
99
104
4. USAGE *codecompanion-gitcommit-usage*
100
105
101
- Basic workflow :
106
+ Basic Usage :
102
107
103
- 1. Stage your changes: >
104
- git add .
105
- <
106
- 2. Generate commit message: >
108
+ 1. Generate commit message: >
107
109
:CodeCompanionGitCommit
108
110
<
109
- 3. Review the generated commit message in the floating window
110
-
111
- 4. Choose an action:
111
+ 2. Review the generated commit message in the floating window
112
+ 3. Choose an action:
112
113
• c - Copy to clipboard
113
114
• y - Copy to yank register
114
115
• s - Submit changes
115
116
• Enter - Copy and close
116
117
• q/Esc - Close
117
118
118
- GitCommit buffer integration :
119
+ GitCommit Buffer Integration :
119
120
120
121
1. Run `git commit` to open commit buffer
121
- 2. If `auto_generate` is enabled, message appears automatically
122
- 3. Otherwise, press `<leader> gc` in normal mode to generate
123
- 4. Edit as needed and save to complete the commit
122
+ 2. Press `<leader> gc` to generate message (or auto-generates if enabled)
123
+ 3. Edit as needed and save to complete the commit
124
+
125
+ Chat-based Git Workflow:
126
+
127
+ Use Git tools in CodeCompanion chat: >
128
+ @git_read status # Check repository status
129
+ @git_edit stage --files ["file.txt"] # Stage files
130
+ /gitcommit # Generate commit message
131
+ @git_edit commit --commit_message "feat: add feature" # Commit
132
+ @git_edit push --remote "origin" --branch "main" # Push
133
+ <
124
134
125
135
==============================================================================
126
136
5. COMMANDS *codecompanion-gitcommit-commands*
0 commit comments