Read–Eval–Print Loop (REPL) | Cerbos

🔐 New: A CISO’s benchmark for authorization maturity ➔ Download the ebook

Read–eval–print loop (REPL)

Developer tooling to quickly test and evaluate policy and conditions.

What is REPL?

REPL, or read–eval–print loop, is an interactive computing environment. It takes single user inputs, evaluates them, and returns the result to the user. This simple yet powerful tool allows developers to test snippets of code without the need to run full-fledged programs, making it an invaluable tool for debugging, learning, and iterative development.

Elevate your experience with Cerbos' integration of REPL

REPL with Cerbos

-> :let request = {
> "principal":{"id":"john","roles":["employee"],"attr":{"scope":"foo.bar.baz.qux"}},
>   "resource":{"id":"x1","kind":"leave_request","attr":{"scope":"foo.bar"}}
> }

-> hierarchy(R.attr.scope).ancestorOf(hierarchy(P.attr.scope))
_ = true

Cerbos' REPL is designed with developers in mind. It's not just about executing code; it's about enhancing the overall development experience. With features like ablilty to load existing policies in, execute specific conditions and sensible keybaord shortcuts, the Cerbos REPL is a swiss army knife of tooling.