# expr-lang/expr

Expression language and expression evaluation for Go

Repository: https://github.com/expr-lang/expr
Canonical: https://ross.abutalabs.com/products/expr
Homepage: https://expr-lang.org
Language: Go
License: MIT
License Family: permissive
Topics: configuration-language, expression, evaluator, go, expression-language, expression-evaluator, expr, bytecode, engine, golang, rule-engine
Last push: 2026-07-07T06:57:20+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 58, longevity 100
- inputs: {"age_days": 2972, "days_push": 57, "days_rel": 200, "gap_med": 31.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7989, forks 527 (observed 2026-08-28T04:10:10.592297+00:00)

## What it is
Expr is a Go-centric expression language and evaluation engine that compiles expressions into bytecode and runs them on a fast, safe virtual machine. It offers static type checking against Go environments, memory-safe and side-effect-free execution, and built-in functions for collections, making it ideal for dynamic configuration and business rules.

## Use cases
- evaluate user-supplied expressions safely in a Go app
- build a rule engine for access control policies
- add dynamic configuration logic to a Go service
- type-check expressions against Go structs at compile time
- filter and map over collections with a small DSL
- let users write business rules without redeploying code

## When to choose
- you need safe, terminating, side-effect-free expression evaluation in Go
- you want static typing and friendly compile-time errors for user-written expressions
- you need high-performance evaluation with a bytecode VM and reusable compiled programs
- you want seamless use of existing Go structs, maps, and methods as the expression environment

## When to avoid
- you need a full general-purpose scripting language with loops and side effects
- your project is not in Go
- you need sandboxed execution of arbitrary user code beyond pure expressions

## Facets
- artifact type: library
- maturity: stable
- function: interpreter, compiler, configuration-management, developer-tools
- domain: programming-languages, developer-tools, backend
- platform: go, cross-platform
- tags: expression-language, rule-engine, bytecode-vm, static-typing, safe-evaluation, dsl, automation

## Member repositories
- expr-lang/expr (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:10.592297+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:32:34.163624+00:00, confidence not recorded.
  - readme: https://github.com/expr-lang/expr (fetched 2026-08-28T04:10:10.592297+00:00, sha c0c15bc750e4)
  - homepage: https://expr-lang.org (fetched 2026-08-29T08:29:39.401812+00:00, sha d42fce70c262)
  - site_page: https://expr-lang.org/docs/language-definition (fetched 2026-08-29T08:29:39.413443+00:00, sha c05d7ef15bf9)
  - site_page: https://expr-lang.org/docs/v1.16/getting-started (fetched 2026-08-29T08:29:39.415673+00:00, sha b704fe3da767)
  - site_page: https://expr-lang.org/docs/getting-started (fetched 2026-08-29T08:29:39.411222+00:00, sha dd4a6f14276e)
  - site_page: https://expr-lang.org/docs/v1.15/getting-started (fetched 2026-08-29T08:29:39.417583+00:00, sha 042b1b8dc4b5)
  - site_page: https://expr-lang.org/docs/v1.14/Getting-Started (fetched 2026-08-29T08:29:39.419634+00:00, sha 744eb6f179d8)
  - site_page: https://expr-lang.org/docs/v1.13/Getting-Started (fetched 2026-08-29T08:29:39.421355+00:00, sha c7da64d54421)
  - site_page: https://expr-lang.org/docs/v1.12/Getting-Started (fetched 2026-08-29T08:29:39.423020+00:00, sha 38089269d81e)
  - site_page: https://expr-lang.org/docs/v1.11/Getting-Started (fetched 2026-08-29T08:29:39.424733+00:00, sha 85b888342ead)
- Data as of 2026-08-30T08:39:29.467469+00:00.
