tag writes ID3v2 (mp3), Vorbis comment (flac), or iTunes-style (m4a) metadata so Spotify’s
Local Files feature — and every other player — shows the right title, artist, album, track,
year, and cover art. Fields you don’t pass are left exactly as they were; fields this doesn’t
understand (genre, comments, …) are always preserved untouched.
Arguments
string
required
The audio file to tag:
.mp3, .flac, or .m4a/.m4b.Options
string
Set the title.
string
Set the artist.
string
Set the album.
number
Set the track number.
number
Set the total track count.
number
Set the release year.
string
Embed cover art from an image file. Automatically cropped/resized to fit 300x300px —
Spotify silently fails to show local-file art above that size.
boolean
default:"false"
Remove the title.
boolean
default:"false"
Remove the artist.
boolean
default:"false"
Remove the album.
boolean
default:"false"
Remove the track number/total.
boolean
default:"false"
Remove the year.
boolean
default:"false"
Remove embedded cover art.
boolean
default:"false"
Append an invisible zero-width suffix to the artist tag, derived from the album so it’s
consistent across a re-run. Works around a known Spotify Local Files bug where one album’s
cover art gets duplicated onto every other album by the same artist. Requires both an artist
and an album to be known (from flags or existing tags).
boolean
default:"false"
Print what would change without writing the file.
Removing a field
--clear-* flags win over their corresponding value flag if both are somehow implied — pass the
clear flag on its own:
The unique-artist-tag workaround
batch applies the
same suffix to every file in a directory at once, which is the more common way to use this.