---
title: "Read–eval–print loop (REPL)"
description: "Developer tooling to quickly test and evaluate policy and conditions."
canonical: "https://www.cerbos.dev/features-benefits-and-use-cases/read-eval-print-loop-repl"
source: "https://www.cerbos.dev/features-benefits-and-use-cases/read-eval-print-loop-repl"
---

# 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
- **Instant feedback:** Test policies and conditions on-the-fly without waiting having to run the Cerbos service.
- **Iterative development:** Quickly prototype and refine your code, enhancing productivity.
- **Debugging made easy:** Load existing policies into the REPL and evaluate simple requests to debug real world use cases.
- **Learning and exploration:** New to Cerbos or a particular feature? Use REPL to learn interactively.

### REPL with Cerbos

```yaml
-> :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.

## Dive into the world of REPL

- [Documentation](https://docs.cerbos.dev/cerbos/latest/cli/cerbos.html#repl) — Get started with REPL in Cerbos
- [Community insights](https://community.cerbos.dev/?_gl=1*5ozo82*_ga*MTk1NjcwNzQ1MC4xNjY2Mjc5NjI2*_ga_8G3G3MS838*MTY5NDE5MTE5Ny41MjcuMS4xNjk0MTkyNzgyLjIwLjAuMA) — Engage with the Cerbos community to share experiences and insights on REPL

