@@ -207,18 +207,40 @@ Each example is fully tested to demonstrate best practices for plugin testing as
207207
208208# ## Common Command Options
209209
210- | Option | Type | Default | Description |
211- | --------------------------- | -------------------- | -------- | --------------------------------------------------------------------------- |
212- | **`--persist.outputDir`** | `string` | n/a | Directory for the produced reports. |
213- | **`--persist.filename`** | `string` | `report` | Filename for the produced reports without extension. |
214- | **`--persist.format`** | `('json' \| 'md')[]` | `json` | Format(s) of the report file. |
215- | **`--persist.skipReports`** | `boolean` | `false` | Skip generating report files. (useful in combination with caching) |
216- | **`--upload.organization`** | `string` | n/a | Organization slug from portal. |
217- | **`--upload.project`** | `string` | n/a | Project slug from portal. |
218- | **`--upload.server`** | `string` | n/a | URL to your portal server. |
219- | **`--upload.apiKey`** | `string` | n/a | API key for the portal server. |
220- | **`--onlyPlugins`** | `string[]` | `[]` | Only run the specified plugins. Applicable to all commands except `upload`. |
221- | **`--skipPlugins`** | `string[]` | `[]` | Skip the specified plugins. Applicable to all commands except `upload`. |
210+ # ### Global Options
211+
212+ | Option | Type | Default | Description |
213+ | ---------------------- | ---------- | ------- | ------------------------------------------------------------------------------ |
214+ | **`--onlyPlugins`** | `string[]` | `[]` | Only run the specified plugins. Applicable to all commands except `upload`. |
215+ | **`--skipPlugins`** | `string[]` | `[]` | Skip the specified plugins. Applicable to all commands except `upload`. |
216+ | **`--onlyCategories`** | `string[]` | `[]` | Only run the specified categories. Applicable to all commands except `upload`. |
217+ | **`--skipCategories`** | `string[]` | `[]` | Skip the specified categories. Applicable to all commands except `upload`. |
218+
219+ # ### Cache Options
220+
221+ | Option | Type | Default | Description |
222+ | ------------------- | --------- | ------- | --------------------------------------------------------------- |
223+ | **`--cache`** | `boolean` | `false` | Cache runner outputs (both read and write). |
224+ | **`--cache.read`** | `boolean` | `false` | If plugin audit outputs should be read from file system cache. |
225+ | **`--cache.write`** | `boolean` | `false` | If plugin audit outputs should be written to file system cache. |
226+
227+ # ### Persist Options
228+
229+ | Option | Type | Default | Description |
230+ | --------------------------- | -------------------- | -------- | ------------------------------------------------------------------ |
231+ | **`--persist.outputDir`** | `string` | n/a | Directory for the produced reports. |
232+ | **`--persist.filename`** | `string` | `report` | Filename for the produced reports without extension. |
233+ | **`--persist.format`** | `('json' \| 'md')[]` | `json` | Format(s) of the report file. |
234+ | **`--persist.skipReports`** | `boolean` | `false` | Skip generating report files. (useful in combination with caching) |
235+
236+ # ### Upload Options
237+
238+ | Option | Type | Default | Description |
239+ | --------------------------- | -------- | ------- | ------------------------------ |
240+ | **`--upload.organization`** | `string` | n/a | Organization slug from portal. |
241+ | **`--upload.project`** | `string` | n/a | Project slug from portal. |
242+ | **`--upload.server`** | `string` | n/a | URL to your portal server. |
243+ | **`--upload.apiKey`** | `string` | n/a | API key for the portal server. |
222244
223245> [!NOTE]
224246> All common options, except `--onlyPlugins` and `--skipPlugins`, can be specified in the configuration file as well.
@@ -327,3 +349,12 @@ In addition to the [Common Command Options](#common-command-options), the follow
327349| Option | Required | Type | Description |
328350| ------------- | :------ : | ---------- | --------------------------------- |
329351| **`--files`** | yes | `string[]` | List of `report-diff.json` paths. |
352+
353+ # # Caching
354+
355+ The CLI supports caching to speed up subsequent runs and is compatible with Nx and Turborepo.
356+
357+ Depending on your strategy, you can cache the generated reports files or plugin runner output.
358+ For fine-grained caching, we suggest caching plugin runner output.
359+
360+ The detailed example for [Nx caching](./docs/nx-caching.md) and [Turborepo caching](./docs/turbo-caching.md) is available in the docs.
0 commit comments