| name | download |
| description | Download an Apple Music song/track to local cache. Use to find a track by name (or via an album's track list), confirm it, and download the decrypted audio file at a chosen quality. |
| when-to-use | When the user wants to download/save an Apple Music song or track to local files. |
| argument-hint | <song name or track id> |
| version | 0.1.0 |
| context | inline |
Download Apple Music Song
Find a track's catalog ID, then download the decrypted audio to disk.
Prerequisites
- The user must be logged into Apple Music in the app (storefront set) for catalog access.
- Downloading requires an active Apple Music subscription.
- The
<track_id> passed to download must be a SONG id (not an album or artist id).
--region Option
All subcommands (search, album, song, artist, download) accept an optional --region <code> (or -r) flag to browse a different region's catalog (e.g. --region jp, --region cn).
- If omitted, the user's account storefront is used (default behavior).
- If the specified region differs from the account region, a warning is printed: music in the browsing region is view-only and cannot be downloaded.
- To download, always use the account's own region (i.e. omit
--region).
Quick Reference
| Step | Command |
|---|
| Confirm login (optional) | tokimo-app-apple-music status |
| Find a song's ID | tokimo-app-apple-music search "<song name>" --types songs |
| Get IDs from an album's tracks | tokimo-app-apple-music album <album_id> |
| Confirm the track (optional) | tokimo-app-apple-music song <track_id> |
| Download | tokimo-app-apple-music download <track_id> --output <path> --quality <lossless|high|standard> |
Tip: Add --region <code> (e.g. --region jp) to any command to browse a different region's catalog. See Region Option for details.
Workflow
-
(Optional) Confirm login.
tokimo-app-apple-music status
-
Find the track ID. Search for songs and read the ID column.
tokimo-app-apple-music search "<song or artist name>" --types songs
The songs table columns are: ID, Name, Artist, Album, Duration, Composer, Genre.
Alternatively, take a track ID from an album's track list (each track has its own ID):
tokimo-app-apple-music album <album_id>
-
(Optional) Confirm the right track.
tokimo-app-apple-music song <track_id>
-
Download the track.
tokimo-app-apple-music download <track_id> --output <path> --quality high
--output — destination path. Default . (current directory).
--quality — lossless, high, or standard. Default high.
The track is downloaded and decrypted to the output path (e.g. an .m4a file).
Worked Example
Download "Blank Space":
tokimo-app-apple-music search "Blank Space" --types songs
tokimo-app-apple-music song 1440935808
tokimo-app-apple-music download 1440935808 --output ./blank-space.m4a --quality lossless
Notes
--types for search defaults to songs,albums; pass --types songs to get only songs (which carry downloadable track IDs).
- Album and artist IDs cannot be passed to
download — resolve them to a song ID first via album <album_id> or search --types songs.