install-hooks: add --no-editor-extensions flag and disable_editor_extensions config to skip IDE extension installs#1
Draft
ashwin-corridor wants to merge 1 commit into
Conversation
…to skip IDE extension installs Co-authored-by: Ashwin Ramaswami <ashwin@corridor.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
git-ai install-hooksunconditionally attempts to install the IDE extensions/plugins (git-ai.git-ai-vscodeinto VS Code/Cursor/Windsurf, plus the JetBrains plugin) as part of the same step that installs the agent hooks. Today there is no way to get the agent hooks without the editor extensions:install-hookshas no opt-out flag and no config key, and since hooks are re-checked/re-installed daily (and the auto-update path re-runs the installer), anything removed out-of-band gets re-applied.For managed/enterprise rollouts it's often desirable to deploy the binary and agent hooks while leaving editor extensions to each organization's own extension management. This follows the existing precedent of opt-in flags on
install-hooks(--skills,--visual-studio-extension).Changes
install-hooks --no-editor-extensionsflag. Skips IDE extension/plugin installs (VS Code, Cursor, Windsurf, JetBrains, and Visual Studio when opted in) while still installing all agent hooks (Cursorhooks.json, Claude Code, Codex, Gemini, etc.) — and, for VS Code, still configuring the chat-hook settings, since those drive agent attribution.disable_editor_extensionsconfig key (git-ai config set disable_editor_extensions true).install-hookshonors it when run without flags, so the daemon's daily hook refresh and the auto-update/install-script path respect the opt-out. Supported byconfig get/set/unset/show-alland documented inconfig --help.skip_editor_extensionsfield onHookInstallerParams; each extension-installing installer returns a non-changing "skipped" result instead of attempting the install.Defaults are unchanged: extensions still install unless explicitly opted out.
uninstall-hooksis unaffected.Testing
cargo test --lib: 2043 passed.cargo clippy --all-targets -- -D warnings(1.93.0) andcargo fmt --check: clean.config_cli(incl. theFileConfigCLI-coverage guards, which now cover the new key) andinstall_hooks: pass.cursorCLI on PATH:Cursor: Pending updates+Cursor: Pending extension install--no-editor-extensions:Cursor: Pending updatesonly — hooks still installed, extension skippedconfig set disable_editor_extensions truethen a plaininstall-hooks: extension skipped with no flag;config unsetrestores default behavior.Design notes
--no-editor-extensionscovers the JetBrains plugin and Visual Studio extension too, not just the VS Code-family extension.