Use Azure/OpenAI/Gemini API to review Git changes, generate conventional commit messages that meet the conventions, simplify the commit process, and keep the commit conventions consistent.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Use OpenAI / Azure OpenAI / DeepSeek / Gemini API to review Git changes, generate conventional commit messages that meet the conventions, simplify the commit process, and keep the commit conventions consistent.
Ensure that you have installed and enabled the "Nota AI Commit" extension.
In VSCode settings, locate the "ai-commit" configuration options and configure them as needed (grouped as: General / OpenAI / Gemini).
Make changes in your project (staged or unstaged).
(Optional) If you want to provide additional context for the commit message, type it in the Source Control panel's message input box before clicking the Nota AI Commit button.
Next to the commit message input box in the "Source Control" panel, click the "Nota AI Commit" icon button. After clicking, the extension will generate a commit message (considering any additional context if provided) and populate it in the input box.
Review the generated commit message, and if you are satisfied, proceed to commit your changes.
Note
If the code exceeds the maximum token length, consider adding it to the staging area in batches.
⚙️ Configuration
Note Version >= 0.0.5 Don't need to configure EMOJI_ENABLED and FULL_GITMOJI_SPEC, Default Prompt is prompt/with_gitmoji.md, If don't need to use Gitmoji. Please set SYSTEM_PROMPT to your custom prompt, please refer to prompt/without_gitmoji.md.
In the VSCode settings, locate the "ai-commit" configuration options and configure them as needed:
Configuration
Type
Default
Required
Notes
DIFF_SOURCE
string
auto
No
Which changes to use: auto (prefer staged), staged, unstaged, staged+unstaged (adds separators).
AI_PROVIDER
string
openai
Yes
Select AI Provider: openai or gemini.
OPENAI_API_KEY
string
None
Yes
Required when AI Provider is set to OpenAI. OpenAI token
OPENAI_BASE_URL
string
None
No
If using Azure, use: https://{resource}.openai.azure.com/openai/deployments/{model}
OPENAI_MODEL
string
gpt-4o
Yes
OpenAI MODEL, you can select a model from the list by running the Show Available OpenAI Models command
AZURE_API_VERSION
string
None
No
AZURE_API_VERSION
OPENAI_TEMPERATURE
number
0.7
No
Controls randomness in the output. Range: 0-2. Lower values: more focused, Higher values: more creative
GEMINI_API_KEY
string
None
Yes
Required when AI Provider is set to Gemini. Gemini API key
GEMINI_BASE_URL
string
None
No
Gemini Base URL (optional). Use a third-party provider endpoint if needed; otherwise leave empty.
GEMINI_MODEL
string
gemini-2.0-flash-001
Yes
Gemini MODEL. Currently, model selection is limited to configuration.
GEMINI_TEMPERATURE
number
0.7
No
Controls randomness in the output. Range: 0-2 for Gemini. Lower values: more focused, Higher values: more creative