Deploy Capsule Security hooks for AI coding assistants across your macOS fleet using Kandji MDM. This guide covers deployment for Cursor, GitHub Copilot, and Claude Code.
- A Kandji tenant with administrative access
- A Capsule Security account with admin access
- Target devices running macOS
Deploy the Cursor hooks configuration using a Kandji Custom App.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the Cursor integration
- Download the
hooks.jsonfile
Log in to your Kandji tenant
Navigate to Library > Custom Apps
Click Add New and select Custom App
Configure the installation:
- Name: Capsule Security Cursor Hooks
- Install Type: Select ZIP File (unzip contents into specified directory)
- Unzip Location:
/Library/Application Support/Cursor/
Configure the Preinstall Script:
#!/bin/bash mkdir -p "/Library/Application Support/Cursor" chmod 755 "/Library/Application Support/Cursor"Create a ZIP archive containing the
hooks.jsonfile:zip hooks.zip hooks.jsonUpload the hooks.zip file to the Custom App
Assign the Custom App to the appropriate devices or Smart Groups
Deploy the configuration
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 Kandji Custom App.
- Log in to the Capsule Security portal
- Navigate to Settings > Integrations
- Locate the GitHub Copilot integration
- Download the
hooks.jsonfile
Log in to your Kandji tenant
Navigate to Library > Custom Apps
Click Add New and select Custom App
Configure the installation:
- Name: Capsule Security GitHub Copilot Hooks
- Install Type: Select ZIP File (unzip contents into specified directory)
- Unzip Location:
/Library/Application Support/Code/User/hooks/
Configure the Preinstall Script:
#!/bin/bash mkdir -p "/Library/Application Support/Code/User/hooks" chmod 755 "/Library/Application Support/Code/User/hooks"Create a ZIP archive containing the
hooks.jsonfile:zip hooks.zip hooks.jsonUpload the hooks.zip file to the Custom App
Assign the Custom App to the appropriate devices or Smart Groups
Deploy the configuration
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 Kandji Custom App.
- 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
Log in to your Kandji tenant
Navigate to Library > Custom Apps
Click Add New and select Custom App
Configure the installation:
- Name: Capsule Security Claude Code Hooks
- Install Type: Select ZIP File (unzip contents into specified directory)
- Unzip Location:
/Library/Application Support/ClaudeCode/
Configure the Preinstall Script:
#!/bin/bash mkdir -p "/Library/Application Support/ClaudeCode" chmod 755 "/Library/Application Support/ClaudeCode"Create a ZIP archive containing the
managed-settings.jsonfile:zip managed-settings.zip managed-settings.jsonUpload the managed-settings.zip file to the Custom App
Assign the Custom App to the appropriate devices or Smart Groups
Deploy the configuration
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
- The preinstall scripts ensure target directories exist with proper permissions before file deployment
- Restart each application on target devices after deployment for hooks to take effect
- Updates can be deployed by modifying the Custom App and incrementing the version
- Use Kandji Smart Groups for dynamic targeting and staged rollouts
- All three integrations can be deployed as separate Custom Apps and assigned independently
For help with deployment:
- Email: support@capsule.security
- Include: Your organization ID, Kandji tenant details, and any error messages