Beginner-friendly Apple Music downloader workspace for Windows.
🇺🇸 English | 🇮🇩 Bahasa Indonesia
This repo is set up so beginners can get started faster.
Important files and folders:
amdl.exe— prebuilt Windows binary for quick startconfig.yaml— starter config with safe placeholder valuessetup.ps1— builds/checks the local setupwrapper-login.ps1— Apple Music login helperwrapper-start.ps1— starts/stops/checks the backend wrapperstart.bat— starts wrapper, then opensamdldownload.bat— quick helper for direct download command forwardingupdate.ps1/update.bat— updater that refreshes this folder from GitHub without recloningclient/— Go source code for the appwrapper-docker/— Docker runtime bundle for the supported backendwrapper-src/— source/reference bundle kept in the repo because it may still be useful for advanced/manual workflowstools/— optional local folder for binaries likemp4decrypt.exe
Supported backend target:
WorldObservationLog/wrapper
flowchart TD
U[User] --> PS[PowerShell in the AM-DL folder]
PS --> SETUP[setup.ps1 - first setup / repair]
PS --> START[wrapper-start.ps1 - daily start]
PS --> APP[amdl.exe]
APP --> CFG[config.yaml]
APP --> LOGIN[amdl.exe login]
LOGIN --> WRAP
START --> DOCKER[Docker Desktop]
DOCKER --> WRAP[apple-music-wrapper container]
WRAP --> CACHE[Local session cache\nwrapper-docker/rootfs/data]
APP --> API[Apple Music playback / license endpoints]
APP --> MP4BOX[MP4Box / GPAC]
APP --> FFMPEG[ffmpeg - optional convert]
APP --> MP4DEC[mp4decrypt - optional MV]
flowchart LR
A[Open PowerShell in the AM-DL folder] --> B[Run setup.ps1 once]
B --> C[Run amdl.exe login]
C --> D[Session cached locally]
D --> E[Run wrapper-start.ps1]
E --> F[Wrapper ports 10020/20020/30020 online]
F --> G[Run amdl.exe or amdl.exe doctor]
G --> H[Search / paste Apple Music URL]
H --> I{Requested mode}
I --> J[ALAC source]
I --> K[AAC / Atmos path]
I --> L[MV path]
J --> M[Tag with MP4Box]
J --> N[Optional convert with ffmpeg]
L --> O[Requires media-user-token]
L --> P[Requires mp4decrypt.exe]
- Windows
- Docker Desktop installed and running
- MP4Box / GPAC installed
- an active Apple Music subscription
- this repo extracted to a normal folder (not still inside a ZIP preview)
- Go
ffmpegmedia-user-tokenfor MV / AAC-LC / some lyric-related featuresmp4decrypt.exefor Music Video support
If amdl.exe is already present in the folder, you do not need Go just to use the app.
amdl doctor will tell you which parts are still missing.
This is very important. Most beginner errors happen because PowerShell is opened in the wrong folder.
- Open File Explorer
- Open your AM-DL folder
- Click the address bar
- Type:
powershell
- Press Enter
PowerShell will open directly in the correct folder.
If your AM-DL folder is, for example, E:\AM-DL, run:
cd "E:\AM-DL"If your path contains spaces, always use quotes.
Correct:
cd "C:\Users\Your Name\Downloads\AM-DL"Wrong:
cd C:\Users\Your Name\Downloads\AM-DLRun:
dirYou should see files like:
setup.ps1amdl.exewrapper-login.ps1wrapper-start.ps1README.md
If you do not see those files, you are in the wrong folder.
If you want the shortest possible path:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\setup.ps1
.\amdl.exe login
.\wrapper-start.ps1
.\amdl.exe doctor
.\amdl.exeIf you double-click the beginner PowerShell scripts, they now stay open at the end so the window does not instantly disappear.
Advanced usage from an existing terminal:
.\setup.ps1 -NoPause
.\wrapper-login.ps1 -NoPause
.\wrapper-start.ps1 -NoPauseIf you want MV / AAC-LC features too:
.\amdl.exe token setand place mp4decrypt.exe in one of these locations:
- next to
amdl.exe tools\mp4decrypt.exe- anywhere in
PATH
If you have already completed setup before, you usually do not need to start from zero again.
For normal repeat usage, usually just do this:
cd "YOUR_AM-DL_FOLDER"
.\wrapper-start.ps1
.\amdl.exeIf you want to check everything first:
.\wrapper-start.ps1 -Status
.\amdl.exe doctorUsually only if:
amdl.exeis missing
If you are using the ready-to-run folder/binary bundle, you do not need to clone the repo again just to get updates.
Use one of these:
.\amdl.exe updateTo check whether an update exists without downloading anything:
.\amdl.exe update --checkor:
.\update.batWhat the updater does:
- downloads the latest
mainbranch ZIP from GitHub - replaces bundled files like
amdl.exe, scripts, docs,client/, and wrapper sources - keeps your existing
config.yaml - keeps your local wrapper session cache under
wrapper-docker/rootfs/data - tries to run
setup.ps1afterward if Docker Desktop is ready
If you prefer the script directly, you can also run:
.\update.bat -CheckOnlyAfter updating, run:
.\wrapper-start.ps1
.\amdl.exe doctorIf you cloned the repo with Git instead of using the prebuilt folder, you can still use normal Git commands:
git pull- you moved the project to a new PC or folder
- you want to rebuild from source
- you want to regenerate/check the local setup again
Usually only if:
- the local session is missing
- you logged out/reset the session
- the wrapper cache was deleted
amdl doctorsays the login session is missing
Only if:
- you want MV / AAC-LC features
- your
media-user-tokenchanged or expired - you cleared your config and need to enter the token again
For most day-to-day usage:
cd "YOUR_AM-DL_FOLDER"
.\wrapper-start.ps1
.\amdl.exe| Mode | Source type | Command example | Notes |
|---|---|---|---|
| ALAC | Native lossless source | ./amdl.exe "URL" |
Default lossless path |
| AAC | Native AAC path | ./amdl.exe --aac "URL" |
Some AAC-related features may need media-user-token |
| Atmos | Native Atmos path | ./amdl.exe --atmos "URL" |
Only works if the title provides Atmos |
| Song only | Single-track mode | ./amdl.exe --song "URL" |
Useful for direct song links |
| Search mode | Interactive search | ./amdl.exe search album "Taylor Swift" |
Lets the user choose item and quality interactively |
| MV | Music Video path | depends on content + token + mp4decrypt.exe |
Advanced setup only |
| FLAC output | Converted output | set convert-after-download: true and convert-format: flac |
FLAC is converted from ALAC via ffmpeg, not native source |
Notes:
- Apple Music lossless source in this flow is ALAC, not FLAC.
- FLAC output is a conversion result, not the original source format.
- If a requested quality is unavailable for a title, that mode may fail or fall back depending on the path.
Make sure you are inside this repo folder.
You should see files like:
amdl.exesetup.ps1wrapper-login.ps1wrapper-start.ps1
You can confirm with:
dirRun:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThis only affects the current PowerShell window.
Run:
.\setup.ps1What this does:
- builds
amdl.exeif needed - prepares the wrapper Docker image
- prepares the local config flow
When it succeeds, you should see something like:
Setup complete- next steps mentioning
amdl.exe login
Run:
.\amdl.exe loginWhat this does:
- opens the wrapper login flow
- uses your account one time to create a local session/cache
- does not store your password in
config.yaml
After success, the session is cached locally under:
wrapper-docker/rootfs/data/
If Apple asks for 2FA, complete it in the terminal flow.
Run:
.\wrapper-start.ps1This should expose these ports locally:
127.0.0.1:10020127.0.0.1:20020127.0.0.1:30020
To check status:
.\wrapper-start.ps1 -StatusRun:
.\amdl.exe doctorYou want to see at least:
- backend ports reachable
- login session cached locally
- MP4Box available
Possible warnings:
media-user-tokenmissing → MV / AAC-LC features not ready yetmp4decryptmissing → Music Video support not ready yet
Run:
.\amdl.exeThis opens the interactive menu.
Main beginner actions:
- Search & Download
- Download from URL
- Setup Wizard
- Login to Apple Music
- Doctor Check
- Backend Status
These features need extra setup.
Run:
.\amdl.exe token setThis stores the token locally in config.yaml.
Put the real binary in one of these places:
.\mp4decrypt.exe.\tools\mp4decrypt.exe- or install it globally in
PATH
Run:
.\amdl.exe doctorFor full MV readiness, the doctor output should no longer warn about:
media-user-tokenmp4decryptMusic Video readiness
.\setup.ps1
.\amdl.exe login
.\amdl.exe logout
.\amdl.exe token set
.\amdl.exe token clear
.\wrapper-start.ps1
.\wrapper-start.ps1 -Status
.\wrapper-start.ps1 -Logs
.\amdl.exe doctor
.\amdl.exe backend status
.\amdl.exe backend guide
.\amdl.exe config show
.\amdl.exe search song "Blinding Lights"
.\amdl.exe download https://music.apple.com/us/album/1989-taylors-version-deluxe/1713845538No. Usually only the first time, or when repairing/rebuilding the setup.
Usually just:
cd "YOUR_AM-DL_FOLDER"
.\wrapper-start.ps1
.\amdl.exeOnly if you want to rebuild from source. If amdl.exe already exists, Go is not required for normal use.
You are probably in the wrong folder, or you forgot the PowerShell ./ prefix.
The beginner scripts now pause on completion/error. If you run from an existing terminal, use -NoPause.
Because the binary is not present in PATH, beside amdl.exe, or in tools\mp4decrypt.exe.
Music Video support also needs a valid media-user-token and mp4decrypt.exe.
No. In this flow, original lossless source is ALAC. FLAC is produced by converting ALAC with ffmpeg.
Use the normal PowerShell prefix:
.\amdl.exe doctorand not:
.amdl.exe doctorCheck:
.\wrapper-start.ps1 -StatusIf not running, start it again:
.\wrapper-start.ps1Also confirm Docker Desktop is running.
Run:
.\amdl.exe loginYou still need one or both of:
- a valid
media-user-token mp4decrypt.exe
Run:
.\amdl.exe doctorand check the exact warning line.
config.yamlin this repo is a starter file with placeholder values- local session/cache is stored under
wrapper-docker/rootfs/data - that session data is local runtime data and should not be committed with personal credentials
wrapper-docker/is the beginner runtime pathwrapper-src/is kept because you explicitly wanted it included for advanced/reference use
This repo includes:
.github/workflows/release.yml
It can build a Windows portable release bundle containing:
amdl.exe- helper scripts
config.example.yaml- quickstart documentation
wrapper-docker/