openfga/language

Grammar for the OpenFGA modeling language

35

stars

937

commits

Go

primary language

Sep 10, 2026

updated

openfga.dev
fga
hacktoberfest
openfga

README

OpenFGA Language

ANTLR Grammar for the OpenFGA DSL and parser from and to the OpenFGA JSON Syntax

@openfga/syntax-transformer on npm GitHub Release openfga-language on Maven Central

License FOSSA Status Join our community Twitter

Table of Contents

About

OpenFGA is an open source Fine-Grained Authorization solution inspired by Google's Zanzibar paper. It was created by the FGA team at Auth0 based on Auth0 Fine-Grained Authorization (FGA), available under a permissive license (Apache-2) and welcomes community contributions.

OpenFGA is designed to make it easy for application builders to model their permission layer, and to add and integrate fine-grained authorization into their applications. OpenFGA’s design is optimized for reliability and low latency at a high scale.

Resources

Packages

PackagesPackage ManagerDocs
JS@openfga/syntax-transformer on npmREADME
GoGitHub ReleaseREADME
Javaopenfga-language on Maven CentralREADME

About This Repo

This repo contains everything needed to interact with the OpenFGA Authorization Models schema versions 1.1+, in multiple languages (currently, Go and JS are supported).

FeatureImplemented in ANTLR
Basic DSL
Nesting✅ (partial, see #113)
Conditions
FeatureGoJSJava
Transformer from the DSL to JSON and from JSON to DSL
Syntactic Model Validations
Schema 1.0❌ (supported in v0.1.6 and below)
Schema 1.1✅ (supported in v0.2.0 and above)
Schema 1.2 (Modular Models)
Semantic Model Validations❌ (planned, see #99)
Graphing & Utility Methods❌ (planned)❌ (planned)❌ (planned)

CLI

Use the FGA CLI

Community Parsers

RepoLicenseMaintainersLanguageSchema v1.0Schema v1.1Package ManagersOther Links
openfga language (syntax-transformer)Apache-2.0@openfgaANTLR (Go and Typescript implementations)<0.1.5Yes (v0.0.8+)npm:@openfga/syntax-transformer - GitHub release (latest SemVer)
openfga-dsl-parserApache-2.0@maxmindlin - @dblclikRustYesNocrates:openfga-dsl-parserpypi:openfga-dsl-parser-pythonWASM - Python
openfga-rsApache-2.0@iammathewRustYesNo
openfga-dsl-parserApache-2.0@craigpastroANTLR & GoYesPartial (requires self). Supports nestingGitHub release (latest SemVer)

Community Wrapper

RepoLicenseMaintainersLanguageSchema v1.0Schema v1.1Package ManagersOther Links
fga cliApache-2.0@openfgaGoNoYesGitHub release (latest SemVer)
fga-transformer-cliMIT@ozee-ioJavascriptYesYesnpm:@openfga/syntax-transformer

Contributing

See CONTRIBUTING.

Author

OpenFGA

License

This project is licensed under the Apache-2.0 license. See the LICENSE file for more info.

Contributors

rhamzeh

288 commits

dependabot[bot]

211 commits

ewanharris

185 commits

d-jeffery

63 commits

openfga/language

Grammar for the OpenFGA modeling language

35

stars

937

commits

Go

primary language

Sep 10, 2026

updated

openfga.dev
fga
hacktoberfest
openfga

README

OpenFGA Language

ANTLR Grammar for the OpenFGA DSL and parser from and to the OpenFGA JSON Syntax

@openfga/syntax-transformer on npm GitHub Release openfga-language on Maven Central

License FOSSA Status Join our community Twitter

Table of Contents

About

OpenFGA is an open source Fine-Grained Authorization solution inspired by Google's Zanzibar paper. It was created by the FGA team at Auth0 based on Auth0 Fine-Grained Authorization (FGA), available under a permissive license (Apache-2) and welcomes community contributions.

OpenFGA is designed to make it easy for application builders to model their permission layer, and to add and integrate fine-grained authorization into their applications. OpenFGA’s design is optimized for reliability and low latency at a high scale.

Resources

Packages

PackagesPackage ManagerDocs
JS@openfga/syntax-transformer on npmREADME
GoGitHub ReleaseREADME
Javaopenfga-language on Maven CentralREADME

About This Repo

This repo contains everything needed to interact with the OpenFGA Authorization Models schema versions 1.1+, in multiple languages (currently, Go and JS are supported).

FeatureImplemented in ANTLR
Basic DSL
Nesting✅ (partial, see #113)
Conditions
FeatureGoJSJava
Transformer from the DSL to JSON and from JSON to DSL
Syntactic Model Validations
Schema 1.0❌ (supported in v0.1.6 and below)
Schema 1.1✅ (supported in v0.2.0 and above)
Schema 1.2 (Modular Models)
Semantic Model Validations❌ (planned, see #99)
Graphing & Utility Methods❌ (planned)❌ (planned)❌ (planned)

CLI

Use the FGA CLI

Community Parsers

RepoLicenseMaintainersLanguageSchema v1.0Schema v1.1Package ManagersOther Links
openfga language (syntax-transformer)Apache-2.0@openfgaANTLR (Go and Typescript implementations)<0.1.5Yes (v0.0.8+)npm:@openfga/syntax-transformer - GitHub release (latest SemVer)
openfga-dsl-parserApache-2.0@maxmindlin - @dblclikRustYesNocrates:openfga-dsl-parserpypi:openfga-dsl-parser-pythonWASM - Python
openfga-rsApache-2.0@iammathewRustYesNo
openfga-dsl-parserApache-2.0@craigpastroANTLR & GoYesPartial (requires self). Supports nestingGitHub release (latest SemVer)

Community Wrapper

RepoLicenseMaintainersLanguageSchema v1.0Schema v1.1Package ManagersOther Links
fga cliApache-2.0@openfgaGoNoYesGitHub release (latest SemVer)
fga-transformer-cliMIT@ozee-ioJavascriptYesYesnpm:@openfga/syntax-transformer

Contributing

See CONTRIBUTING.

Author

OpenFGA

License

This project is licensed under the Apache-2.0 license. See the LICENSE file for more info.

Contributors

rhamzeh

288 commits

dependabot[bot]

211 commits

ewanharris

185 commits

d-jeffery

63 commits

Languages

Go

45.5%

Java

33.3%

TypeScript

19.5%