Back to Blog

FocusNoise for Developers: CLI, API & VS Code Extension

Control your soundscapes without leaving your terminal or editor. Learn how to integrate FocusNoise into your development workflow.

Posted by

Terminal with FocusNoise CLI commands

Built for Developers, By Developers

As developers, we hate context switching. Opening a browser to adjust your soundscape breaks your flow. That's why we built a complete suite of developer tools for FocusNoise.

Command Line Interface

Install the CLI globally:

npm install -g focusnoise-cli

Basic commands:

# Start your favorite mix
focusnoise start "Deep Focus"

# List saved mixes
focusnoise list

# Start a Pomodoro session
focusnoise pomodoro --work 50 --break 10

# Adjust volume
focusnoise volume 60

# Check session stats
focusnoise stats today

REST API

The FocusNoise API lets you build custom integrations. Get your API key from the dashboard settings.

# Start playback
curl -X POST https://api.focusnoise.top/v1/playback/start \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mix_id": "deep-focus"}'

# Get current session
curl https://api.focusnoise.top/v1/session/current \
  -H "Authorization: Bearer YOUR_API_KEY"

VS Code Extension

Search for "FocusNoise" in the VS Code extensions marketplace, or install directly:

code --install-extension focusnoise.focusnoise-vscode

Features:

  • Status bar controls (play, pause, volume)
  • Command palette integration (Cmd+Shift+P → FocusNoise)
  • Automatic Pomodoro tracking synced with your commits
  • Mix switcher in the sidebar

Desktop Mini-Player

The desktop app includes a mini-player that lives in your menubar (macOS) or system tray (Windows). Control everything with global hotkeys:

  • Cmd+Shift+P - Play/Pause
  • Cmd+Shift+N - Next mix
  • Cmd+Shift+Up/Down - Adjust volume

Advanced: Workflow Automation

Combine the API with your existing tools. Here's a GitHub Actions example that starts a focus session when you push code:

name: Start Focus Session
on: [push]
jobs:
  focus:
    runs-on: ubuntu-latest
    steps:
      - name: Notify FocusNoise
        run: |
          curl -X POST https://api.focusnoise.top/v1/playback/start \
            -H "Authorization: Bearer ${{ secrets.FOCUSNOISE_API_KEY }}" \
            -d '{"mix_id": "deep-focus", "duration": 3600}'

Get Started

All developer tools are included with Pro subscription. Check out the full API documentation at focusnoise.top/docs/api