[GH-ISSUE #389] Feature Request: Add git-ai configure-gui command for automatic GUI tool configuration #147

Closed
opened 2026-03-02 04:12:16 +03:00 by kerem · 3 comments
Owner

Originally created by @txf0096 on GitHub (Jan 22, 2026).
Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/389

Background

After installing git-ai, users need to manually configure their Git GUI tools (VSCode, Cursor, Tower, SourceTree, etc.) to use the git-ai wrapper instead of the system git binary. This manual process is:

  1. Error-prone: Users need to find the correct settings file for each tool
  2. Time-consuming: Each tool has different configuration methods (JSON, XML, macOS defaults)
  3. Not discoverable: Many users don't know they need to do this until git-ai doesn't work in their GUI

Proposed Solution

Add a git-ai configure-gui command that automatically detects and configures installed GUI tools to use the git-ai wrapper.

Usage

# Auto-detect and configure all installed GUI tools
git-ai configure-gui --all

# Configure specific tools
git-ai configure-gui vscode cursor

# Preview changes without applying
git-ai configure-gui --all --dry-run

# List all supported tools and detection status
git-ai configure-gui --list

Example Output

🔍 Configuring GUI tools to use: /Users/alice/.git-ai/bin/git

✅ VSCode
   Set "git.path" to "/Users/alice/.git-ai/bin/git"
   Backup: /Users/alice/Library/Application Support/Code/User/settings.json.backup

✅ Cursor
   Set "git.path" to "/Users/alice/.git-ai/bin/git"

❌ GitHub Desktop
   Not installed

📊 Summary:
   ✅ 2 configured successfully
   ❌ 1 failed or not installed

⚠️  Please restart the configured applications for changes to take effect.

Supported GUI Tools

Priority 1 (Most Common):

  • Visual Studio Code
  • Cursor
  • GitHub Desktop

Priority 2 (Popular):

  • SourceTree
  • Tower
  • Sublime Merge
  • Fork

Priority 3 (IDE Family):

  • JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, etc.)

Implementation Notes

Each tool requires different configuration approaches:

JSON-based tools (VSCode, Cursor, Fork, Sublime Merge)

  • Read and parse settings.json (with JSONC support for comments)
  • Update git.path or git_binary or gitInstancePath field
  • Create backup before modification
  • Show diff of changes

macOS defaults-based tools (GitHub Desktop, SourceTree, Tower)

defaults write com.github.GitHubClient gitPath "/Users/alice/.git-ai/bin/git"

XML-based tools (JetBrains IDEs)

  • Find all JetBrains product directories
  • Update options/git.xml in each product
  • Update <option name="pathToGit" value="..." /> element

Benefits

  1. Better onboarding: New users can get started faster
  2. Fewer support requests: Common "git-ai not working in GUI" issues resolved
  3. Cross-platform: Works on macOS, Linux, and Windows
  4. Safe: Creates backups before modifying settings
  5. Transparent: Shows diff of changes and supports dry-run mode

This complements the existing git-ai install-hooks command, which configures agent-specific hooks. The configure-gui command focuses on Git GUI tools that need to be pointed to the git-ai wrapper.

Alternative Considered

Manual Documentation: We could just document the manual steps for each tool, but:

  • Users still need to do tedious work
  • Documentation gets outdated when tools change settings paths
  • Doesn't scale well as we support more tools

Platform Support

Initial implementation would focus on macOS, with Linux and Windows support added incrementally:

  • macOS (highest priority - most common dev platform)
  • 🔄 Linux (medium priority)
  • 🔄 Windows (can be added later - different paths and registry-based tools)
