open-policy-agent

Can I run something like the OPA playground locally?


I am using OPA v0.68.0, and would like to use something like https://play.openpolicyagent.org/ to test changes quickly, but ideally I would like to do that hosted locally. Is that possible?


Solution

  • The Rego Playground isn't open source, but there's an open source clone named Alfred.

    But if your goal is to test changes quickly, the OPA VS Code extension provides a better policy authoring experience, and with Regal installed as a language server for Rego, you can use the Evaluate Code Lens to click on any package or rule and have the result displayed on the same line.

    enter image description here