# @contentstack/cli-audit

> Contentstack audit plugin

Latest version **2.0.1** (published 2026-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @contentstack/cli-audit
pnpm add @contentstack/cli-audit
yarn add @contentstack/cli-audit
bun add @contentstack/cli-audit
```

Provides the command `audit`.

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-09-15 |
| First published | 2023-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=22.0.0 |
| Dependencies | 8 |
| Unpacked size | 484.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Contentstack CLI |
| Maintainers | mynk, cloudaccounts |
| Keywords | oclif |

## Links

- npm: https://www.npmjs.com/package/@contentstack/cli-audit
- Repository: https://github.com/contentstack/cli-plugins
- Homepage: https://github.com/contentstack/cli
- Issues: https://github.com/contentstack/cli-plugins/issues
- npm.io page: https://npm.io/package/@contentstack/cli-audit

## Dependencies (8)

- [chalk](https://npm.io/package/chalk.md) ^5.6.2
- [lodash](https://npm.io/package/lodash.md) ^4.18.1
- [winston](https://npm.io/package/winston.md) ^3.19.0
- [fast-csv](https://npm.io/package/fast-csv.md) ^4.3.6
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.6
- [@oclif/core](https://npm.io/package/@oclif/core.md) ^4.11.14
- [@contentstack/cli-command](https://npm.io/package/@contentstack/cli-command.md) ~2.0.1
- [@contentstack/cli-utilities](https://npm.io/package/@contentstack/cli-utilities.md) ~2.0.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2026-09-15
- 1.21.1 (v1-x) — 2026-08-13
- 2.0.0-beta.16 (beta) — 2026-07-29
- 2.0.0 — 2026-08-12
- 1.21.0 — 2026-08-05
- 1.20.0 — 2026-07-29
- 2.0.0-beta.15 — 2026-07-20
- 2.0.0-beta.14 — 2026-06-29
- 1.19.5 — 2026-06-29
- 1.19.4 — 2026-06-01
- 2.0.0-beta.13 — 2026-06-01
- 2.0.0-beta.12 — 2026-05-18
- 1.19.3 — 2026-05-04
- 2.0.0-beta.11 — 2026-04-28
- 2.0.0-beta.10 — 2026-04-21
- … 60 more at https://npm.io/package/@contentstack/cli-audit/versions

## README

<!-- Insert Nodejs CI here -->
<!-- Insert Audit version here -->

# @contentstack/cli-audit

Audit plugin

## How to install this plugin

```shell
$ csdx plugins:install @contentstack/cli-audit
```

## How to use this plugin

<!-- usage -->
```sh-session
$ npm install -g @contentstack/cli-audit
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-audit/2.0.1 linux-x64 node-v22.23.2
$ csdx --help [COMMAND]
USAGE
  $ csdx COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`csdx cm:stacks:audit`](#csdx-cmstacksaudit)
* [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)

## `csdx cm:stacks:audit`

Perform audits and find possible errors in the exported Contentstack data

```
USAGE
  $ csdx cm:stacks:audit [-c <value>] [-d <value>] [--show-console-output] [--report-path <value>] [--modules
    content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules|composable-studio...]
    [--columns <value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output
    csv|json|yaml]

FLAGS
  --modules=<option>...  Provide the list of modules to be audited
                         <options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-ru
                         les|composable-studio>
  --report-path=<value>  Path to store the audit reports

COMMON FLAGS
  -c, --config=<value>       Path of the external config
  -d, --data-dir=<value>     Path where the data is stored
      --show-console-output  Display the audit and audit fix result for individual modules

TABLE FLAGS
  --columns=<value>  Specify columns to display, comma-separated.
  --csv              Output results in CSV format.
  --filter=<value>   Filter rows by a column value (e.g., name=foo).
  --no-header        Hide table headers in output.
  --no-truncate      Prevent truncation of long text in columns.
  --output=<option>  Specify output format: csv, json, or yaml.
                     <options: csv|json|yaml>
  --sort=<value>     Sort the table by a column. Use "-" for descending.

DESCRIPTION
  Perform audits and find possible errors in the exported Contentstack data

EXAMPLES
  $ csdx cm:stacks:audit

  $ csdx cm:stacks:audit --report-path=<path>

  $ csdx cm:stacks:audit --report-path=<path> --csv

  $ csdx cm:stacks:audit --report-path=<path> --filter="name=<filter-value>"

  $ csdx cm:stacks:audit --report-path=<path> --modules=content-types --filter="name="<filter-value>"
```

_See code: [src/commands/cm/stacks/audit/index.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts)_

## `csdx cm:stacks:audit:fix`

Perform audits and fix possible errors in the exported Contentstack data.

```
USAGE
  $ csdx cm:stacks:audit:fix [-c <value>] [-d <value>] [--show-console-output] [--report-path <value>] [--modules
    content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules|composable-studio...]
    [--copy-path <value> --copy-dir] [--fix-only
    reference|global_field|json:rte|json:extension|blocks|group|content_types...] [--columns <value>] [--sort <value>]
    [--filter <value>] [--csv] [--no-truncate] [--no-header] [--output csv|json|yaml]

FLAGS
  --copy-dir              Create backup from the original data.
  --copy-path=<value>     Provide the path to backup the copied data
  --fix-only=<option>...  Provide the list of fix options
                          <options: reference|global_field|json:rte|json:extension|blocks|group|content_types>
  --modules=<option>...   Provide the list of modules to be audited
                          <options: content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-r
                          ules|composable-studio>
  --report-path=<value>   Path to store the audit reports

COMMON FLAGS
  -c, --config=<value>       Path of the external config
  -d, --data-dir=<value>     Path where the data is stored
      --show-console-output  Display the audit and audit fix result for individual modules

TABLE FLAGS
  --columns=<value>  Specify columns to display, comma-separated.
  --csv              Output results in CSV format.
  --filter=<value>   Filter rows by a column value (e.g., name=foo).
  --no-header        Hide table headers in output.
  --no-truncate      Prevent truncation of long text in columns.
  --output=<option>  Specify output format: csv, json, or yaml.
                     <options: csv|json|yaml>
  --sort=<value>     Sort the table by a column. Use "-" for descending.

DESCRIPTION
  Perform audits and fix possible errors in the exported Contentstack data.

EXAMPLES
  $ csdx cm:stacks:audit:fix --copy-dir

  $ csdx cm:stacks:audit:fix --report-path=<path> --copy-dir

  $ csdx cm:stacks:audit:fix --report-path=<path> --copy-dir --csv

  $ csdx cm:stacks:audit:fix --fix-only=reference,global_field --copy-dir

  $ csdx cm:stacks:audit:fix --report-path=<path> --filter="name=<filter-value>"

  $ csdx cm:stacks:audit:fix --report-path=<path> --modules=content-types --filter="name="<filter-value>" --copy-dir --copy-path=<path>
```

_See code: [src/commands/cm/stacks/audit/fix.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-audit/src/commands/cm/stacks/audit/fix.ts)_
<!-- commandsstop -->

---
_Source: https://npm.io/package/@contentstack/cli-audit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
