Developers type the same thing all day:

cd ~/Projects/whatever
npm run dev

It’s muscle memory. It’s also the main drag on your workflow — especially when you switch between three or four projects in a single afternoon. Every cd and every remembered command is context you could have spent on actual work.

The good news: on macOS you don’t have to open a terminal every time. There are several genuinely useful ways to run npm scripts with one click. Here’s what actually works, from lightweight to fully integrated.


Why running scripts matters more than you think

Each manual run is cheap. But it adds up:

  • You spend seconds cd-ing and recalling the command.
  • You have to keep a terminal tab alive for each project.
  • Switching to another project means leaving a half-dead terminal window behind.

Automating the “run” step removes a disproportionate amount of daily friction — and it’s the single most underrated part of a developer’s setup.


Way 1: macOS Automator / Shortcuts — zero install

macOS ships with Automator and Shortcuts, which can both wrap a shell command into a clickable “app.”

  1. Create an Application workflow.
  2. Add a Run Shell Script step: cd ~/Projects/my-app && npm run dev.
  3. Save it as an app in your Applications folder.

Now double-clicking that app runs your dev server. No terminal typing. It works, but every project needs its own app, and it doesn’t remember which editor to open or give you a nice overview of all your projects.


Way 2: Aliases and functions in your shell — no new software

If you live in a terminal anyway, a shell function cuts the cd part:

# ~/.zshrc
runproj() {
  cd "$HOME/Projects/$1" && npm run dev
}

Then runproj my-app from anywhere. Lightweight and scriptable — but you still need a terminal open, and typing it is still a step.


Way 3: Menu-bar script runners — scripts at a glance

For people who want scripts accessible without a terminal, menu-bar tools are the sweet spot. Dedicated “script runner” menu-bar apps show your scripts, and you click one to run it.

The trade-off: you still have to set up each script manually, and most don’t know anything about your projects — they just run a command you typed in.


Way 4: A project launcher that runs scripts in context (what I use)

The most practical option I’ve found for developers is a project launcher that knows both your projects and your scripts — so “run” happens automatically based on which project you open.

This is what Dev WorkDir does. It’s a macOS menu-bar + desktop app for developers:

  • It scans your project folders and auto-detects the framework.
  • Double-click a project card and it opens your editor and runs the detected script (npm run dev, python main.py, cargo run…) for you.
  • Third-party terminal support (iTerm2, Warp, Ghostty, Kitty, Alacritty, WezTerm) comes with WorkDir Pro.
  • Every project’s run command is configurable once, then it just works.
Double-click project card
  → editor opens
  → `npm run dev` starts in your favorite terminal

Because it remembers the per-project command, you stop thinking about “how do I run this again?” and start just… doing it.


Which one should you pick?

Option Install Best for
Automator / Shortcuts macOS built-in A couple of fixed scripts
Shell function None Terminal-first devs
Menu-bar script runner App Many short scripts
Project launcher (Dev WorkDir) macOS app Switching projects all day ~ recommended

My honest advice: don’t buy a tool to “manage scripts.” Buy something that connects scripts to projects, because that’s the real job. A launcher that runs the right thing in the right project eliminates the whole category of “wait, how do I start this one again?”

For the organizational half of the equation — keeping those projects tidy so your launcher is useful — see our guide on how to organize side projects.


The takeaway

npm run dev is the most-typed command most frontend developers have. On macOS you have real options to stop typing it:

  1. Cheap: Automator or a shell function.
  2. Clean: a menu-bar script runner.
  3. Best for people switching projects: a project launcher that runs scripts in context.

Stop spending your willpower on remembering commands. Make running your projects one click, and keep your best energy for the code.

Dev WorkDir — dev projects quick launcher for macOS. Free, with optional Pro for your favorite terminal and analytics.