Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Package Manager DetectorNew to Visual Studio Code? Get it now.
Package Manager Detector

Package Manager Detector

Nitay Neeman

| (0) | Free
🔎 A Visual Studio Code extension which detects and displays which package manager (npm, yarn, pnpm or bun) is used in your project
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code - Package Manager Detector

Marketplace Installs License

Installation ¡ Usage ¡ Settings ¡ CHANGELOG

â„šī¸ī¸ Description

This Visual Studio Code extension automatically detects and displays which package manager (npm, yarn, pnpm, or bun) is used in your project. It shows the detected package manager in the status bar with color-coded indicators and provides quick access to package.json.

Preview

The extension intelligently detects package managers by analyzing:

  • Lock files (package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb)
  • The packageManager field in package.json
  • Priority-based detection when multiple lock files exist

👨🏻‍🏫 How to Use

The first thing you need to do is installing the extension.

The extension automatically detects your package manager when you open a workspace and displays it in the status bar with color-coded text (all lowercase):

  • npm - Red (#CB3837)
  • yarn - Blue (#2C8EBB)
  • pnpm - Orange (#F9AD00)
  • bun - Beige (#FBF0DF)

Hover over the status bar item to see:

  • Package manager name and version (from packageManager field)
  • Total dependency count
  • Available npm scripts with their commands
  • Click to open package.json

Detection Priority

The extension follows this detection priority:

  1. Lock Files (highest priority)

    • bun.lockb → bun
    • pnpm-lock.yaml → pnpm
    • yarn.lock → yarn
    • package-lock.json → npm
  2. packageManager Field (fallback)

    • Parses the packageManager field in package.json
    • Examples: "packageManager": "pnpm@8.6.0" → pnpm

âš™ī¸ Settings

The extension allows you to customize the following configuration settings:

Name Description Default
packageManagerDetector.npm Color for npm in the status bar #CB3837
packageManagerDetector.yarn Color for yarn in the status bar #2C8EBB
packageManagerDetector.pnpm Color for pnpm in the status bar #F9AD00
packageManagerDetector.bun Color for bun in the status bar #FBF0DF

Customize Colors

You can customize the colors in your VS Code settings:

{
  "workbench.colorCustomizations": {
    "packageManagerDetector.npm": "#CC0000",
    "packageManagerDetector.yarn": "#0066CC",
    "packageManagerDetector.pnpm": "#FF9900",
    "packageManagerDetector.bun": "#FFF5E1"
  }
}

💁🏻 Contributing

This is an open source project. Any contribution would be greatly appreciated!

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