pacmax beta

Alfred Pac by caleb531 on GitHub

Play Song

An Alfred workflow for quickly and easily playing music in the Apple Music app

From their README

Play Song

Copyright 2013-2025 Caleb Evans
Released under the MIT license

Play Song is an Alfred workflow designed to make playing music in Music.app extremely quick and convenient.

The workflow will be solely supporting Alfred 5 going forward, but the workflow versions last compatible with the previous versions of Alfred will remain available here for your convenience.

Play Song in action

Special thanks to @Tyilo for his invaluable feedback and code contributions.

Usage

Play Song includes a number of keyword filters which allow you to search for and play songs in your Music.app library. For example:

Playing a song

playsong hey jude

Playing a song in a particular album

playsongin abbey road

Playing a song by a particular artist

playsongby beatles

Playing an album

playalbum pet sounds

Playing an album by a particular artist

playalbumby beach boys

Playing an artist

playartist killers

Playing a genre

playgenre alternative

Playing a playlist

playplaylist favorites

Controlling the Music app's global shuffle setting

shuffleon
shuffleoff
shuffletoggle

Queueing songs

For any of the above filters, choosing a result with the cmd key held down will queue the result (as opposed to playing it immediately). This allows you to queue up multiple songs before playing them.

To play the songs you've queued, use the playqueue keyword. To clear the queue of all songs, use the clearqueue keyword.

Note: At this time, Play Song does not support queueing for Apple Music playlists.

Searching songs on Google

For any of the above filters, choosing a result with the ctrl key held down will search the result on Google.

Clearing the cache

Play Song stores a local cache containing album artwork (from displayed results), as well as the compiled workflow configuration. If you experience any issues with Play Song, you can clear this cache via the clearcache keyword.

A note about play order

Play Song always respects the current shuffle mode within Music.app. For example, if shuffle is enabled, playing an album via Play Song will play the songs of the album in shuffled order. Therefore, if you desire Play Song to respect album order, run the shuffleoff command within Alfred.

Additionally, Play Song will honor the column you are sorting by in Music.app to sort queued songs. This applies to keyword filters like playartist, playalbum, and playgenre. For example, if you are sorting by "Album by Artist" in your library, then Play Song will group artists together and group albums together when using playgenre. However, if you are sorting by "Title" in your library, then Play Song will disregard album groupings and simply play songs in alphabetical order.

The playplaylist filter is the only Play Song filter where play order is guaranteed.

Playing a song directly (the Play Song v1 behavior)

If you are a longtime Play Song user who prefers the v1 behavior for playing songs (where music continues playing after the song finishes), you can do so via the shift modifier. Note that this only works for the playsong filter.

Support

If you have a bug to report or a feature to request, please submit an issue on GitHub. You can also contact me directly via email.

