-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Should node support subcommands? #53483
Copy link
Copy link
Open
Labels
cliIssues and PRs related to the Node.js command line interface.Issues and PRs related to the Node.js command line interface.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered stale
Metadata
Metadata
Assignees
Labels
cliIssues and PRs related to the Node.js command line interface.Issues and PRs related to the Node.js command line interface.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered stale
Type
Projects
Status
Triaged
What is the problem this feature will solve?
currently, node's cli interface is pretty simple and lean,
it mainly accepts flags that start with two dashes, or sometimes a single dash for some aliases.
additionally, many flags depend on each other or imply using another flag.
now that more and more flags are added to node, (and each new flag is heavily considered before adding to avoid options bloat), I propose we support a more complex cli interface with sub-commands.
this issue has come up before when adding
node --run, and to avoid blocking that - the discussion was postponed, so I went ahead and opened this issue.If I recall, the main concern was
node runornode testis a breaking change since it today runsnode run.jsornode test.jsaccordingly - that can be addressed with releasing this gradually as semver-major with a deprecation warning for a few versions prior to the actual changesome groups/clusters of commands that might fit using sub commands:
node --runnode --watch,--watch-pathnode --testnode --build-snapshotWhat is the feature you are proposing to solve the problem?
N/A
What alternatives have you considered?
No response