Skip to content

clearer help menu for npxΒ #60203

@aep-sunlife

Description

@aep-sunlife

npx is a leaky abstraction.

$ npx -h
Run a command from a local or remote npm package

Usage:
npm exec -- <pkg>[@<version>] [args...]
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'

Options:
[--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[--workspaces] [--include-workspace-root]

alias: x

Run "npm help exec" for more info

It's fine to delegate from npx to npm exec. It's not fine to delegate the help menu syntax (npm exec).

99% of CLI help menus cite the same command/prefix as the program path that invoked the command. Please disambiguate whether the user should actually invoke npx ... commands vs. npm exec ... commands, in npx's help menu. Don't jump back and forth between the two terminologies.

Specifically, it's unclear when or whether an explicit exec subcommand is supported by npx commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wrong repoIssues that should be opened in another repository.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions