Skip to content

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
mainfrom
cursor/install-hooks-no-editor-extensions-8d36
Draft

install-hooks: add --no-editor-extensions flag and disable_editor_extensions config to skip IDE extension installs#1
ashwin-corridor wants to merge 1 commit into
mainfrom
cursor/install-hooks-no-editor-extensions-8d36

Conversation

@ashwin-corridor

Copy link
Copy Markdown
Owner

Motivation

git-ai install-hooks unconditionally attempts to install the IDE extensions/plugins (git-ai.git-ai-vscode into 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-hooks has 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

  • New install-hooks --no-editor-extensions flag. Skips IDE extension/plugin installs (VS Code, Cursor, Windsurf, JetBrains, and Visual Studio when opted in) while still installing all agent hooks (Cursor hooks.json, Claude Code, Codex, Gemini, etc.) — and, for VS Code, still configuring the chat-hook settings, since those drive agent attribution.
  • New disable_editor_extensions config key (git-ai config set disable_editor_extensions true). install-hooks honors it when run without flags, so the daemon's daily hook refresh and the auto-update/install-script path respect the opt-out. Supported by config get/set/unset/show-all and documented in config --help.
  • Plumbed as a new skip_editor_extensions field on HookInstallerParams; each extension-installing installer returns a non-changing "skipped" result instead of attempting the install.
  • Help text and a README FAQ entry ("Can I install the agent hooks without the IDE extensions?").

Defaults are unchanged: extensions still install unless explicitly opted out. uninstall-hooks is unaffected.

Testing

  • cargo test --lib: 2043 passed.
  • cargo clippy --all-targets -- -D warnings (1.93.0) and cargo fmt --check: clean.
  • Integration tests for config_cli (incl. the FileConfig CLI-coverage guards, which now cover the new key) and install_hooks: pass.
  • Manual end-to-end with a stub cursor CLI on PATH:
    • default dry-run: Cursor: Pending updates + Cursor: Pending extension install
    • with --no-editor-extensions: Cursor: Pending updates only — hooks still installed, extension skipped
    • config set disable_editor_extensions true then a plain install-hooks: extension skipped with no flag; config unset restores default behavior.
  • New unit tests cover flag parsing and the skip path for the Cursor, VS Code, Windsurf, JetBrains, and Visual Studio installers.

Design notes

  • --no-editor-extensions covers the JetBrains plugin and Visual Studio extension too, not just the VS Code-family extension.
  • VS Code's chat-hook settings (agent attribution for Copilot chat) are intentionally still written when extensions are skipped; that's hook wiring, not an extension.
  • The config key is what makes the daemon's daily re-install respect the opt-out (a flag alone would be undone by the flag-less daily refresh).
Open in Web Open in Cursor 

…to skip IDE extension installs

Co-authored-by: Ashwin Ramaswami <ashwin@corridor.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants