🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP β†’
Sign In

check-vscode-extensions

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-vscode-extensions

πŸ” Intelligently detect VSCode/Cursor/WindSurf extension status, support multi-editor environments, provide one-click installation commands. Supports English and Chinese.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

check-vscode-extensions

πŸ” Intelligently detect VSCode/Cursor/WindSurf extension status, support multi-editor environments, provide one-click installation commands

npm version Node.js License Downloads

Have you ever encountered these situations in team development:

  • New team member submits messy code in PR, CI fails
  • ESLint errors locally but they have no idea
  • You remind them to install extensions, they say "I didn't see the recommendation"

πŸ‘† If you nodded, this tool is built for you.

✨ Core Features

  • πŸ” Smart Editor Detection - Automatically identify VSCode, Cursor, WindSurf
  • πŸ“Š Multi-Editor Support - Detect all running editors simultaneously
  • πŸ› οΈ Path Conflict Resolution - Intelligently handle code command conflicts
  • 🎨 User-Friendly Interface - Colorful output with clear status indicators
  • ⚑ Precise Installation Guide - Provide directly executable installation commands
  • πŸ“¦ Zero Configuration - Works out of the box, no complex setup required
  • 🌍 Internationalization - Support for English and Chinese

πŸš€ Quick Start

npx check-vscode-extensions

Method 2: Global Installation

npm install -g check-vscode-extensions
check-vscode-extensions

Method 3: Project Integration

npm install --save-dev check-vscode-extensions

Add scripts to your package.json:

{
  "scripts": {
    "check:env": "check-vscode-extensions",
    "postinstall": "check-vscode-extensions"
  }
}

πŸ“Š Usage Examples

βœ… All Extensions Installed

$ npx check-vscode-extensions
βœ… All required extensions are installed in Cursor
ℹ️ πŸ” Detected Cursor is running, checked its extension status.

⚠️ Missing Extensions

$ npx check-vscode-extensions
ℹ️ Current editor: VSCode
ℹ️ Missing extensions: dbaeumer.vscode-eslint, esbenp.prettier-vscode

πŸ’‘ Installation commands (copy and run):
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode

Or install all at once:
code --install-extension dbaeumer.vscode-eslint && code --install-extension esbenp.prettier-vscode

πŸ”„ Multi-Editor Detection

$ npx check-vscode-extensions
ℹ️ Detected multiple editors running: Cursor, VSCode
βœ… All required extensions are installed in Cursor
ℹ️ ⚠️ VSCode missing extensions: esbenp.prettier-vscode

Installation commands:

VSCode:
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --install-extension esbenp.prettier-vscode

πŸ“‹ Default Detected Extensions

Extension IDExtension NameDescription
dbaeumer.vscode-eslintESLintJavaScript/TypeScript code linting
esbenp.prettier-vscodePrettierCode formatting tool

🎯 Use Cases

Team Development

{
  "scripts": {
    "postinstall": "check-vscode-extensions"
  }
}

Automatically check after project clone, eliminate extension missing issues.

CI/CD Integration

# .github/workflows/check-env.yml
- name: Check VSCode Extensions
  run: npx check-vscode-extensions

Git Hooks

# .husky/pre-commit
npx check-vscode-extensions

πŸ”§ Customization

Currently, the tool detects a fixed list of extensions. For customization:

Option 1: Fork and Customize

  • Fork this project
  • Modify the requiredExtensions array in lib/index.js
  • Publish your own npm package

Option 2: Local Script

Download the source code to your project and modify directly:

# Download script
curl -o check-extensions.js https://raw.githubusercontent.com/leeguooooo/check-vscode-extensions/main/lib/index.js

# Modify requiredExtensions array
# Run
node check-extensions.js

Common Extension Examples

const requiredExtensions = [
  // Basic extensions
  'dbaeumer.vscode-eslint',
  'esbenp.prettier-vscode',

  // Frontend development
  'bradlc.vscode-tailwindcss',
  'ms-vscode.vscode-typescript-next',

  // Backend development
  'ms-python.python',
  'golang.go',

  // Utility extensions
  'eamodio.gitlens',
  'ms-vscode.vscode-json'
]

🧠 How It Works

Smart Detection Flow

graph TD
    A[Start Detection] --> B{Check Environment Variables}
    B -->|CURSOR_TRACE_ID| C[Cursor Environment]
    B -->|TERM_PROGRAM=vscode| D[VSCode Environment]
    B -->|No Special Variables| E[Detect Running Processes]

    E --> F{Scan Active Editors}
    F --> G[VSCode Process]
    F --> H[Cursor Process]
    F --> I[WindSurf Process]

    C --> J[Get Extension List]
    D --> J
    G --> J
    H --> J
    I --> J

    J --> K{Check Required Extensions}
    K -->|Missing| L[Generate Install Commands]
    K -->|Complete| M[Show Success Status]

Core Technical Features

  • πŸ” Multi-layer Detection: Environment Variables β†’ Process Scanning β†’ CLI Verification
  • πŸ› οΈ Path Conflict Resolution: Intelligently handle code command conflicts
  • πŸ“Š Concurrent Editor Support: Detect multiple running editors simultaneously
  • ⚑ Zero Dependencies: Uses only Node.js built-in modules

πŸ“Š Comparison with Other Solutions

FeatureVSCode Recommended Extensionscheck-vscode-extensions
Auto-detect extension statusβŒβœ…
Terminal missing extension alertsβŒβœ…
One-click install commandsβŒβœ…
Support Cursor/WindSurfβŒβœ…
Multi-editor detectionβŒβœ…
CI/CD integrationβŒβœ…
Zero configurationβŒβœ…

πŸ› οΈ Troubleshooting

Common Issues

❓ Editor Not Detected

Ensure your editor has CLI commands installed and enabled:

  • VSCode: Cmd+Shift+P β†’ "Shell Command: Install 'code' command in PATH"
  • Cursor: Usually installs cursor command automatically

❓ Wrong Editor Detected

Check which editor your system code command points to:

which code
# If it points to Cursor but you want VSCode, reinstall VSCode CLI

❓ Permission Errors

Ensure you have permission to execute editor CLI:

# Test if CLI is available
code --version
cursor --version

Supported Platforms

  • βœ… macOS: Full support
  • ⚠️ Windows: Partial support (path adaptation needed)
  • ⚠️ Linux: Partial support (path adaptation needed)

Currently optimized for macOS, Windows and Linux support is under development

🌍 Language Support

The tool supports multiple languages:

  • English (default)
  • δΈ­ζ–‡ (Chinese)

Set language via environment variable:

# English (default)
npx check-vscode-extensions

# Chinese
LANG=zh-CN npx check-vscode-extensions

πŸ”„ Changelog

v1.0.0 (2024-01-XX)

  • πŸŽ‰ Initial release
  • βœ… Support VSCode, Cursor, WindSurf detection
  • βœ… Multi-editor concurrent detection
  • βœ… Smart path conflict resolution
  • βœ… Zero dependencies design
  • 🌍 Internationalization support

🀝 Contributing

We welcome all forms of contributions!

πŸ› Report Issues

  • Use Issue Templates
  • Provide detailed environment information and error logs

πŸ’‘ Feature Suggestions

  • Discuss in Discussions
  • Describe use cases and expected outcomes

πŸ”§ Code Contributions

  • Fork the project
  • Create feature branch: git checkout -b feature/amazing-feature
  • Commit changes: git commit -m 'feat: add amazing feature'
  • Push branch: git push origin feature/amazing-feature
  • Submit Pull Request

πŸ“„ License

This project is licensed under the MIT License.

🌟 Star History

If this tool helps you, please give it a ⭐️!

Star History Chart

πŸš€ Automate extension checking, make team collaboration more efficient!

Made with ❀️ by leeguoo

πŸ“– Documentation

Keywords

vscode

FAQs

Package last updated on 03 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts