LinkML is an open framework that simplifies authoring, validating, and sharing data. You write your data model once in a simple YAML format. LinkML then generates code, schemas, and validation rules for multiple languages and formats, such as JSON Schema, CSV, RDFS/SHACL...
LinkML-Scala is a robust, cross-platform implementation of LinkML. It works in the JVM, in your browser or Node.js, Python, and even compiles to native binaries. We have a command-line interface (CLI), a library for programmatic access, and a GitHub Action.
Note
β If you like LinkML-Scala, consider giving it a star β it helps others find the project!
LinkML-Scala compiles to pure JavaScript (zero dependencies, no Wasm), so you can use it in your browser or Node.js environment. Try it out in our online playground, or get it from npm.
For Java, Scala, Kotlin and other JVM languages, LinkML-Scala is available on Maven Central.
We also have Python and native bindings, so you can use LinkML-Scala from Python (pip install neverblink-linkml), C, C++, or Rust.
linkml-scala is a self-contained binary that runs natively on Linux, macOS, and Windows. You don't need Python, Java, or anything else installed.
It starts up immediately and runs fast, even on extra-large LinkML models. See the installation instructions.
LinkML-Scala will tell you exactly what is wrong with your model, and where:
The validator can also return a machine-readable JSON report (schema), useful for UIs and scripts.
We engineered LinkML-Scala to be as consistent as possible. We test each generator across the same extensive suite of LinkML models.
In some cases, LinkML-Scala diverges from the Python implementation. You can find the list of implementation differences here.
LinkML-Scala was built to work great with large schemas. In our benchmarks it's 22.9β38.5x faster than the Python implementation:
If you are on Linux, macOS, or WSL on Windows, the easiest installation method is with our script:
. <(curl -sSfL https://raw.githubusercontent.com/NeverBlink-OSS/linkml-scala/refs/heads/main/cli/install.sh)
linkml-scalaRead the script before running it: install.sh.
Method 2: Using mise (cross-platform)
You can install linkml-scala on any platform (including Windows) using the mise environment manager:
mise use ubi:NeverBlink-OSS/linkml-scala
linkml-scalaHead over to Releases and download the pre-compiled binary for your specific OS and architecture.
For macOS and Linux: Rename the downloaded file, make it executable, and run it:
mv linkml-scala-<os>-<arch> linkml-scala
chmod +x linkml-scala
./linkml-scalaFor Windows: Simply rename the downloaded executable, and run it:
ren linkml-scala-windows-x86_64.exe linkml-scala.exe
linkml-scala.exeReleases ship a SHA256SUMS manifest and a signed build provenance attestation, so you can confirm a download came from our release workflow. See how to verify it.
The validate command (also available as lint) inspects your LinkML schemas for structural and logical issues:
linkml-scala validate <input-file> ...The CLI outputs issues directly to your terminal, categorized into three severity levels:
- Fatal: critical blockers (unknown references, invalid range types, used undefined default range)
- Errors: structural violations (multiple keys or ID slots, multiple tree roots, ID collisions)
- Warnings: non-critical issues (invalid slot usage, undefined default range, missing tree root)
All generators require that there are no fatal issues in the schema.
Generate a standard JSON Schema, Apache Ossie ontology, OWL ontology, or SHACL from your model:
linkml-scala generate json-schema <input-file>
linkml-scala generate ossie <input-file>
linkml-scala generate owl <input-file>
linkml-scala generate shacl <input-file>There's more! Run linkml-scala --help to see the full list of supported generators. You can also run linkml-scala generate shacl --help to see the options for any specific generator. Additional generator documentation is in the docs/ directory.
Generate a LinkML model that:
- Has all imports resolved
- Has all class slots materialized into attributes (opt out by passing
--skip-derivation) - Has all unused elements removed (controlled by
--pruning-mode)
./linkml-scala generate linkml --to <output-path> <input-file>The generator is also published to npm as @neverblink/linkml β a single ES module with TypeScript declarations, with no runtime dependencies.
npm install @neverblink/linkmlimport { LinkML } from "@neverblink/linkml";
// Parse once into a reusable SchemaView handle. The second argument is an
// import map (filename -> YAML) for `imports:`.
const view = LinkML.loadFromString(mySchemaYaml, {});
const jsonSchema = LinkML.jsonSchema(view);Load a schema with loadFromString (from YAML text) or loadFromPath (from a path in the
import map, immune to cyclic imports involving the root), then run jsonSchema, shacl,
rdfs, owl, linkml, scala, frictionless, graphQl, typeScript, pydantic, erDiagram, ossie, or lint
against the returned handle.
See generator/npm/README.md for details.
Install it:
pip install neverblink-linkmlimport linkml_scala
with linkml_scala.load_file("model.yaml") as schema:
print(schema.json_schema())
print(schema.shacl())See docs/python_bindings.md for the whole API, and for the ABI for C, C++ and Rust.
All modules are published to Maven Central under the eu.neverblink.linkml group ID, cross-built for the JVM, Scala.js and Scala Native. Best way to get started is to either browse the Javadoc or read the CLI's source code.
We have a pre-packaged GitHub Action that can do schema validation and generation in your CI pipelines. See NeverBlink-OSS/linkml-scala-action for details.
We ship an agent skill that teaches AI agents to author, validate, review and release LinkML schemas with LinkML-Scala. See .agents/README.md for what it covers.
It drives the CLI, so install that first (see CLI tool installation).
Claude Code β install it as a plugin:
/plugin marketplace add NeverBlink-OSS/linkml-scala
/plugin install linkml@linkml-scala
Codex β add this repository as a plugin marketplace, then install linkml from /plugins:
codex plugin marketplace add NeverBlink-OSS/linkml-scalaIf you added the marketplace before, refresh it first with codex plugin marketplace upgrade linkml-scala.
Cursor, OpenCode, and any other agent β these load Agent Skills directly from the vendor-neutral ~/.agents/skills/ directory:
git clone --depth=1 https://github.com/NeverBlink-OSS/linkml-scala /tmp/linkml-scala
mkdir -p ~/.agents/skills
cp -r /tmp/linkml-scala/.agents/skills/linkml ~/.agents/skills/This project is governed by our Code of Conduct, adapted from the Mozilla Community Participation Guidelines.
See CONTRIBUTING.md for build instructions, common mill tasks, and how to contribute.
Have a question, an idea, or just want to say hi? Join our Discord β we're happy to help.
LinkML-Scala is licensed under the Apache License 2.0. See the LICENSE file for details.
This project is being developed and maintained by NeverBlink. For any inquiries, please reach out to us via email.
This work has been supported by the HEDGE-IoT project grant number 101136216 funded by the European Commission as part of the Horizon Europe Framework Programme. However, views and opinions expressed are those of the authors only and do not necessarily reflect those of the European Union or the European Climate, Infrastructure and Environment Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.


