CLI Commands

cnspec policy init

Create an example policy bundle file as a starting point for writing custom policies.

Generate an example policy bundle file that you can use as a starting point for writing custom policies. If you don't provide a filename, cnspec creates example-policy.mql.yml.

To learn how to write custom policies, read the Policy Authoring Guide.

cnspec policy init [path] [flags]

Options

  -h, --help   help for init

Options inherited from parent commands

      --api-proxy string   Set the proxy for communications with Mondoo Platform API
      --auto-update        Enable automatic provider installation and update (default true)
      --config string      Set config file path (default $HOME/.config/mondoo/mondoo.yml)
      --log-level string   Set the log level: error, warn, info, debug, trace (default "info")
  -v, --verbose            Enable verbose output

SEE ALSO

On this page