Originally created by @txf0096 on GitHub (Jan 22, 2026). Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/389 ## Background After installing `git-ai`, users need to manually configure their Git GUI tools (VSCode, Cursor, Tower, SourceTree, etc.) to use the git-ai wrapper instead of the system git binary. This manual process is: 1. **Error-prone**: Users need to find the correct settings file for each tool 2. **Time-consuming**: Each tool has different configuration methods (JSON, XML, macOS defaults) 3. **Not discoverable**: Many users don't know they need to do this until git-ai doesn't work in their GUI ## Proposed Solution Add a `git-ai configure-gui` command that automatically detects and configures installed GUI tools to use the git-ai wrapper. ### Usage ```bash # Auto-detect and configure all installed GUI tools git-ai configure-gui --all # Configure specific tools git-ai configure-gui vscode cursor # Preview changes without applying git-ai configure-gui --all --dry-run # List all supported tools and detection status git-ai configure-gui --list ``` ### Example Output ``` 🔍 Configuring GUI tools to use: /Users/alice/.git-ai/bin/git ✅ VSCode Set "git.path" to "/Users/alice/.git-ai/bin/git" Backup: /Users/alice/Library/Application Support/Code/User/settings.json.backup ✅ Cursor Set "git.path" to "/Users/alice/.git-ai/bin/git" ❌ GitHub Desktop Not installed 📊 Summary: ✅ 2 configured successfully ❌ 1 failed or not installed ⚠️ Please restart the configured applications for changes to take effect. ``` ### Supported GUI Tools **Priority 1 (Most Common):** - Visual Studio Code - Cursor - GitHub Desktop **Priority 2 (Popular):** - SourceTree - Tower - Sublime Merge - Fork **Priority 3 (IDE Family):** - JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, etc.) ### Implementation Notes Each tool requires different configuration approaches: #### JSON-based tools (VSCode, Cursor, Fork, Sublime Merge) - Read and parse settings.json (with JSONC support for comments) - Update `git.path` or `git_binary` or `gitInstancePath` field - Create backup before modification - Show diff of changes #### macOS defaults-based tools (GitHub Desktop, SourceTree, Tower) ```bash defaults write com.github.GitHubClient gitPath "/Users/alice/.git-ai/bin/git" ``` #### XML-based tools (JetBrains IDEs) - Find all JetBrains product directories - Update `options/git.xml` in each product - Update `<option name="pathToGit" value="..." />` element ### Benefits 1. **Better onboarding**: New users can get started faster 2. **Fewer support requests**: Common "git-ai not working in GUI" issues resolved 3. **Cross-platform**: Works on macOS, Linux, and Windows 4. **Safe**: Creates backups before modifying settings 5. **Transparent**: Shows diff of changes and supports dry-run mode ### Related Issues This complements the existing `git-ai install-hooks` command, which configures agent-specific hooks. The `configure-gui` command focuses on Git GUI tools that need to be pointed to the git-ai wrapper. ### Alternative Considered **Manual Documentation**: We could just document the manual steps for each tool, but: - Users still need to do tedious work - Documentation gets outdated when tools change settings paths - Doesn't scale well as we support more tools --- ## Platform Support Initial implementation would focus on **macOS**, with Linux and Windows support added incrementally: - ✅ macOS (highest priority - most common dev platform) - 🔄 Linux (medium priority) - 🔄 Windows (can be added later - different paths and registry-based tools)
kerem closed this issue 2026-03-02 04:12:16 +03:00
Author
Owner

@svarlamov commented on GitHub (Jan 22, 2026):

Hey, thank you for the issue! We're currently working on this #383

<!-- gh-comment-id:3782161136 --> @svarlamov commented on GitHub (Jan 22, 2026): Hey, thank you for the issue! We're currently working on this #383
Author
Owner

@acunniffe commented on GitHub (Jan 22, 2026):

+1 releasing something for Mac first and documenting how a community member could add an agent or Git Client (GUI) so it's easy for the community to extend support

<!-- gh-comment-id:3784447003 --> @acunniffe commented on GitHub (Jan 22, 2026): +1 releasing something for Mac first and documenting how a community member could add an agent or Git Client (GUI) so it's easy for the community to extend support
Author
Owner

@svarlamov commented on GitHub (Feb 7, 2026):

Thanks for raising this. We've got the foundation for this laid down and a number of Git clients already specially supported. I think from here on out we can accept issues for particular clients

<!-- gh-comment-id:3865752759 --> @svarlamov commented on GitHub (Feb 7, 2026): Thanks for raising this. We've got the foundation for this laid down and a number of Git clients already specially supported. I think from here on out we can accept issues for particular clients
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#147
No description provided.