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

Bookmark NPM Scripts

reza kalbali

| (0) | Free
Bookmark and quickly run your favorite npm scripts from the toolbar
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bookmark NPM Scripts Extension

A VSCode and Cursor extension that allows you to bookmark your favorite npm scripts and run them quickly.

Features

  • ✅ Bookmark npm scripts from your project
  • ✅ Customize names for bookmarked scripts
  • ✅ Icon in Status Bar (bottom right) for quick access
  • ✅ Dropdown menu to view and run bookmarked scripts
  • ✅ Store bookmark settings per workspace
  • ✅ Edit bookmark names individually

Usage

1. Installation and Setup

# Install dependencies
npm install

# Compile the project
npm run compile

To test the extension:

  1. Open the project folder in VSCode/Cursor
  2. Press F5 to open a new Extension Host window
  3. In the new window, open a project with package.json

2. Bookmarking Scripts

Method 1: From Status Bar

  • Click on the $(play) icon in the Status Bar (bottom right)
  • If no bookmarks exist, select "Manage Bookmarks"

Method 2: From Command Palette

  • Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  • Type and select Bookmark NPM Scripts: Manage Bookmarks
  • Select the scripts you want to bookmark (you can select multiple)
  • Optionally, set custom names for them

3. Running Scripts

  1. Click on the $(play) icon in the Status Bar
  2. Select the desired script from the dropdown list
  3. The script will run in a new terminal named npm run [script-name]

Note: In the dropdown list, you can see the "Manage Bookmarks..." option to manage your bookmarks.

4. Editing Bookmark Names

  • From Command Palette: Bookmark NPM Scripts: Edit Bookmark Name
  • Or select "Manage Bookmarks..." from the dropdown list

5. Setting Up Keyboard Shortcuts

You can set up a keyboard shortcut to quickly open the bookmarked scripts list:

Method 1: Using Keyboard Shortcuts UI

  1. Press Ctrl+K Ctrl+S (or Cmd+K Cmd+S on Mac) to open Keyboard Shortcuts
  2. Search for Bookmark NPM Scripts: Run Bookmarked Script
  3. Click the + icon next to the command
  4. Press your desired key combination (e.g., Ctrl+Shift+R or Cmd+Shift+R)
  5. Press Enter to confirm

Method 2: Using keybindings.json

  1. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  2. Type Preferences: Open Keyboard Shortcuts (JSON)
  3. Add the following entry:
{
  "key": "ctrl+shift+r",
  "command": "bookmarkNpmScripts.openBookmarks",
  "when": "editorTextFocus || terminalFocus"
}

Available Commands:

  • bookmarkNpmScripts.openBookmarks - Open bookmarked scripts list
  • bookmarkNpmScripts.manageBookmarks - Manage bookmarks
  • bookmarkNpmScripts.editBookmarkName - Edit bookmark names

Building the Extension

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Build .vsix file for distribution
npm install -g vsce
vsce package

Development

# Watch mode for development
npm run watch

Project Structure

.
├── src/
│   └── extension.ts      # Main extension code
├── package.json           # Extension manifest
├── tsconfig.json         # TypeScript configuration
└── README.md             # This file

Requirements

  • Node.js
  • npm
  • VSCode or Cursor (version 1.74.0 or higher)

License

MIT

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