This VS Code extension adds Codex: Generate Commit Message to the Git Source Control title bar.
It reads the selected repository's staged changes through VS Code's built-in Git API, runs the Codex CLI in read-only mode, and puts the generated subject into Git's commit input box. It never commits automatically.
Install locally
From this folder:
vsce package
code --install-extension ./commit-tools-0.1.1.vsix --force
Reload VS Code, open a Git repository, stage changes, and click the sparkle button in Source Control.
The Marketplace-compatible build places the sparkle action in the Source Control title bar. VS Code's scm/inputBox menu, which would place the action directly inside the commit input, is a Proposed API and cannot be used by published Marketplace extensions.
For local development with VS Code Insiders, you can enable that menu by adding enabledApiProposals and the scm/inputBox contribution from the development branch, then launch:
code-insiders --enable-proposed-api hamedyosefian.commit-tools .
The stable Marketplace build keeps the title-bar fallback and the Command Palette command.
The default command is the Codex bundled inside /Applications/ChatGPT.app or ~/Applications/ChatGPT.app, so the extension can use the same signed-in Codex installation as the ChatGPT macOS app. It checks the current Contents/Resources/codex-cli/bin/codex layout and the older Contents/Resources/codex layout before falling back to codex on PATH. You can override it with codexCommit.commandPath.
Settings include codexCommit.model, codexCommit.reasoningEffort, and codexCommit.prompt. Defaults are gpt-6-astra, low, and a short reviewer-focused instruction. The staged-only and one-line output rules remain enforced by the extension.
Troubleshooting
If generation fails, select Show Log in the error notification or open View → Output → Codex Commit. The log includes the executable path, full CLI diagnostics, and exit status.
A failed to load models cache: missing field base_instructions error can indicate that an older CLI is reading a cache produced by a newer app. Check the executable path in the log. Leave codexCommit.commandPath empty to use the bundled app CLI, or set it to a compatible CLI executable.
Publish to the Visual Studio Marketplace
Publishing requires a Visual Studio Marketplace publisher account. Create a publisher whose identifier matches the publisher field (hamedyosefian), then create an Azure DevOps Personal Access Token with Marketplace management scope.
Install the packaging tool and package the extension:
npm install --global @vscode/vsce
vsce package
Log in once and publish:
vsce login hamedyosefian
vsce publish
The commands run from this extension directory. You can also upload the generated .vsix manually from the Marketplace publisher management page. Do not publish a build that contains enabledApiProposals or the scm/inputBox contribution; VS Code documents Proposed APIs as local or Insiders-only.
License
MIT