Installation

**Referenced Files in This Document ** - [package.json](file://vscode-extension/package.json) - [build.sh](file://vscode-extension/build.sh) - [README.md](file://vscode-extension/README.md) - [extension.js](file://vscode-extension/extension.js) - [index.js](file://index.js)

Table of Contents

  1. Prerequisites
  2. Installation from Visual Studio Code Marketplace
  3. Manual Build and Installation from Source
  4. Extension Configuration and Settings
  5. Verification of Installation
  6. Platform-Specific Considerations
  7. Integration with aicommit CLI Tool
  8. Troubleshooting Common Issues

Prerequisites

Before installing the AICommit VS Code extension, ensure that the following prerequisites are met:

The extension leverages the aicommit CLI through Node.js child process execution, requiring the binary to be correctly installed and configured.

Section sources

Installation from Visual Studio Code Marketplace

The recommended method for installing the AICommit extension is via the Visual Studio Code Marketplace:

  1. Open Visual Studio Code.
  2. Navigate to the Extensions view by clicking on the Extensions icon in the Activity Bar or pressing Ctrl+Shift+X.
  3. Search for “AICommit for VS Code” or use the publisher name “suenot”.
  4. Click the Install button next to the “AICommit for VS Code” extension.
  5. Once installed, reload VS Code if prompted.

This method automatically handles all dependencies and ensures you receive updates when new versions are published.

Section sources

Manual Build and Installation from Source

For developers who wish to build the extension from source, follow these steps:

  1. Clone the repository:
git clone https://github.com/suenot/aicommit.git
cd aicommit/vscode-extension
  1. Run the build script:
bash build.sh

The build.sh script performs the following operations:

  1. Install the packaged extension:
code --install-extension aicommit-vscode-0.1.0.vsix

Alternatively, use the VS Code UI: Extensions → … → Install from VSIX.

Section sources

Extension Configuration and Settings

The AICommit extension provides configurable settings through VS Code’s settings interface:

These settings can be accessed via VS Code’s Settings UI (Ctrl+,) or by editing settings.json directly. The extension integrates with the SCM view, adding a “Generate Commit Message” button when a git repository is detected.

Section sources

Verification of Installation

To verify successful installation and functionality:

  1. Open a git repository in VS Code
  2. Make changes to tracked files
  3. Open the Source Control view (Ctrl+Shift+G)
  4. Verify the presence of the sparkle icon (✨) in the source control toolbar
  5. Click the “Generate Commit Message” button
  6. Confirm that a commit message appears in the commit input box

If the extension fails to generate a message, check the developer console (Help → Toggle Developer Tools) for error messages related to aicommit CLI execution.

Section sources

Platform-Specific Considerations

The extension functions across macOS, Linux, and Windows environments with minor considerations:

The extension uses Node.js child_process to execute the aicommit CLI, abstracting platform-specific command execution differences.

Section sources

Integration with aicommit CLI Tool

The VS Code extension is tightly integrated with the aicommit CLI tool, which must be installed separately:

cargo install aicommit

Or via npm:

npm install -g @suenot/aicommit

After installation, configure a provider:

aicommit --add-provider

The extension executes the CLI with the --dry-run flag to generate commit messages without creating actual commits. It passes the repository root as the working directory and handles the output appropriately.

Section sources

Troubleshooting Common Issues

Missing aicommit CLI

Symptom: “Command failed: aicommit —dry-run” error in developer console Solution: Install the aicommit CLI and ensure it’s in the system PATH

Permission Denied Errors

Symptom: EACCES errors when executing aicommit Solution: On Unix-like systems, ensure the binary has execute permissions:

chmod +x $(which aicommit)

Build Script Failures

Symptom: npm or vsce commands not found during build Solution: Install Node.js and npm, then install vsce globally:

npm install -g @vscode/vsce

PATH Configuration Issues

Ensure that the directory containing the aicommit binary is included in your system PATH environment variable. The location varies by installation method:

Section sources