@@ -31,11 +31,12 @@ You're already investing in Claude Code – whether it's Pro, Max ×5, or Max ×
3131## Installation
3232
33331 . Install the extension from the VS Code Marketplace
34- 2 . Ensure Claude CLI is installed and available in your system PATH
34+ 2 . Ensure Claude CLI is installed (comes with your Claude Code subscription)
35353 . Open a project with a Git repository
36364 . Look for the sparkle ✨ button in your Source Control panel
37+ 5 . On first use, if CLI is not auto-detected, you'll be prompted to configure the path
3738
38- ** That's it!** No configuration needed if you're using Claude CLI.
39+ ** That's it!** The extension will automatically find Claude CLI or guide you through one-time setup .
3940
4041## How to Use
4142
@@ -51,64 +52,95 @@ You're already investing in Claude Code – whether it's Pro, Max ×5, or Max ×
5152
5253This extension keeps it simple with just a few optional settings:
5354
54- * ` claude-commit.preferredMethod ` : Choose AI backend (` auto ` , ` cli ` , or ` api ` ) – defaults to ` auto `
55- * ` claude-commit.apiKey ` : Your Anthropic API key (only needed if using API method)
56- * ` claude-commit.language ` : Interface language (` en ` for English, ` ua ` for Ukrainian)
55+ * ` claudeCommit.cliPath ` : Path to Claude CLI executable (leave empty for auto-detection)
56+ * ` claudeCommit.preferredMethod ` : Choose AI backend (` auto ` , ` cli ` , or ` api ` ) – defaults to ` auto `
57+ * ` claudeCommit.apiKey ` : Your Anthropic API key (only needed if using API method)
58+ * ` claudeCommit.language ` : Interface language (` en ` for English, ` ua ` for Ukrainian)
5759
5860## Configuration Examples
5961
60- ### Using only Claude CLI
62+ ### Auto-detection (recommended)
6163``` json
6264{
63- "claude-commit.preferredMethod" : " cli"
65+ "claudeCommit.preferredMethod" : " auto"
66+ }
67+ ```
68+ The extension will automatically search for Claude CLI in common locations.
69+
70+ ### Manual CLI path (for NVM users or custom installations)
71+ ``` json
72+ {
73+ "claudeCommit.cliPath" : " /Users/you/.nvm/versions/node/v22.13.0/bin/claude" ,
74+ "claudeCommit.preferredMethod" : " cli"
6475}
6576```
6677
6778### Using Anthropic API as fallback
6879``` json
6980{
70- "claude-commit .preferredMethod" : " auto" ,
71- "claude-commit .apiKey" : " your-api-key-here"
81+ "claudeCommit .preferredMethod" : " auto" ,
82+ "claudeCommit .apiKey" : " your-api-key-here"
7283}
7384```
7485
7586### Ukrainian interface
7687``` json
7788{
78- "claude-commit .language" : " ua"
89+ "claudeCommit .language" : " ua"
7990}
8091```
8192
8293## Troubleshooting
8394
8495### Claude CLI not found
8596
86- If the extension can't find Claude CLI:
97+ The extension uses intelligent auto-detection to find Claude CLI. If it's not found automatically:
98+
99+ 1 . ** On first use** : The extension will prompt you to configure the path:
100+ - ** Browse for CLI** : Opens a file picker to locate the executable
101+ - ** Enter Path Manually** : Type the full path directly
102+ - ** Skip (Use API)** : Fall back to API method (requires API key)
87103
88- 1 . ** Check Claude is installed ** : Run in terminal :
104+ 2 . ** Find your Claude CLI path manually ** :
89105 ``` bash
90106 which claude
91107 ```
92- This should show the path to Claude (e.g., ` /Users/you/.nvm/versions/node/v22.13.0/bin/claude ` )
93-
94- 2 . ** Verify authentication** : Ensure Claude CLI is authenticated:
108+ This shows the path (e.g., ` /Users/you/.nvm/versions/node/v22.13.0/bin/claude ` )
109+
110+ 3 . ** Configure the path in settings** :
111+ - Open VS Code Settings (Cmd+, or Ctrl+,)
112+ - Search for "claudeCommit.cliPath"
113+ - Paste the path from step 2
114+
115+ 4 . ** Auto-detection locations** (checked in order):
116+ - User-configured path in settings
117+ - System PATH (via ` which claude ` )
118+ - Shell profile paths (~ /.zshrc, ~ /.bashrc)
119+ - Common installation paths:
120+ - ` /usr/local/bin/claude `
121+ - ` /opt/homebrew/bin/claude `
122+ - ` ~/.local/bin/claude `
123+ - ` ~/.nvm/versions/node/*/bin/claude ` (NVM)
124+ - ` ~/.npm-global/bin/claude `
125+
126+ 5 . ** Verify authentication** : Ensure Claude CLI is authenticated:
95127 ``` bash
96- claude setup-token
128+ claude --version
97129 ```
98130
99- 3 . ** Common issues** :
100- - ** NVM users** : VS Code might not see NVM paths – restart VS Code after installing Claude
101- - ** macOS** : If using zsh, paths might differ between terminal and VS Code
102- - ** Windows** : Ensure Claude is in your system PATH
131+ 6 . ** Common issues** :
132+ - ** NVM users** : Auto-detection now supports NVM paths, but you may need to configure manually once
133+ - ** macOS** : The extension now loads shell profiles to find paths
134+ - ** Windows** : Checks common npm installation directories
103135
104136### No commit message generated
105137
1061381 . Ensure you have changes in your repository (staged or unstaged)
1071392 . Check that Claude CLI is properly authenticated
1081403 . Try using API method as fallback:
109141 - Get API key from https://console.anthropic.com/
110- - Add to settings: ` claude-commit .apiKey`
111- - Set ` claude-commit .preferredMethod` to ` api `
142+ - Add to settings: ` claudeCommit .apiKey`
143+ - Set ` claudeCommit .preferredMethod` to ` api `
112144
113145### Extension not working
114146
@@ -118,6 +150,7 @@ If the extension can't find Claude CLI:
1181504 . Try generating a commit message manually via Command Palette:
119151 - Press ` Cmd+Shift+P ` (or ` Ctrl+Shift+P ` )
120152 - Type "Claude Commit: Generate"
153+ 5 . If CLI path is incorrect, clear ` claudeCommit.cliPath ` in settings to trigger re-detection
121154
122155## Privacy & Security
123156
0 commit comments