Inspiration
One day, I realized I had been feeling unproductive for several days. After a quick self-reflection, I discovered that watching TV series and movies in the background while coding was draining my focus and creativity. This insight inspired me to build a tool for myselfβand for thousands of other developers who face similar distractionsβto help us stay in the zone with relaxing ambient music.
Ambient music starts automatically with your project and seamlessly transitions to a new track every 30 minutes (by default) to keep you in the zone.
- β Automatically plays ambient music when a workspace is opened
 - β Rotates to a new track every 30 minutes (configurable)
 - β Prevents multiple instances with singleton design
 - β Supports reconnecting WebSocket clients
 - β Manual play/pause/resume via Command Palette
 - β Easily set your own playlist via command
 - β
 Manually close the tab via 
Ambient Music: β Close Tabcommand - β No configuration required for default usage
 
- Install the extension from Marketplace
 - Open any folder/project in VS Code
 - A browser tab will auto-launch playing ambient music
 - You'll receive a confirmation notification
 
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and search for:
| Command ID | Title | Description | 
|---|---|---|
ambientMusic.setPlaylist | 
πΆ Set Playlist (Rain, Forest, Ocean...) | Choose or define a relaxing playlist | 
ambientMusic.openTab | 
π Open Ambient Music Player | Opens the embedded music player tab | 
ambientMusic.play | 
Starts playing ambient music | |
ambientMusic.pause | 
βΈοΈ Pause Music | Pauses the currently playing track | 
ambientMusic.resume | 
β― Resume Music | Resumes paused ambient music | 
ambientMusic.closeTab | 
β Close Music Player | Closes the music player tab | 
ambientMusic.resetPlaylist | 
π Reset Playlist to Default | Restores the default ambient playlist | 
π‘ Tip: You can customize keybindings for these commands or use them in your automation workflows inside VS Code.
These settings can be customized in your VS Code settings.json.
| Setting Key | Type | Default | Description | 
|---|---|---|---|
ambientMusic.autoPlayOnStartup | 
boolean | 
true | 
Automatically start ambient music when VS Code launches. | 
ambientMusic.port | 
number | 
3303 | 
Port for the WebSocket server. Set to 0 for dynamic port allocation. | 
ambientMusic.switchIntervalMinutes | 
number | 
30 | 
Time interval (in minutes) to automatically switch to the next video in the playlist. | 
ambientMusic.debug | 
boolean | 
false | 
Enables verbose debug logging for easier troubleshooting. | 
ambientMusic.playlist | 
array | 
[] | 
Custom list of ambient YouTube videos with rich metadata. See example below. | 
{
  "title": "Peaceful Piano",
  "url": "https://youtu.be/abc123",
  "tags": ["piano", "relax"],
  "channel": {
    "name": "Chill Music Co.",
    "url": "https://youtube.com/@chillmusicco"
  }
}
βΉοΈ Use these to personalize your flow.
Install from Visual Studio Code Marketplace.
π‘ Want to close the music tab without shutting down the extension? Use the
Ambient Music: β Close Tabcommand.
- VS Code version 1.80+
 - Internet access for streaming
 
Have feedback or issues?
- π GitHub Repository
 - π§ Email: [email protected]
 
MIT License Β© 2025 Taj
Built with β€οΈ by Taj, inspired by a need for focus and flow while coding.
Special thanks to these amazing YouTube creators whose music powers the ambient experience:
- π§ Dreamy Lofi
 - π§ Chillhop Music
 - π§ la vinyls
 - π§ SereneBeats
 - π§ STEEZYASFUCK
 - π§ EasyLofiGrooves
 - π§ Abao in Tokyo
 - π§ The AMP Channel
 - π§ Lofi Girl
 - π§ Chill Dev_ | Chill Music for Work & Study
 - π§ TheSilentWatcher
 - π§ Kai's Dojo
 - π§ Cafe Music BGM channel
 - π§ Chill Music Lab
 
If you're one of these creators and would like your content removed or credited differently, please open an issue or reach out.
If you're interested in contributing or modifying this extension, check out the DEVELOPER GUIDE for setup instructions, architecture overview, packaging guide, and testing tips.
β¨ Focus better. Code deeper. Let your workspace sing.