
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@gb-nx/cli
Advanced tools
This library was generated with Nx.
Nx Plugin adding command line applications in your Nx workspace
Here is a list of some of the coolest features of the plugin:
If you have not already, create an Nx workspace with the following:
# npm
npx create-nx-workspace@latest
# yarn
yarn create nx-workspace@latest
Then you need to install the plugin in order to generate cli applications later on.
# npm
npm install @gb-nx/cli --save-dev
# yarn
yarn add @gb-nx/cli --dev
Simply run the application generator with the following command:
nx g @gb-nx/cli:application my-app
nx build my-app
Add a command to the project with the command generator
nx g @gb-nx/cli:command <name> --project my-app
See nx g @gb-nx/cli:command --help for examples with command parameters and options.
You'll want to edit the generated cli.config.json file to document your command. The values from the config file are used to generate the boilerplate for your project.
The refresh generator refreshes your project's boilerplate. See the options below. Run this command when you change your cli.config.json file.
nx g @gb-nx/cli:refresh --project my-app --main --ts --markdown --all
or
nx sync my-app
| OPTION | DESCRIPTION |
|---|---|
--main | generate the build target main entry point |
--markdown | generate the commands.md file in your project root |
--ts | generate the typing files for your commands |
--all | generate all the things |
nx serveThe nx serve command will run the application with no options or parameters resulting in the message ERROR No command specified. To use nx serve, temporarily edit your main.ts to bypass the argv parsing and run the command you want.
Of course, you want to revert such changes before building and distributing your multi-command CLI.
Alternatively, use a command like the following
nx build your-app;node dist/apps/your-app/main.js your-command your-parameter
If your CLI has only one command, consider using the plain @nx/node:application generator
This plugin supports Nx migrations and provides necessary version and code updates. So instead of bumping plugin version manually in package.json it's recommended to run nx migrate @gb-nx/cli command, that includes bumping the version of the @gb-nx/cli plugin, related dependencies and running code migrations.
| @gb-nx/cli version | Nx version |
|---|---|
| ^5.0.0 | >=17.0.0 |
| ^4.0.0 | ^17.0.0 |
| ^3.0.0 | ^16.0.0 |
| <3.0.0 | ^15.0.0 |
MIT
FAQs
This library was generated with [Nx](https://nx.dev).
We found that @gb-nx/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.