{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"JumpCloud Distribution (macOS)","description":"Control the power of AI Agents in runtime.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"jumpcloud-distribution-macos","__idx":0},"children":["JumpCloud Distribution (macOS)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deploy Capsule Security hooks for AI coding assistants across your macOS fleet using JumpCloud. This guide covers deployment for Cursor, GitHub Copilot, Claude Code, and Codex using JumpCloud ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Commands"]},", which run a shell script as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["root"]}," on bound devices."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JumpCloud"]}," administrator account"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JumpCloud agent"]}," installed on target devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," account with admin access"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Target devices running macOS"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cursor","__idx":2},"children":["Cursor"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deploy the Cursor hooks configuration using a JumpCloud Command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-download-the-configuration","__idx":3},"children":["Step 1: Download the Configuration"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," portal"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings > Integrations"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locate the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cursor"]}," integration"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Download the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hooks.json"]}," file"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-create-the-command","__idx":4},"children":["Step 2: Create the Command"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JumpCloud Admin Portal"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DEVICE MANAGEMENT > Commands"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["(+)"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," tab, configure the command:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},": Deploy Capsule Security Cursor Hooks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mac"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run As user"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["root"]}," (required for the system-wide path below)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paste the following into the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}," field, replacing the placeholder line with the contents of the downloaded ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hooks.json"]}," (keep the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CAPSULE_HOOKS_EOF"]}," marker lines unchanged and unindented):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"#!/bin/bash\nHOOKS_DIR=\"/Library/Application Support/Cursor\"\nmkdir -p \"$HOOKS_DIR\"\nchmod 755 \"$HOOKS_DIR\"\ncat > \"$HOOKS_DIR/hooks.json\" << 'CAPSULE_HOOKS_EOF'\n<PASTE YOUR HOOKS.JSON CONTENT HERE>\nCAPSULE_HOOKS_EOF\nchmod 644 \"$HOOKS_DIR/hooks.json\"\nexit 0\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-bind-and-run","__idx":5},"children":["Step 3: Bind and Run"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Device Groups"]}," tab (or the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Devices"]}," tab) and bind the target device groups or devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Commands"]}," page, click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run Now"]}," to execute the command, or configure a schedule so it re-runs on the bound devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Results"]}," tab to confirm the command completed successfully"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"verification","__idx":6},"children":["Verification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the command reports success, restart Cursor on target devices, then:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open Cursor Settings"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Hooks"]}," tab"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm the hooks are listed and enabled"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"github-copilot","__idx":7},"children":["GitHub Copilot"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deploy the GitHub Copilot hooks configuration using a JumpCloud Command. VS Code reads Copilot hooks from each user's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/Library/Application Support/Code/User/hooks/"]}," directory rather than a system-wide path, so the command runs as root and writes the configuration into every user profile on the device."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-download-the-configuration-1","__idx":8},"children":["Step 1: Download the Configuration"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," portal"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings > Integrations"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locate the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GitHub Copilot"]}," integration"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Download the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hooks.json"]}," file"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-create-the-command-1","__idx":9},"children":["Step 2: Create the Command"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JumpCloud Admin Portal"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DEVICE MANAGEMENT > Commands"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["(+)"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," tab, configure the command:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},": Deploy Capsule Security GitHub Copilot Hooks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mac"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run As user"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["root"]}," (required to write into each user's home directory below)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paste the following into the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}," field, replacing the placeholder line with the contents of the downloaded ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hooks.json"]}," (keep the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CAPSULE_HOOKS_EOF"]}," marker lines unchanged and unindented):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"#!/bin/bash\n\nfor USER_HOME in /Users/*/; do\n    USERNAME=$(basename \"$USER_HOME\")\n    if [ \"$USERNAME\" = \"Shared\" ] || [ \"$USERNAME\" = \".localized\" ]; then\n        continue\n    fi\n    HOOKS_DIR=\"$USER_HOME/Library/Application Support/Code/User/hooks\"\n    mkdir -p \"$HOOKS_DIR\"\n    cat > \"$HOOKS_DIR/hooks.json\" << 'CAPSULE_HOOKS_EOF'\n<PASTE YOUR HOOKS.JSON CONTENT HERE>\nCAPSULE_HOOKS_EOF\n    chmod 644 \"$HOOKS_DIR/hooks.json\"\n    chown \"$USERNAME\" \"$HOOKS_DIR\" \"$HOOKS_DIR/hooks.json\"\ndone\nexit 0\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-bind-and-run-1","__idx":10},"children":["Step 3: Bind and Run"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Device Groups"]}," tab (or the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Devices"]}," tab) and bind the target device groups or devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Commands"]}," page, click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run Now"]}," to execute the command, or configure a schedule so it re-runs to cover users created later"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Results"]}," tab to confirm the command completed successfully"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"verification-1","__idx":11},"children":["Verification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the command reports success, restart VS Code on target devices, then:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Right-click in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Chat"]}," view and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Diagnostics"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm the hooks are loaded and enabled"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"claude-code","__idx":12},"children":["Claude Code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deploy the Claude Code managed settings configuration using a JumpCloud Command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-download-the-configuration-2","__idx":13},"children":["Step 1: Download the Configuration"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," portal"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings > Integrations"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locate the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Claude Code"]}," integration"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Install"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["macOS"]}," as the target platform"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Download the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["managed-settings.json"]}," file"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-create-the-command-2","__idx":14},"children":["Step 2: Create the Command"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JumpCloud Admin Portal"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DEVICE MANAGEMENT > Commands"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["(+)"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," tab, configure the command:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},": Deploy Capsule Security Claude Code Hooks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mac"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run As user"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["root"]}," (required for the system-wide path below)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paste the following into the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}," field, replacing the placeholder line with the contents of the downloaded ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["managed-settings.json"]}," (keep the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CAPSULE_HOOKS_EOF"]}," marker lines unchanged and unindented):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"#!/bin/bash\nSETTINGS_DIR=\"/Library/Application Support/ClaudeCode\"\nmkdir -p \"$SETTINGS_DIR\"\nchmod 755 \"$SETTINGS_DIR\"\ncat > \"$SETTINGS_DIR/managed-settings.json\" << 'CAPSULE_HOOKS_EOF'\n<PASTE YOUR MANAGED-SETTINGS.JSON CONTENT HERE>\nCAPSULE_HOOKS_EOF\nchmod 644 \"$SETTINGS_DIR/managed-settings.json\"\nexit 0\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-bind-and-run-2","__idx":15},"children":["Step 3: Bind and Run"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Device Groups"]}," tab (or the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Devices"]}," tab) and bind the target device groups or devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Commands"]}," page, click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run Now"]}," to execute the command, or configure a schedule so it re-runs on the bound devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Results"]}," tab to confirm the command completed successfully"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"verification-2","__idx":16},"children":["Verification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the command reports success, restart Claude Code on target devices, then:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/hooks"]}," in Claude Code to confirm all hooks are listed"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Start a session and verify events appear in the Capsule Security portal"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"codex","__idx":17},"children":["Codex"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deploy the Codex CLI hooks configuration using a JumpCloud Command. Codex reads hooks from each user's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.codex/hooks.json"]}," rather than a system-wide path, so the command runs as root and writes the configuration into every user profile on the device."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For organizations that want the Capsule hooks trusted by policy and non-removable, Codex also supports ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developers.openai.com/codex/enterprise/managed-configuration"},"children":["managed configuration"]}," — a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requirements.toml"]}," delivered at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/etc/codex/requirements.toml"]}," or as a configuration profile in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["com.openai.codex"]}," preference domain, which JumpCloud can distribute as a Custom macOS MDM Configuration Profile alongside this command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-download-the-configuration-3","__idx":18},"children":["Step 1: Download the Configuration"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capsule Security"]}," portal"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings > Integrations"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locate the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Codex"]}," integration"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Install"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mac"]}," as the target platform"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Download the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hooks.json"]}," file"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-create-the-command-3","__idx":19},"children":["Step 2: Create the Command"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log in to the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["JumpCloud Admin Portal"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DEVICE MANAGEMENT > Commands"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["(+)"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," tab, configure the command:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},": Deploy Capsule Security Codex Hooks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mac"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run As user"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["root"]}," (required to write into each user's home directory below)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paste the following into the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Command"]}," field, replacing the placeholder line with the contents of the downloaded ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hooks.json"]}," (keep the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CAPSULE_HOOKS_EOF"]}," marker lines unchanged and unindented):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"#!/bin/bash\n\nfor USER_HOME in /Users/*/; do\n    USERNAME=$(basename \"$USER_HOME\")\n    if [ \"$USERNAME\" = \"Shared\" ] || [ \"$USERNAME\" = \".localized\" ]; then\n        continue\n    fi\n    CODEX_DIR=\"$USER_HOME/.codex\"\n    mkdir -p \"$CODEX_DIR\"\n    cat > \"$CODEX_DIR/hooks.json\" << 'CAPSULE_HOOKS_EOF'\n<PASTE YOUR HOOKS.JSON CONTENT HERE>\nCAPSULE_HOOKS_EOF\n    chmod 644 \"$CODEX_DIR/hooks.json\"\n    chown \"$USERNAME\" \"$CODEX_DIR\" \"$CODEX_DIR/hooks.json\"\ndone\nexit 0\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-bind-and-run-3","__idx":20},"children":["Step 3: Bind and Run"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Device Groups"]}," tab (or the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Devices"]}," tab) and bind the target device groups or devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Commands"]}," page, click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run Now"]}," to execute the command, or configure a schedule so it re-runs to cover users created later"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Results"]}," tab to confirm the command completed successfully"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"verification-3","__idx":21},"children":["Verification"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the command reports success, close any running Codex CLI sessions on target devices, then have each user:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Start a new Codex CLI session so the hooks configuration is loaded"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If Codex warns that hooks require review, run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/hooks"]},", review the Capsule hooks, and trust them — Codex ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developers.openai.com/codex/hooks"},"children":["skips non-managed hooks"]}," until the user trusts them, and trust must be re-granted whenever the deployed configuration changes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the Capsule portal, navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Inventory > Agents"]}," and confirm the Codex agent appears with session, prompt, response, and tool-invocation events"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"key-considerations","__idx":22},"children":["Key Considerations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Commands run as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["root"]},", so they can create the target directories and write the configuration files — including into each user's home for the per-user integrations — without additional privileges"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["To update configurations, edit the command's script and re-run it on the bound devices"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use JumpCloud Device Groups for dynamic targeting and staged rollouts"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["All four integrations can be deployed as separate commands and bound independently"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GitHub Copilot"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Codex"]}," use per-user paths (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/Library/Application Support/Code/User/hooks/hooks.json"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.codex/hooks.json"]},"), so a single run only covers user accounts that exist at execution time — schedule the command to re-run so it covers users created later"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Restart each application on target devices after deployment for hooks to take effect"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"support","__idx":23},"children":["Support"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For help with deployment:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email"]},": support@capsule.security"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Include"]},": Your organization ID, JumpCloud tenant details, and any error messages"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"references","__idx":24},"children":["References"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://jumpcloud.com/support/get-started-commands"},"children":["JumpCloud Commands — Get Started"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://jumpcloud.com/support/create-a-command-manually"},"children":["JumpCloud — Create a Command"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developers.openai.com/codex/hooks"},"children":["Codex Hooks"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developers.openai.com/codex/enterprise/managed-configuration"},"children":["Codex Managed Configuration"]}]}]}]},"headings":[{"value":"JumpCloud Distribution (macOS)","id":"jumpcloud-distribution-macos","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Cursor","id":"cursor","depth":2},{"value":"Step 1: Download the Configuration","id":"step-1-download-the-configuration","depth":3},{"value":"Step 2: Create the Command","id":"step-2-create-the-command","depth":3},{"value":"Step 3: Bind and Run","id":"step-3-bind-and-run","depth":3},{"value":"Verification","id":"verification","depth":3},{"value":"GitHub Copilot","id":"github-copilot","depth":2},{"value":"Step 1: Download the Configuration","id":"step-1-download-the-configuration-1","depth":3},{"value":"Step 2: Create the Command","id":"step-2-create-the-command-1","depth":3},{"value":"Step 3: Bind and Run","id":"step-3-bind-and-run-1","depth":3},{"value":"Verification","id":"verification-1","depth":3},{"value":"Claude Code","id":"claude-code","depth":2},{"value":"Step 1: Download the Configuration","id":"step-1-download-the-configuration-2","depth":3},{"value":"Step 2: Create the Command","id":"step-2-create-the-command-2","depth":3},{"value":"Step 3: Bind and Run","id":"step-3-bind-and-run-2","depth":3},{"value":"Verification","id":"verification-2","depth":3},{"value":"Codex","id":"codex","depth":2},{"value":"Step 1: Download the Configuration","id":"step-1-download-the-configuration-3","depth":3},{"value":"Step 2: Create the Command","id":"step-2-create-the-command-3","depth":3},{"value":"Step 3: Bind and Run","id":"step-3-bind-and-run-3","depth":3},{"value":"Verification","id":"verification-3","depth":3},{"value":"Key Considerations","id":"key-considerations","depth":2},{"value":"Support","id":"support","depth":2},{"value":"References","id":"references","depth":2}],"frontmatter":{"seo":{"title":"JumpCloud Distribution (macOS)"}},"lastModified":"2026-07-13T09:07:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/mdm-jumpcloud","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}