Deploy Capsule Security hooks for AI coding assistants across your macOS fleet using Jamf Pro. This guide covers deployment for Cursor, GitHub Copilot, Claude Code, and Devin (Windsurf) using Jamf Composer to create packages with preinstall scripts, and Codex using a script policy or configuration profile.
- Jamf Pro console with administrative access
- Jamf Composer installed on your Mac
- A Capsule Security account with admin access
- Target devices running macOS
Deploy the Cursor hooks configuration using a Jamf Composer package.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the Cursor integration
- Download the
hooks.jsonfile
Open Jamf Composer on your Mac
Create a new package source:
- Open Finder and create the directory structure locally:
/Library/Application Support/Cursor/ - Place the
hooks.jsonfile inside this directory - Important: Composer captures the exact file structure, so the
hooks.jsonfile must already be in/Library/Application Support/Cursor/before dragging into Composer - Drag only the
Cursorfolder directly into Composer's Sources panel on the left sidebar
- Open Finder and create the directory structure locally:
Configure the package destination:
- In the left sidebar, right-click on the newly created package source
- Select Edit Package or Package Settings
- Confirm the destination is set to
/(root) so files install to/Library/Application Support/Cursor/
Add a Preinstall Script:
- Expand the Package under Sources
- Right-click on Scripts and select Add Shell Script > preinstall
- Paste the following script:
#!/bin/bash mkdir -p "/Library/Application Support/Cursor" chmod 755 "/Library/Application Support/Cursor" exit 0Build the package:
- Click Build as PKG
- Save as
CapsuleCursorHooks.pkg
- Log in to your Jamf Pro console
- Navigate to Settings > Computer Management > Packages
- Click New and upload the
.pkgfile - Create a Policy:
- Navigate to Computers > Policies and click New
- Name: Deploy Capsule Security Cursor Hooks
- Trigger: Recurring Check-in
- Execution Frequency: Once per computer
- Under Packages, click Configure, add the package, and set Action to Install
- Configure the Scope: add target computers, groups, or departments
- Save and deploy
After deployment, restart Cursor on target devices, then:
- Open Cursor Settings
- Navigate to the Hooks tab
- Confirm the hooks are listed and enabled
Deploy the GitHub Copilot hooks configuration using a Jamf Composer package.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the GitHub Copilot integration
- Download the
hooks.jsonfile
Open Jamf Composer on your Mac
Create a new package source:
- Open Finder and create the directory structure locally:
/Library/Application Support/Code/User/hooks/ - Place the
hooks.jsonfile inside this directory - Drag only the
hooksfolder directly into Composer's Sources panel on the left sidebar
- Open Finder and create the directory structure locally:
Configure the package destination:
- In the left sidebar, right-click on the newly created package source
- Select Edit Package or Package Settings
- Confirm the destination is set to
/(root) so files install to/Library/Application Support/Code/User/hooks/
Add a Preinstall Script:
- Expand the Package under Sources
- Right-click on Scripts and select Add Shell Script > preinstall
- Paste the following script:
#!/bin/bash mkdir -p "/Library/Application Support/Code/User/hooks" chmod 755 "/Library/Application Support/Code/User/hooks" exit 0Build the package:
- Click Build as PKG
- Save as
CapsuleCopilotHooks.pkg
- Log in to your Jamf Pro console
- Navigate to Settings > Computer Management > Packages
- Click New and upload the
.pkgfile - Create a Policy:
- Navigate to Computers > Policies and click New
- Name: Deploy Capsule Security GitHub Copilot Hooks
- Trigger: Recurring Check-in
- Execution Frequency: Once per computer
- Under Packages, click Configure, add the package, and set Action to Install
- Configure the Scope: add target computers, groups, or departments
- Save and deploy
After deployment, restart VS Code on target devices, then:
- Right-click in the Chat view and select Diagnostics
- Confirm the hooks are loaded and enabled
Deploy the Claude Code managed settings configuration using a Jamf Composer package.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the Claude Code integration
- Click Install and select macOS as the target platform
- Download the
managed-settings.jsonfile
Open Jamf Composer on your Mac
Create a new package source:
- Open Finder and create the directory structure locally:
/Library/Application Support/ClaudeCode/ - Place the
managed-settings.jsonfile inside this directory - Drag only the
ClaudeCodefolder directly into Composer's Sources panel on the left sidebar
- Open Finder and create the directory structure locally:
Configure the package destination:
- In the left sidebar, right-click on the newly created package source
- Select Edit Package or Package Settings
- Confirm the destination is set to
/(root) so files install to/Library/Application Support/ClaudeCode/
Add a Preinstall Script:
- Expand the Package under Sources
- Right-click on Scripts and select Add Shell Script > preinstall
- Paste the following script:
#!/bin/bash mkdir -p "/Library/Application Support/ClaudeCode" chmod 755 "/Library/Application Support/ClaudeCode" exit 0Build the package:
- Click Build as PKG
- Save as
CapsuleClaudeCodeHooks.pkg
- Log in to your Jamf Pro console
- Navigate to Settings > Computer Management > Packages
- Click New and upload the
.pkgfile - Create a Policy:
- Navigate to Computers > Policies and click New
- Name: Deploy Capsule Security Claude Code Hooks
- Trigger: Recurring Check-in
- Execution Frequency: Once per computer
- Under Packages, click Configure, add the package, and set Action to Install
- Configure the Scope: add target computers, groups, or departments
- Save and deploy
After deployment, restart Claude Code on target devices, then:
- Run
/hooksin Claude Code to confirm all hooks are listed - Start a session and verify events appear in the Capsule Security portal
Deploy the Devin (Windsurf) hooks configuration using a Jamf Composer package. Cascade merges hook configurations from the system, user, and workspace levels (Cascade hooks documentation), so deploying to the system-level path applies the Capsule hooks to every user on the device, and they cannot be disabled by end users.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the Devin (Windsurf) integration
- Choose MDM as the deployment method
- Select Mac as the target platform and download the
hooks.jsonfile
Open Jamf Composer on your Mac
Create a new package source:
- Open Finder and create the directory structure locally:
/Library/Application Support/Windsurf/ - Place the
hooks.jsonfile inside this directory - Drag only the
Windsurffolder directly into Composer's Sources panel on the left sidebar
- Open Finder and create the directory structure locally:
Configure the package destination:
- In the left sidebar, right-click on the newly created package source
- Select Edit Package or Package Settings
- Confirm the destination is set to
/(root) so files install to/Library/Application Support/Windsurf/
Add a Preinstall Script:
- Expand the Package under Sources
- Right-click on Scripts and select Add Shell Script > preinstall
- Paste the following script:
#!/bin/bash mkdir -p "/Library/Application Support/Windsurf" chmod 755 "/Library/Application Support/Windsurf" exit 0Build the package:
- Click Build as PKG
- Save as
CapsuleWindsurfHooks.pkg
- Log in to your Jamf Pro console
- Navigate to Settings > Computer Management > Packages
- Click New and upload the
.pkgfile - Create a Policy:
- Navigate to Computers > Policies and click New
- Name: Deploy Capsule Security Devin (Windsurf) Hooks
- Trigger: Recurring Check-in
- Execution Frequency: Once per computer
- Under Packages, click Configure, add the package, and set Action to Install
- Configure the Scope: add target computers, groups, or departments
- Save and deploy
Hooks are loaded at application start, so after deployment, close Devin Desktop completely on target devices and reopen it, then:
- Start a Cascade session and run a simple task to generate activity
- In the Capsule portal, navigate to Inventory > Agents and confirm the agent appears
Deploy the Codex managed configuration using a Jamf script policy. Codex reads a managed requirements.toml from the system-wide path /etc/codex/requirements.toml; because the configuration is managed, the Capsule hooks are trusted by policy, apply to every user on the device (including users created later), and cannot be overridden or removed by users. No per-user trust approval is required.
Alternatively, Jamf Pro can deliver the same configuration as a Configuration Profile in the com.openai.codex preference domain, with the downloaded file's content base64-encoded into the requirements_toml_base64 key.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the Codex integration
- Choose MDM as the deployment method
- Select Mac as the target platform and download the
requirements.tomlfile
Log in to your Jamf Pro console
Navigate to Settings > Computer Management > Scripts and click New
Display Name: Deploy Capsule Security Codex Managed Configuration
Paste the following script, replacing the placeholder line with the contents of the downloaded
requirements.toml(keep theCAPSULE_REQUIREMENTS_EOFmarker lines unchanged and unindented):#!/bin/bash CODEX_DIR="/etc/codex" mkdir -p "$CODEX_DIR" chmod 755 "$CODEX_DIR" cat > "$CODEX_DIR/requirements.toml" << 'CAPSULE_REQUIREMENTS_EOF' <PASTE YOUR REQUIREMENTS.TOML CONTENT HERE> CAPSULE_REQUIREMENTS_EOF chmod 644 "$CODEX_DIR/requirements.toml" exit 0
- Navigate to Computers > Policies and click New
- Name: Deploy Capsule Security Codex Managed Configuration
- Trigger: Recurring Check-in
- Execution Frequency: Once per computer
- Under Scripts, click Configure and add the script
- Configure the Scope: add target computers, groups, or departments
- Save and deploy
After deployment, close any running Codex CLI sessions on target devices, then:
- Start a new Codex CLI session so the managed configuration is loaded
- In the Capsule portal, navigate to Inventory > Agents and confirm the Codex agent appears with session, prompt, response, and tool-invocation events
- Preinstall scripts ensure target directories exist with proper permissions before file deployment
- Packages must be in
.pkgformat to support preinstall scripts - To update configurations, create a new package version and update the policy
- Use Jamf Smart Groups for dynamic targeting and staged rollouts
- All five integrations can be deployed as separate packages and policies, assigned independently
- Codex uses a managed configuration (
/etc/codex/requirements.toml) enforced by policy - it applies to all users on the device (including users created later) and cannot be overridden by user-level configuration - Devin (Windsurf) merges system, user, and workspace hook configurations, so the system-level deployment coexists with any per-user hooks and cannot be disabled by end users
- Restart each application on target devices after deployment for hooks to take effect
For help with deployment:
- Email: support@capsule.security
- Include: Your organization ID, Jamf Pro environment details, and any error messages