# Kandji Distribution (macOS) 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. ## Prerequisites - A **Kandji** tenant with administrative access - A **Capsule Security** account with admin access - Target devices running macOS ## Cursor Deploy the Cursor hooks configuration using a Kandji Custom App. ### Step 1: Download the Configuration 1. Log in to the **Capsule Security** portal 2. Navigate to **Settings > Integrations** 3. Locate the **Cursor** integration 4. Download the `hooks.json` file ### Step 2: Create the Custom App 1. Log in to your Kandji tenant 2. Navigate to **Library > Custom Apps** 3. Click **Add New** and select **Custom App** 4. Configure the installation: - **Name**: Capsule Security Cursor Hooks - **Install Type**: Select **ZIP File (unzip contents into specified directory)** - **Unzip Location**: `/Library/Application Support/Cursor/` 5. Configure the **Preinstall Script**: ```bash #!/bin/bash mkdir -p "/Library/Application Support/Cursor" chmod 755 "/Library/Application Support/Cursor" ``` 6. Create a ZIP archive containing the `hooks.json` file: ```bash zip hooks.zip hooks.json ``` 7. Upload the **hooks.zip** file to the Custom App 8. Assign the Custom App to the appropriate devices or Smart Groups 9. Deploy the configuration ### Verification After deployment, restart Cursor on target devices, then: 1. Open Cursor Settings 2. Navigate to the **Hooks** tab 3. Confirm the hooks are listed and enabled ## GitHub Copilot Deploy the GitHub Copilot hooks configuration using a Kandji Custom App. ### Step 1: Download the Configuration 1. Log in to the **Capsule Security** portal 2. Navigate to **Settings > Integrations** 3. Locate the **GitHub Copilot** integration 4. Download the `hooks.json` file ### Step 2: Create the Custom App 1. Log in to your Kandji tenant 2. Navigate to **Library > Custom Apps** 3. Click **Add New** and select **Custom App** 4. 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/` 5. Configure the **Preinstall Script**: ```bash #!/bin/bash mkdir -p "/Library/Application Support/Code/User/hooks" chmod 755 "/Library/Application Support/Code/User/hooks" ``` 6. Create a ZIP archive containing the `hooks.json` file: ```bash zip hooks.zip hooks.json ``` 7. Upload the **hooks.zip** file to the Custom App 8. Assign the Custom App to the appropriate devices or Smart Groups 9. Deploy the configuration ### Verification After deployment, restart VS Code on target devices, then: 1. Right-click in the **Chat** view and select **Diagnostics** 2. Confirm the hooks are loaded and enabled ## Claude Code Deploy the Claude Code managed settings configuration using a Kandji Custom App. ### Step 1: Download the Configuration 1. Log in to the **Capsule Security** portal 2. Navigate to **Settings > Integrations** 3. Locate the **Claude Code** integration 4. Click **Install** and select **macOS** as the target platform 5. Download the `managed-settings.json` file ### Step 2: Create the Custom App 1. Log in to your Kandji tenant 2. Navigate to **Library > Custom Apps** 3. Click **Add New** and select **Custom App** 4. 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/` 5. Configure the **Preinstall Script**: ```bash #!/bin/bash mkdir -p "/Library/Application Support/ClaudeCode" chmod 755 "/Library/Application Support/ClaudeCode" ``` 6. Create a ZIP archive containing the `managed-settings.json` file: ```bash zip managed-settings.zip managed-settings.json ``` 7. Upload the **managed-settings.zip** file to the Custom App 8. Assign the Custom App to the appropriate devices or Smart Groups 9. Deploy the configuration ### Verification After deployment, restart Claude Code on target devices, then: 1. Run `/hooks` in Claude Code to confirm all hooks are listed 2. Start a session and verify events appear in the Capsule Security portal ## Key Considerations - 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 ## Support For help with deployment: - **Email**: support@capsule.security - **Include**: Your organization ID, Kandji tenant details, and any error messages