diff --git a/tools/apis/cds-add.md b/tools/apis/cds-add.md index 934cb205b..113ca5607 100644 --- a/tools/apis/cds-add.md +++ b/tools/apis/cds-add.md @@ -303,6 +303,26 @@ module.exports = class extends cds.add.Plugin { ``` ::: +#### Call `cds add` for an NPM package + +Similar to `npx -p`, you can use the `--package/-p` option to directly install a package from an *npm* registry before running the command. +This lets you invoke `cds add` for CDS plugins easily with a single command: + +```sh +cds add my-facet -p @cap-js-community/example +``` + +::: details Install directly from your GitHub branch + + For example, if your plugin's code is in `https://github.com/cap-js-community/example` on branch `cds-add` and registers the command `cds add my-facet`, then doing an integration test of your plugin with `@sap/cds-dk` in a single command: + +```sh +cds add my-facet -p @cap-js-community/example@git+https://github.com/cap-js-community/example#cds-add +``` + +::: + + ## Plugin API Find here a complete overview of public `cds add` APIs.