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

# Apple Music

> clickwheel Apple Music commands and their options.

## `auth`

```bash theme={null}
clickwheel apple auth [OPTIONS]
```

Run the Music User Token authorization flow.

Opens your browser to sign in with your Apple ID, then saves the token to
`~/.clickwheel/.env`. One-time per Mac and Apple ID; the token is long-lived
but can be revoked.

**Examples**

```bash theme={null}
# One-time browser authorization
clickwheel apple auth
```

## `delete`

```bash theme={null}
clickwheel apple delete [OPTIONS] NAME
```

Delete a library playlist from your Apple Music account.

macOS-only; the deletion syncs to your other devices via iCloud Music
Library. Deletes EVERY playlist matching the name, useful for clearing
duplicates from failed pushes.

<ParamField path="name" type="string" required>
  Apple Music library playlist name to delete.
</ParamField>

<ParamField path="--yes, -y" type="boolean">
  Skip the confirmation prompt.
</ParamField>

## `doctor`

```bash theme={null}
clickwheel apple doctor [OPTIONS]
```

Probe Apple Music end-to-end (config, .p8, dev token, user token,
storefront, iCloud Music Library state). Mirrors `plex doctor`.

**Examples**

```bash theme={null}
# End-to-end Apple Music probe
clickwheel apple doctor
```

## `list`

```bash theme={null}
clickwheel apple list [OPTIONS]
```

List every library playlist in your Apple Music account.

Read-only. Use before `apple pull` to find the playlist you want.
Manual and smart playlists both appear; smart ones come back with
`canEdit=false` (we can pull them but you can't push back).

## `match`

```bash theme={null}
clickwheel apple match [OPTIONS] NAME
```

Preview how a playlist's tracks resolve to Apple Music song IDs.

Read-only (creates nothing), but caches the matches so the next `apple push`
is faster. Tracks below `--min-confidence` are flagged low-confidence for
review before pushing.

**Examples**

```bash theme={null}
# Preview how tracks resolve (no writes)
clickwheel apple match road-trip
```

<ParamField path="name" type="string" required>
  clickwheel playlist to match.
</ParamField>

<ParamField path="--refresh" type="boolean">
  Ignore the cache and re-match every track.
</ParamField>

<ParamField path="--min-confidence" type="number" default="0.85">
  Threshold between matched and low-confidence.
</ParamField>

## `pull`

```bash theme={null}
clickwheel apple pull [OPTIONS] NAME
```

Import an Apple Music library playlist into clickwheel's local store.

Tracks are matched against your library; unmatched rows are reported
(usually files Apple has that clickwheel hasn't scanned yet).

**Examples**

```bash theme={null}
# Import an Apple Music playlist
clickwheel apple pull road-trip
```

<ParamField path="name" type="string" required>
  Apple Music playlist to import.
</ParamField>

<ParamField path="--overwrite" type="boolean">
  Replace an existing clickwheel playlist with the same name.
</ParamField>

<ParamField path="--min-fuzzy" type="number" default="0.85">
  Fuzzy-match threshold for unmatched cache entries.
</ParamField>

## `push`

```bash theme={null}
clickwheel apple push [OPTIONS] NAME
```

Create a playlist in your Apple Music account from a clickwheel playlist.

Low-confidence matches are skipped by default; pass `--include-low` (after a
`clickwheel apple match` review) to include them.

**Examples**

```bash theme={null}
# Create the playlist in Apple Music
clickwheel apple push road-trip

# Include low-confidence matches
clickwheel apple push road-trip --include-low
```

<ParamField path="name" type="string" required>
  clickwheel playlist to push to Apple Music.
</ParamField>

<ParamField path="--refresh" type="boolean">
  Ignore the cache and re-match every track.
</ParamField>

<ParamField path="--min-confidence" type="number" default="0.85">
  Reject matches below this confidence.
</ParamField>

<ParamField path="--include-low" type="boolean">
  Push low-confidence matches too (use after reviewing).
</ParamField>

<ParamField path="--yes, -y" type="boolean">
  Skip the confirmation prompt.
</ParamField>
