New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nyatinte/prw

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nyatinte/prw

Interactive pnpm workspace package & script runner

latest
Source
npmnpm
Version
0.4.1
Version published
Maintainers
1
Created
Source

@nyatinte/prw

English | 日本語

CI npm downloads pnpm

prw is a CLI for interactively selecting a package and script in a pnpm workspace and running it. It only uses existing package.json scripts — no extra config files required.

Demonstration of the prw CLI's interactive workflow

Package picker filtered by package name Script picker after selecting a package
Filter packages with fuzzy search.Pick a script and run it immediately.

Installation

npm install -g @nyatinte/prw
# or
pnpm add -g @nyatinte/prw

Usage

1. Start without arguments

prw

Interactively select a package and script, then run it. The root package is also available.

2. Pass a package name

prw web

Package names are matched with fuzzy search. If one package matches, it goes straight to script selection. If multiple match, the package picker is shown. Frequently used packages are shown first based on history.

3. Pass both package and script

prw @myapp/web dev

If both are unambiguous, prw skips the selection screens and runs immediately. Frequently used scripts are also shown first based on history.

[!NOTE] You don't need to type the full package name every time. A short query like prw web is usually enough.

Example

$ prw
│
◆  Select package
│
│  Search: _
│  ● (root)
│  ○ @myapp/web
│  ○ @myapp/api
│  ↑/↓ to select • Enter: confirm • Type: to search
└

After selecting a package, you move on to script selection. The focused script shows its full command in (...).

│
◇  Select package
│  @myapp/web
│
◆  Select script
│
│  Search: _
│  ● dev (vite)
│  ○ build
│  ○ test
│  ↑/↓ to select • Enter: confirm • Type: to search
└

Workspace Layout

.
├─ package.json
├─ pnpm-workspace.yaml
├─ apps/
│  └─ web/
│     └─ package.json
└─ packages/
   ├─ ui/
   │  └─ package.json
   └─ config/
      └─ package.json

With a monorepo like this, you can run scripts from anywhere under apps/ or packages/, from anywhere in the workspace.

Spec

[!IMPORTANT] prw can be run from anywhere inside the workspace. It walks up parent directories to find the nearest pnpm-workspace.yaml.

[!NOTE] Usage history is stored per workspace at $XDG_STATE_HOME/prw/histories/<workspace-id>.json (or ~/.local/state/prw/histories/<workspace-id>.json when XDG_STATE_HOME is unset). <workspace-id> is a SHA-256 hash of the resolved workspace root path.

License

MIT

Keywords

pnpm

FAQs

Package last updated on 16 Mar 2026

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