> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getunbound.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Jamf Python Installer

> Deploy Unbound to Macs that already have Python 3

## Overview

Works on any Mac with Python 3, including Macs older than macOS 13.

<Warning>
  On macOS, `/usr/bin/python3` does not work until the Xcode Command Line Tools are installed. Deploy the Command Line Tools or the [python.org](https://python.org) package. Or use the [binary runtime](/mdm-integrations/jamf/binary), which is self-contained.
</Warning>

Allow HTTPS to `getunbound.ai`, `backend.getunbound.ai`, `api.getunbound.ai`, `raw.githubusercontent.com` and `github.com`.

***

## 1. Create the script

Go to **Settings → Computer Management → Scripts → New**. Name it `Unbound daily onboard` and paste this into the **Script** tab:

```bash theme={null}
#!/bin/bash
API_KEY="$4"
[ -n "$API_KEY" ] || { echo "Parameter 4 (API key) is empty."; exit 1; }

for P in /usr/bin/python3 /Library/Frameworks/Python.framework/Versions/Current/bin/python3; do
    "$P" -c '' 2>/dev/null && PY="$P" && break
done
[ -n "$PY" ] || { echo "No usable python3. Deploy the Xcode Command Line Tools or the python.org package."; exit 1; }

INSTALLER=$(mktemp)
trap 'rm -f "$INSTALLER"' EXIT
curl -fsSL --max-time 120 -o "$INSTALLER" https://getunbound.ai/setup/mdm/onboard \
    || { echo "Could not download the installer."; exit 1; }

"$PY" "$INSTALLER" --api-key "$API_KEY" \
    --gateway-url https://api.getunbound.ai \
    --frontend-url https://gateway.getunbound.ai \
    --backend-url https://backend.getunbound.ai \
    --backfill
CODE=$?

MARKER="/Library/Application Support/Unbound/last-success.txt"
if [ $CODE -eq 0 ]; then
    mkdir -p "$(dirname "$MARKER")" && date -u +%Y-%m-%dT%H:%M:%SZ > "$MARKER" \
        || { echo "Installed, but could not write $MARKER."; exit 1; }
fi
exit $CODE
```

On the **Options** tab, label **Parameter 4** as `API key`.

The script only uses root-owned interpreters. A Homebrew or `/usr/local` python can be replaced by the logged-in user, and this script runs as root.

`--backfill` imports past Claude Code and Codex sessions. Re-running never duplicates a session.

***

## 2. Create the policy

Go to **Computers → Policies → New**.

<Steps>
  <Step title="General">
    Name it `Unbound daily onboard`. Set Trigger to **Recurring Check-in** and Execution Frequency to **Once every day**.
  </Step>

  <Step title="Scripts payload">
    Add the script and paste your API key into **Parameter 4**.
  </Step>

  <Step title="Scope">
    Select your developer Mac group, then save.
  </Step>
</Steps>

***

## Troubleshooting

| Symptom                            | Fix                                                                                                              |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `No usable python3`                | Install the Xcode Command Line Tools or the [python.org](https://python.org) package, then run the policy again. |
| `Could not download the installer` | Egress to `getunbound.ai` is blocked. Check your allow-list, including any TLS-inspecting proxy.                 |
| Policy shows **Failed**            | Open **Policies → Logs** and read the output. It names the step that failed.                                     |

***

## Remove Unbound

```bash theme={null}
sudo python3 -c "$(curl -fsSL https://getunbound.ai/setup/mdm/onboard)" --clear
```

Then delete `/Library/Application Support/Unbound`.
