opa
opa copied to clipboard
Add OPA Playground evaluate, publish commands to the cli
It would be nice if we can add playground capabilities to the OPA CLI, for example, publish, also, open the local folder on the playground page.
Expected Behavior
$ opa publish --rego policy.rego --input input.json --data data.json
https://play.openpolicyagent.org/p/pluFLZm5T7
$ opa playground --policy-dir ./policy <-- maybe, we can define a folder template to be able to open this folder on the playground, for example, it has to include rego, input, and data files.
Actual Behavior
There is no support for that kind of scenario.
Additional Info
The Rego Playground has many useful APIs to use it. https://play.openpolicyagent.org/v1/share <-- get a shareable link https://play.openpolicyagent.org/v1/data <-- evaluate the policy against data and input
we can use them in the CLI to add that kind of capabilities.
@srenatus do you think it makes sense ? 🙏
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.
@developer-guy I don't think we'll want to couple the OPA executable to the Rego playground. Is there are any particular features in the playground you find missing in the editor plugins for VS Code or IntelliJ IDEA?
Closing for now. We can re-visit in future based on use-case, demand etc.