Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mayur1377/MUDE-music-in-vscode/llms.txt

Use this file to discover all available pages before exploring further.

MUDE integrates with YouTube Music to provide seamless music search and playback capabilities directly within your VS Code editor.

How search works

The music search functionality uses the YouTube Music API to search for songs and videos. When you search for music, MUDE:
  1. Searches both songs and videos on YouTube Music
  2. Displays results with track name, artist, and duration
  3. Downloads the selected track using yt-dlp
  4. Automatically fetches recommendations for continuous playback

Search interface

When you trigger a search, you’ll see three options:

YouTube Music integration

MUDE uses the ytmusic-api package to interact with YouTube Music:
import YTMusic from 'ytmusic-api';
const ytmusic = new YTMusic();

// Initialize and search
await ytmusic.initialize();
const songs = await ytmusic.searchSongs(query);
const videos = await ytmusic.searchVideos(query);
The YouTube Music API is initialized automatically when you perform a search. No authentication is required.

Download process

When you select a track, MUDE downloads it using yt-dlp:
  1. Download location: Tracks are downloaded to your extension’s global storage directory
  2. Format: Downloads in bestaudio/best format for optimal quality
  3. Retry mechanism: Up to 3 download attempts with exponential backoff
  4. Cleanup: Previous downloads are automatically removed to save space
// Download configuration
await ytDl(url, {
  output: downloadPath,
  format: 'bestaudio/best'
});
Downloaded tracks are stored temporarily and are replaced when you play a new track.

Platform compatibility

MUDE handles platform-specific differences automatically:

Windows

  • Automatically resolves yt-dlp binary path issues
  • Creates .exe copy if needed for proper execution
  • Provides helpful error messages for binary issues

Unix/Linux/macOS

  • Uses standard yt-dlp binary from package
  • No additional configuration needed
If you encounter download issues on Windows, ensure the youtube-dl-exec package is properly installed in your extension’s node_modules directory.

Commands

The following commands are available for music search:
CommandDescriptionKeybinding
MudePlayer.searchMusicOpen the music search interfaceNone (default)
You can assign custom keybindings to the search command through VS Code’s keyboard shortcuts settings.

Search flow

Here’s what happens when you search for music:
  1. Click the search button (🎧 icon) in the status bar
  2. Choose “New Search” or “Recent Plays”
  3. Enter your search query
  4. Select a track from the results
  5. MUDE downloads the track and fetches recommendations
  6. Playback begins automatically
Recommendations are fetched immediately after you select a track, ensuring seamless continuous playback.

Build docs developers (and LLMs) love