opa-inspect(1)

Open Policy Agent(1) Open Policy Agent(1)

NAME

opa-inspect - Inspect OPA bundle(s)

SYNOPSIS

opa inspect [ [...]] [flags]

DESCRIPTION

Inspect OPA bundle(s).

The 'inspect' command provides a summary of the contents in OPA bundle(s) or a single Rego file. Bundles are gzipped tarballs containing policies and data. The 'inspect' command reads bundle(s) and lists the following:

  • packages that are contributed by .rego files
  • data locations defined by the data.json and data.yaml files
  • manifest data
  • signature data
  • information about the Wasm module files
  • package- and rule annotations

Example:

$ ls
bundle.tar.gz
$ opa inspect bundle.tar.gz

You can provide exactly one OPA bundle, to a bundle directory, or direct path to a Rego file to the 'inspect' command on the command-line. If you provide a path referring to a directory, the 'inspect' command will load that path as a bundle and summarize its structure and contents. If you provide a path referring to a Rego file, the 'inspect' command will load that file and summarize its structure and contents.

OPTIONS

-a, --annotations[=false] list annotations

-f, --format=pretty set output format

-h, --help[=false] help for inspect

--v0-compatible[=false] opt-in to OPA features and behaviors prior to the OPA v1.0 release

SEE ALSO

opa(1)

Oct 2026