Swerr CLI generates structured error documentation from JSDoc comments in your source code.
To install Swerr CLI, use npm:
npm install -g @swerr/cliFirst of all, you need a swerr.config.js file in your project root. You can create one manually or run:
swerr initswerr init installs @swerr/converter automatically because the generated configuration imports the built-in converters. Use swerr init --no-install to skip installation. Use swerr init --skip-config when only the other initialization steps are needed. The --config <path> and --force options can be combined with these flags.
An optional config path can also be passed directly:
swerr init ./example/swerr.config.jsIf both forms are provided, --config <path> takes precedence.
Once you have your configuration file set up, you can run the swerr configuration with:
swerr runThis command will generate the error documentation based on your JSDoc comments and the settings in your swerr.config.js file.