This guide will help you set up your local development environment for MUDE Music Player.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.
Prerequisites
Before you begin, ensure you have the following installed:- Node.js (version 20.x or higher)
- npm (comes with Node.js)
- MPV media player - Must be installed and available in your system PATH
- Visual Studio Code (for testing the extension)
Installing MPV
MPV is required for audio playback:- macOS
- Ubuntu/Debian
- Windows
Setting up the development environment
Install dependencies
Install all required npm packages:This will install:
node-mpv- MPV player wrapperytmusic-api- YouTube Music API clientyoutube-dl-exec- yt-dlp downloader- TypeScript and build tools
Build the extension
Compile the TypeScript source code:This uses
esbuild to bundle the extension into out/extension.js.Available scripts
Thepackage.json defines several useful scripts:
Development scripts
Build configuration
The build process usesesbuild with these settings:
- Platform: Node.js
- Target: Node 18
- Format: CommonJS
- Externals:
vscode,youtube-dl-exec,node-mpv - Output:
out/extension.js
Package the extension
To create a.vsix package for distribution:
MUDE-{version}.vsix file that can be installed in VS Code.
Development workflow
Making changes
Reload the extension
In the Extension Development Host window:
- Press
Ctrl+R(orCmd+Ron macOS) to reload - Or use the “Developer: Reload Window” command
Debugging
The extension includes extensive console logging:- Developer Tools:
Help > Toggle Developer Tools > Console - Output Panel:
View > Output > Select "Extension Host"
Project structure
Common issues
MPV not found
If you see “Failed to find MPV on your system!”:- Verify MPV is installed:
mpv --version - Ensure MPV is in your system PATH
- Restart VS Code after installing MPV
yt-dlp download errors
If downloads fail:- Check your internet connection
- Verify
youtube-dl-execis installed:npm ls youtube-dl-exec - On Windows, ensure the binary has
.exeextension
Extension not activating
If the extension doesn’t load:- Check the Output panel for errors
- Verify
out/extension.jswas created - Try rebuilding:
npm run compile
Testing changes
Manual testing checklist
- Extension activates without errors
- Search functionality works
- Track downloads and plays
- Playback controls (play/pause, seek, next/previous) work
- Status bar updates correctly
- Recommendations are fetched
- Auto-play next track works
- State persists across window reloads
Testing in multiple scenarios
- Test with no internet connection (should show appropriate errors)
- Test with no MPV installed (should show error message)
- Test with multiple VS Code windows open
- Test state restoration after closing and reopening VS Code
Publishing
Prepare for release
Next steps
- Read the architecture documentation to understand the codebase
- Check the contributing guide for contribution guidelines
- Join the development by fixing issues or adding features