Skip to main content
Version: 4.0.0-preview

Scripts

Run any script from package.json either by name or through an interactive multi-select.

expressots scripts [scripts...]

Interactive

Run without arguments to see every package.json script as a checkbox list:

expressots scripts
? Select scripts to run › (use arrow keys, space to select, enter to confirm)
◯ dev
◯ build
◯ prod
◯ test
◯ test:watch
◯ coverage
◯ format
◯ lint

By name

Pass one or more script names to run them in sequence:

expressots scripts lint test build

Unknown names are reported and skipped, and the rest still run.

Package manager detection

The CLI runs <pm> run <script> for each entry, where <pm> is detected from the project's lockfile:

Lockfile presentRunner used
package-lock.jsonnpm run
yarn.lockyarn
pnpm-lock.yamlpnpm run
Lockfile required

expressots scripts requires a lockfile to choose a runner. If none is present, install dependencies first (npm install, yarn, or pnpm install), which creates the lockfile.

bun not supported

The scripts command does not currently run scripts through bun. Use bun run directly if your project's lockfile is bun.lockb.

Why use it

Use caseBenefit
You forgot the script nameInteractive picker shows every script in the project.
You want to chain a few scripts without npm-run-allexpressots scripts lint test build runs all three in order.
You're switching between npm / yarn / pnpm projectsOne command, no need to remember the runner.