Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List NX targets

I can't find a command that lists the available NX targets from the command line. I'd expect something like nx list, but that lists plugins, not targets.

Currently the only way I can find what targets I can run is to manually inspect project.json.

How can I do this?

like image 606
Steve Bennett Avatar asked Sep 14 '25 21:09

Steve Bennett


1 Answers

I guess until https://github.com/nrwl/nx/issues/18160 gets implemented, a way to list all the targets from command line is by running jq - either per project, or from NX workspace root - with a command similar to:

jq -r '.name, (.targets | keys)' **/project.json

like image 95
Paul Robu Avatar answered Sep 16 '25 12:09

Paul Robu