# metosin/malli

High-performance data-driven data specification library for Clojure/Script.

Repository: https://github.com/metosin/malli
Canonical: https://ross.abutalabs.com/products/malli
Language: Clojure
License: EPL-2.0
License Family: copyleft
Topics: clojure, clojurescript, validation, modelling, transformation, json-schema, coercion, inferring-schemas, generators, error-messages, visualizing-schemas, metosin-active
Last push: 2026-08-21T11:41:22+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 61, longevity 100
- inputs: {"age_days": 2665, "days_push": 12, "days_rel": 180, "gap_med": 75.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1760, forks 241 (observed 2026-08-28T04:05:32.587275+00:00)

## What it is
Malli is a high-performance, data-driven data specification library for Clojure and ClojureScript. It provides schema definitions as plain data with validation, transformation, coercion, value generation, schema inference, and conversion to JSON Schema and Swagger2.

## Use cases
- validate clojure data against a schema
- coerce incoming api payloads to expected types
- generate  schema from clojure maps
- infer schemas from sample data
- generate test data from schemas
- add function schemas with clj-kondo or typed clojure checking
- transform and strip data before persistence
- visualize data schemas as dot or plantuml diagrams

## When to choose
- you need fast, data-driven validation and coercion in Clojure or ClojureScript
- you want schemas as plain data that can be transformed to JSON Schema or Swagger2
- you need schema inference, value generation, or rich error messages
- you want function schemas integrated with clj-kondo or Typed Clojure

## When to avoid
- you are not working in Clojure/ClojureScript or babashka
- you need compile-time static type checking as the primary mechanism rather than runtime schemas
- you need a schema library for a non-JVM language

## Facets
- artifact type: library
- maturity: active
- function: serialization, developer-tools
- domain: developer-tools, apis, data-science
- platform: jvm, jvm-scripting
- tags: clojure, clojurescript, data-validation, schema, -schema, coercion, data-transformation, test-data-generation

## Member repositories
- metosin/malli (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:32.587275+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-30T03:27:14.851017+00:00, confidence not recorded.
  - readme: https://github.com/metosin/malli (fetched 2026-08-28T04:05:32.587275+00:00, sha 3e24e1829048)
- Data as of 2026-08-30T08:39:29.467469+00:00.
