Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run query from command-line #152

Closed
timothyhinrichs opened this issue Nov 16, 2016 · 0 comments
Closed

Run query from command-line #152

timothyhinrichs opened this issue Nov 16, 2016 · 0 comments

Comments

@timothyhinrichs
Copy link
Member

It would be nice if we could run a Rego query from the command line and have it output json so that we could pipe results to something like 'less'. For example...

$ opa run foo.json bar.json "data.foo[x].name = data.bar.baz[y].id, data.foo[x]=output" | less

Or give people access to unix utilities from inside the repl

tsandall added a commit to tsandall/opa that referenced this issue Nov 25, 2016
Can now evaluate queries from the command line, for example:

$ opa run -f json -e 'data.repl.version[x] = y'

Fixes open-policy-agent#152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants