Skip to main content
This is a beta feature. Beta features provide early access to product functionality. These features may change between releases without warning, or can be removed in a future release. Please contact us to enable this feature for your organization.

Synopsis

Evaluate a local JSON input against a Rego policy. Read JSON from a file or stdin and evaluate it against a Rego policy. The input file should contain the raw JSON object your policy expects — not the wrapper produced by --show-input. Use jq '.input' to extract the policy input from a --show-input --output json capture. The policy must use package policy and define an allow rule. An optional violations rule (a set of strings) can provide human-readable denial reasons. By default a deny exits with code 1. Pass --no-assert to print the verdict and exit 0 even on deny, when this command is feeding another tool as a policy decision point. When --input-file is omitted, JSON is read from stdin. Use --params to pass configuration data to the policy as data.params. This accepts inline JSON or a file reference (@file.json).

Flags

Flags inherited from parent commands

Live Examples in different CI systems

View an example of the kosli evaluate input command in GitHub.In this YAML file

Examples Use Cases

These examples all assume that the flags --api-token, --org, --host, (and --flow, --trail when required), are set/provided.
Last modified on July 21, 2026