Nx comes with dedicated documentation for each framework:

@nrwl/angular:karma

Adds Karma configuration to a workspace.

Usage

nx generate karma ...

By default, Nx will search for karma in the default collection provisioned in angular.json.

You can specify the collection explicitly as follows:

nx g @nrwl/angular:karma ...

Show what will be generated without writing to disk:

nx g karma ... --dry-run