Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto Toggle NPM ScriptsNew to Visual Studio Code? Get it now.
Auto Toggle NPM Scripts

Auto Toggle NPM Scripts

Dimas1995

|
24 installs
| (0) | Free
Keep open npm scripts in sidebar only for the active project
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Auto Toggle NPM Scripts

VS Code Version

Automatically focuses and expands the relevant NPM scripts in the sidebar when working with monorepos or multiple package.json files.

Features

  • 🔄 Automatic Focus: Expands the NPM scripts tree view for the currently active package.json
  • 🖥️ Workspace Aware: Works seamlessly across multiple workspace folders
  • ⚡ Efficient: Debounced updates and smooth UI interactions

Installation

  1. Open VS Code
  2. Go to Extensions view (Ctrl+Shift+X)
  3. Search for "Auto Toggle NPM Scripts"
  4. Click Install

Usage

Just work with your package.json files as normal! The extension will automatically:

  • Expand the corresponding NPM scripts when switching between package.json files
  • Collapse unrelated scripts
  • Keep the NPM scripts view focused on your current context

Requirements

  • VS Code 1.97 or newer
  • NPM Scripts view should be visible (enable via Command Palette: > NPM: Show Scripts)

📝 Note: Works best with projects containing multiple package.json files (monorepos, etc.)

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft