# Music for Raycast

URL: https://www.raycast.com/fedevitaledev/music

> Control the Apple Music app with your keyboard.

- Install: raycast://extensions/fedevitaledev/music
- Author: [Federico Vitale](https://www.raycast.com/fedevitaledev)
- Installs: 105,077
- Platforms: macOS
- Categories: AI Extensions
- Updated: 2026-11-06
- Source: https://github.com/raycast/extensions/tree/b8164c767e403f8e82e5fec7db85cef7cb118892/extensions/music/

## Commands

- **Toggle Repeat**: Toggle Repeat
- **Toggle Play or Pause**: Toggle play or pause of current track in Music.
- **Next Track**: Skip to the next track in Music.
- **Previous Track**: Skip to the previous track in Music.
- **Add to Library**: Add currently playing track to your library.

## AI tools

- **Get Volume**: Get the current volume of Apple Music.
- **Set Volume**: Set the volume of Apple Music.
- **Add to Library**: Add the currently playing track to your library.
- **Add to Playlist**: Add the currently playing track to a playlist.
- **Get Playlists**: Retrieve your available playlists grouped by type.
- **Get Currently Playing**: Get details of the currently playing track in Apple Music.
- **Get Favorite Status**: Get the favorite status of currently playing track in Apple Music.
- **Toggle Favorite**: Toggle favorite status of currently playing track in Apple Music.
- **Next Track**: Skips to the next track in Apple Music.
- **Previous Track**: Rewinds to the previous track in Apple Music.
- **Get Dislike Status**: Get the dislike status of currently playing track in Apple Music.
- **Toggle Dislike**: Toggle dislike status of currently playing track in Apple Music.
- **Pause Playback**: Pauses the playback in Apple Music.
- **Play**: Plays the currently playing track in Apple Music.
- **Play Library Album**: Play a library album by name. Supports shuffle mode.
- **Play Library Track**: Play a specific track from your library by track ID.
- **Get Library Albums**: Retrieve albums from your music library, with optional search.
- **Get Library Tracks**: Retrieve tracks from your music library, with optional search.
- **Start Playlist**: Start a playlist by name. Supports shuffle mode.
- **Toggle Shuffle**: Toggle shuffle mode in Apple Music.
- **Get Current Shuffle**: Get the current shuffle mode in Apple Music.

## README

<p align="center" style="display:flex">
	<img width="50" src="https://github.com/raycast/extensions/raw/b8164c767e403f8e82e5fec7db85cef7cb118892/extensions/music//assets/icon.png"/>
</p>

### Music

> Apple music extension

![sc1](https://github.com/raycast/extensions/raw/b8164c767e403f8e82e5fec7db85cef7cb118892/extensions/music//assets/screnshot-1.png)
![sc2](https://github.com/raycast/extensions/raw/b8164c767e403f8e82e5fec7db85cef7cb118892/extensions/music//assets/screnshot-2.png)

#### Troubleshooting

- Enable **Start Playlist** in Raycast Settings → Extensions → Music. It is disabled by default.
- **Add to Playlist** favorites the current track when you choose Music's smart Favorite Songs or Favourite Songs playlist. **Favorite Track** does the same directly.
- Music may not expose a station's current track to AppleScript. If Add to Playlist cannot access it, add the song in Music first.
- If **Add to Library** creates an entry with an incorrect date or does not sync it to your cloud library, use **Search Apple Music** and its **Add to Library** action. That command uses the Apple Music API and requires sign-in. The current-track shortcut still uses Music's AppleScript duplication command.
- If Music stops responding after sleep, reopen Music and retry. Script timeouts prevent indefinite waits but cannot repair Music's internal state.

#### Development

Run `npm test`, `npx tsc --noEmit`, `npm run build`, and `npm run lint`.
The regression suite covers subprocess handling, search ranking, metadata parsing, and generated scripts. Playback, cloud sync, and station behavior also need testing in Raycast with Music on macOS.
