
Control the YouTube Music tab in the browser with your keyboard.
The Play Music command searches YouTube Music songs, albums, artists, and playlists, or YouTube videos, and starts the chosen item in the selected browser. The source dropdown, the Search in… action (⌘K), and the Play Music Source preference choose which catalogue it reads; albums, artists, and playlists open as grid tiles, and album and playlist tiles start the whole queue rather than a single track, with ⌘↵ opening the track list instead. With the search bar empty it shows your library instead — Albums, Artists, Playlists, Liked songs, and Recently played, each opening into its own list — read from the signed-in music tab, so that tab needs to be signed in to YouTube Music. Now Playing shows the current track, the recently played tracks and the queue, with transport and rating actions. How many recently played tracks to list is set in the extension preferences. Both follow the playback setup below; no additional permissions are required.
Play Music accepts a launch context that makes Add to Queue the primary action, so a hotkey or deeplink can queue a track without opening the action panel:
raycast://extensions/danieldbird/youtube-music/play-song?launchContext=%7B%22mode%22%3A%22add%22%7D
The same context takes a source, which saves opening the dropdown when you only ever search one catalogue. Assign a hotkey to a Quicklink pointing at one of these and each scope gets its own keystroke:
raycast://extensions/danieldbird/youtube-music/play-song?launchContext=%7B%22source%22%3A%22albums%22%7D
source accepts both, ytmusic, albums, artists, playlists, or youtube.
Except for Ardia, the extension controls your browser via AppleScript by running JavaScript in the YouTube Music tab. You must enable Allow JavaScript from Apple Events in the browser you select in the extension preferences; otherwise commands will fail (often with "Unknown Error").
Install Ardia → Settings → Plugins → Command Line, select Ardia in the extension preferences, and open https://music.youtube.com/. Commands use ~/.local/bin/ardia to control an existing tab; Allow JavaScript from Apple Events is not needed. Player shortcuts respect the URL Preference; Now Playing and library/queue actions require a YouTube Music tab. The CLI grants local programs browser-wide control; it is not limited to YouTube Music.


After enabling this setting, pick the same browser (or WebCatalog app) in the extension’s Browser where YouTube Music opened preference.
Credit to @alexstrnik for the Yandex Music extension which this extension was based on.
Search YouTube Music and YouTube for songs, albums, artists, playlists, and videos, and play them in the selected browser.
Show the current track, recent history and what is up next.
Toggles play or pause of the current track in YouTube Music.
Skips to the previous track in YouTube Music.
Skips to the next track in YouTube Music.
Adds current track to "Liked" collection in YouTube Music.
Removes the current track from your liked songs in YouTube Music.
Removes current track from "Liked" collection in YouTube Music.
Fast forwards the current track in YouTube Music.
Rewinds the current track in YouTube Music.
Skips to the next chapter in YouTube Music.
Skips to the previous chapter in YouTube Music.
Play Music command — search YouTube Music from Raycast and start the chosen track in the selected browser.Play Next and Add to Queue actions, using the app's own search page and row menu. The tab returns to where it was afterwards and playback is not interrupted.Play Music for songs, albums, artists, playlists, YouTube videos, or songs and videos together. Video results open the watch page; album and playlist results start the queue through the app's own play endpoint.Play Music — Albums, Artists, Playlists, Liked songs, and Recently played, each opening into its own list. It is read from the signed-in music tab; if that tab is missing or signed out, the panel says which and offers to reload.Search in… action that changes the search scope from the action panel, including mid-search, and a source launch context so a Quicklink or hotkey can open the command already scoped.Browse Tracks on album and playlist rows, opening the collection's track list with filtering instead of only playing it from the start.mode: "add" launch context for Play Music that leads with Add to Queue, and an Add to Queue… action in Now Playing that uses it.Retry Search action when a search fails or returns nothing.Now Playing command — artwork, progress, the last five tracks and the rest of the queue, with transport, rating and remove-from-queue actions.Now Playing lists.yt-navigate event, so app windows do not show a "Leave app?" prompt before loading a track.@raycast/api 2.8.2.runJSInYouTubeMusicTab now wraps runAppleScript in a try/catch block — previously, any AppleScript error (permissions, browser not running, invalid browser selection) was thrown unhandled and swallowed by empty catch blocks in commands, resulting in silent failures or "Unknown Error" HUD messages.handleAppleScriptError function that detects specific failure modes:@raycast/api dependency from ^1.35.1 to ^1.104.0 for compatibility with current Raycast versions."like-clicked", "dislike-not-found") instead of boolean values.switch statements across all commands, providing specific HUD feedback for every outcome.goToChapter) out of utils.ts into individual command files (next-chapter.tsx, previous-chapter.tsx) with more granular error states.runJSInYouTubeMusicTab now throws on errors and shows actionable toasts (with links) instead of silently returning undefined.ErrorMessages, OsaError) from utils.ts.Add fast-forward, rewind, next-chapter, previous-chapter, youtube.com support.
Add search command