Skip to content

About

πŸƒ Find and run package.json scripts β€” interactive picker, fuzzy matching (nr tw β†’ test:watch), grouped list with descriptions, auto npm/pnpm/yarn/bun detection, args passthrough, monorepo-aware. Zero deps. By Prism Protocol

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Prism npm Scripts

Typing SVG

CI Node.js Zero dependencies License

Prism npm Scripts screenshot

⚑ Overview

Prism npm Scripts (nr) is the fastest way to run what's in package.json. Run nr for an interactive picker (type to filter, arrows, enter), nr -l for a grouped overview with descriptions, or nr <query> to fuzzy-run a script: nr d β†’ dev, nr b:p β†’ build:prod, nr tw β†’ test:watch. It finds the nearest package.json, picks the right package manager from packageManager or the lockfile (walking up for monorepos) and passes extra arguments straight through.

✨ Features

  • Interactive picker: type to filter, ↑↓ to move, enter to run
  • Fuzzy matching: exact β†’ prefix β†’ segments (t:e) β†’ initials (tw) β†’ subsequence; ambiguity is reported, not guessed
  • Grouped list: dev, build, test, quality, db, release, hooks β€” with descriptions from scripts-info or //name keys
  • Package manager detection: packageManager field, bun / pnpm / yarn / npm lockfiles, walks up for monorepos
  • Args passthrough (nr test --watch), --dry-run, --json, exit codes and timing forwarded
  • Works from any sub-folder; zero dependencies

πŸš€ Quick Start

# run without installing
npx github:krishyaa06/prism-npm-scripts -l

# or install globally
npm install -g github:krishyaa06/prism-npm-scripts
nr 

Requires Node.js 18.17+. No dependencies.

πŸ› οΈ Usage

nr                  pick a script (arrow keys / type to filter)
nr <query> [args]   fuzzy-run: nr d β†’ dev, nr b:p β†’ build:prod, nr tw β†’ test:watch
nr -l, --list       list scripts grouped, with descriptions
nr --json           scripts as JSON

  -p, --pm <pm>       force npm | pnpm | yarn | bun (default: from lockfile)
  -n, --dry-run       print the command instead of running it
  -C, --cwd <dir>     start from another folder

Describe your scripts

{
  "scripts": { "dev": "next dev --turbo", "deploy": "vercel --prod" },
  "scripts-info": {
    "dev": "Next.js dev server with Turbopack on :3000",
    "deploy": "Ship to Vercel production"
  }
}

πŸ“ Project Structure

prism-npm-scripts/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ logo.png
β”‚   └── logo.svg
β”œβ”€β”€ bin/
β”‚   └── nr.js   # CLI entry
β”œβ”€β”€ examples/
β”‚   └── app/   # demo package.json
β”‚       └── package.json
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.js   # package.json, PM detection, fuzzy match
β”‚   └── ui.js   # colours, tables
β”œβ”€β”€ test/
β”‚   └── nr.test.js
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── package.json

πŸ§ͺ Tests

npm test

Tests use the built-in node:test runner, so there is nothing to install. CI runs them on Node 20 and 22.

🀝 Contributing

  1. Fork the repo and create a branch: git checkout -b feature/my-idea
  2. Make your change and add a test in test/
  3. Run npm test and open a Pull Request

πŸ”· Part of Prism Protocol

Prism npm Scripts is one of the open-source tools built by Prism Protocol, a tech community where young builders learn, ship and compete together.

πŸ‘€ Author

Soumya Bhandare
Soumya Bhandare

Founder @ Prism Protocol
Discord
Instagram
X

πŸ“„ License

Released under the MIT License.

If you like this project, consider giving it a ⭐
"Build. Create. Compete." · Made with ⚑ by Prism Protocol

About

πŸƒ Find and run package.json scripts β€” interactive picker, fuzzy matching (nr tw β†’ test:watch), grouped list with descriptions, auto npm/pnpm/yarn/bun detection, args passthrough, monorepo-aware. Zero deps. By Prism Protocol

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages