Skip to main content

Learning Rego

Learn and write Rego with these tools from the OPA Ecosystem.

Regal

Regal

Regal can automatically check for common Rego mistakes as you code. Each violation is accompanied by a detailed explanation which can be a great learning tool for new Rego users. See the Supported Rules.

View Details
OPA Playground

OPA Playground

Sometimes if you're working on a Rego policy in an integrated system it can help to debug it in isolation first. The playground is a great place to do that. Get started with a hello world example.

View Details
Rego Cheat Sheet

Rego Cheat Sheet

The Rego Cheat Sheet was designed as a language reference, featuring common contact points, with Rego learners in mind.

View Details
Styra Academy

Styra Academy

'OPA Policy Authoring' is a free course that teaches the fundamentals of writing Rego policies.

View Details
Alfred

Alfred

Similar to the public OPA Playground, Alfred can be used to learn Rego interactively in an environment that can't use the public playground. Read about installation.

View Details
Awesome OPA List

Awesome OPA List

The Awesome OPA project maintains a list of policy packages, and editor integrations which can be helpful references for learning Rego.

View Details
Express OR in Rego

Express OR in Rego

This learning material is a great way to learn how to migrate logic from other languages to Rego.

View Details
Rego Language Comparisons

Rego Language Comparisons

The Rego Language Comparisons guide provides a series of examples illustrating how a policy can be expressed in a given language and the corresponding Rego code for comparison. Java, Python, and Go are currently covered.

View Details