Latest release

  • 9.6.11 year ago, 440 KBDownload
    • Updated workflow icon for macOS 26 (#80—thanks @MrMegira!)
19 earlier releases
  • 9.6.01 year ago, 48 KBDownload
    • Added a new "Result Limit" configuration option to control the maximum number of songs, artists, etc. to show for all workflow filters (#79—thanks @April-June-August!)
  • 9.5.01 year ago, 48 KBDownload

    What's Changed

    Full Changelog: https://github.com/caleb531/play-song/compare/v9.4.0...v9.5.0

  • 9.4.01 year ago, 47 KBDownload

    New Features

    • The playartist, playsongby, and playalbumby commands now search the composer and album artist fields in addition to artist (#72 and #74)
      • A big thanks to @April-June-August, a first-time contributor to this project!

    Other Improvements

    • Improved the robustness of internal calls to avoid permission-related errors when invoking the workflow
      • These permission-related issues were particularly relevant to users who sync their Alfred preferences across multiple machines
      • Switched to uv for better dependency management
  • 9.3.01 year ago, 47 KBDownload
    • You can now ctrl-enter on the "No Results Found" message to search for the typed query using your preferred search engine
  • 9.2.02 years ago, 47 KBDownload

    Fixes

    Improved "Search on Web" experience

    The "Search on Google" action has been renamed to "Search on Web" for better clarity, particular if you change the preferred search engine in the workflow object. The function also works more consistently across the different workflow keywords, even playplaylist. The action is still triggered via the Control modifier.

    Housekeeping

    Cleaned up workflow objects

    The entire workflow has been rewired to utilize Alfred's External Triggers feature, which eliminates the tangled mess of connections between the various workflow objects. This means Play Song v9.2 is significantly more maintainable and easier to tweak (if you are the adventurous type)!

  • 9.1.02 years ago, 47 KBDownload
    • Improved the performance of the various search commands (play*) such that a search for the latest-typed query no longer needs to wait for previous searches (for intermediate queries) to finish loading
    • Updated the workflow icons to match the latest Apple Music app icons
  • 9.0.13 years ago, 54 KBDownload
    • Fixed a bug where the "Search on Google" feature (via <kbd>ctrl+enter</kbd>) would not work correctly
  • 9.0.04 years ago, 54 KBDownload
    • Added Alfred 5 support
  • 8.0.05 years ago, 55 KBDownload
    • Filters like playartist and playgenre now honor the column you are sorting by in Music.app (e.g. "Title" or "Album by Artist")
    • The playgenre is now significantly faster when computing the songs to queue
    • Added support for cmd-c and cmd-l (Large Type) actions on results
  • 7.1.06 years ago, 55 KBDownload
    • Add new Alfred keywords to control the Music app's global shuffle setting: shuffleon, shuffleoff, and shuffletoggle
  • 7.0.26 years ago, 53 KBDownload
    • Fix bug where some non-Apple Music songs were missing artwork

      • The original algorithm assumed that the file extension of every artwork image was always jpeg. However, some songs (which I did not download from Apple Music, coincidentally) happened to have png artwork, and so the algorithm would fail to return the correct artwork path for those songs.
  • 7.0.17 years ago, 53 KBDownload
    • Fixes a bug where most Apple Music songs were missing album artwork on Music.app (macOS Catalina)
  • 7.0.07 years ago, 54 KBDownload
    • Official release of Play Song support for macOS Catalina
      • You may notice that the album artwork is currently missing from some Play Song results; this is due to a bug in the new Music app, and there is currently no easy workaround.
  • 7.0.0-beta.17 years ago, 53 KBDownload
    • Added initial support for macOS Catalina (10.15)
  • 6.0.07 years ago, 52 KBDownload
    • Officially added support for Alfred 4
  • 5.0.27 years ago, 52 KBDownload
    • Fixed a "Can't make file config.scpt into type file" error
  • 5.0.17 years agoDownload
    • Tweak run behavior to improve performance when typing quickly
  • 5.0.08 years ago, 52 KBDownload

    Play Song v5 is a major release with new features, bug fixes, and performance improvements.

    • New Features
      • Added a new playsongby filter to show songs by artists matching the typed query
    • Bug Fixes
      • Fixed a bug where Apple Music playlists could not be played
      • Fixed a bug where Play Song would error out for users with non-English system languages
    • Other Changes
      • All song results are now sorted according to the current sort column in iTunes's Songs view, rather than always by album order
        • This means that if the Songs view is currently sorted by Name, then playalbum will play the songs on that album in alphabetical order
        • If you wish to respect album order, you need to sort by Artist or Album within the Songs view
        • This was done to improve performance for large albums
      • Decrease maximum number of results from 25 to 15
      • Upgrade Alfred Workflow Packager to v1.2.0
  • 4.3.09 years agoDownload
    • Apple Music playlists are now included in the playplaylist results
    • Added the ability to play songs directly via the shift modifier (the behavior in Play Song v1)
    • Play Song no longer focuses the song queue when playing music so you don't lose your place in iTunes (in case you were browsing the iTunes Store or configuring your iPhone or whatnot)