ErdenDocs
Getting started

Check an ontology locally

Create a starter project, run every validation stage on your computer, try the bundled demo, and pack a release archive, all without an account.

Who needs this, and when

Who: ontology authors. When: every time you change an ontology, before you publish. Nothing here contacts the registry, so you need no account. Status: always available.

erden check runs the same six validation stages the registry runs when you publish. If it passes on your computer, publishing will pass the same checks.

Six stages in a row: sources, reasoning, core ontology, SHACL, competency questions, citations
The six validation stages, in the order they run.

Try it

Create a starter project

Make a folder for your ontologies and go there. The later guides use ~/ontologies:

mkdir -p ~/ontologies
cd ~/ontologies
erden init my-ontology --format json

What you should see:

$ erden init my-ontology --format json
Initialized @example/project (https://example.invalid/erden/project)
- erden.config.json
- erden.lock
- ontology.ttl

erden init made the folder my-ontology with three files:

FileWhat it is
erden.config.jsonThe manifest: the project's identity (canonical IRI and alias), title, and which files are its sources.
erden.lockThe lockfile: the exact versions of any layers this project depends on. Empty for now.
ontology.ttlA small starter ontology in Turtle.

--format chooses the manifest format: json, jsonc, yml, yaml, or toml.

Ontology sources don't have to be Turtle. Name a file in sources.ontology and Erden reads it in the format its extension says, as published: Turtle (.ttl), N-Triples (.nt), RDF/XML (.rdf, .owl), or JSON-LD (.jsonld). A folder in sources.ontology still means only its .ttl files. Erden never downloads anything while reading a source, so a JSON-LD file whose @context is a URL is refused; copy the context into the file instead.

The reasoner covers a growing part of OWL 2, on the way to all of it: today classes and their hierarchy, equivalence and disjointness (including owl:AllDisjointClasses), domains and ranges (a union of classes as a domain), intersections, existential restrictions (owl:someValuesFrom), universal restrictions, at-most-one cardinalities and complements as superclasses, general class axioms, sub- and equivalent properties, inverse, transitive, symmetric, functional and inverse-functional properties, property chains, individuals and their values, and declared annotations. By default a check refuses anything it does not reason over yet, such as owl:minCardinality, owl:hasValue or owl:AsymmetricProperty, and lists every such statement at once, each with its OWL construct and position. A project that mirrors an ontology it cannot edit can add "outsideProfile": "report" to its manifest instead: the check then reasons over everything else and lists these under "Not reasoned" in the report, with the note that the consequences of those statements were not checked. Each project's own manifest decides, so your layer can stay strict while a mirror it depends on reports. Mirror an upstream ontology walks through it with W3C SKOS.

Check it

erden check my-ontology --offline

What you should see:

$ erden check my-ontology --offline
Erden check @example/project: PASSED
Manifest: erden.config.json
Ontology: https://example.invalid/erden/project
Reasoner: erden-reasoner@0.3.0+purrdf.0.12.0.dfb1df7 (decided, consistent)
Completeness: checked at qualification, not on this run

Sources: passed
Reasoning: passed
Core ontology: passed
SHACL: skipped
Competency questions: skipped
Citations: passed

SHACL and competency questions say skipped because the starter project has no shapes and no questions yet. --offline means "don't try to download dependencies".

Check the full demo

The public erden-sh/erden repository includes a complete example with shapes, a competency question, and a README it cites. Download the repository with Git into ~/erden, the folder the later guides call the erden folder, and check the example. You only use its files; there is nothing to build:

git clone --depth 1 https://github.com/erden-sh/erden.git ~/erden
cd ~/erden
erden check examples/erden-demo --offline

What you should see: all six stages pass, with one warning about a citation that could not be fully checked:

$ erden check examples/erden-demo --offline
Erden check @example/erden-demo: PASSED
Manifest: erden.config.json
Ontology: https://example.invalid/erden/demo
Reasoner: erden-reasoner@0.3.0+purrdf.0.12.0.dfb1df7 (decided, consistent)
Completeness: checked at qualification, not on this run

Sources: passed
Reasoning: passed
Core ontology: passed
SHACL: passed
Competency questions: passed
Citations: passed

Warnings:
- [citations/no-commit-cited] https://example.invalid/erden/demo#readmeObservation could not be fully checked: no-commit-cited

The warning is expected: the demo's evidence cites its README without naming a Git commit. Warnings don't fail a check.

Pack a release archive (optional)

erden pack builds the exact archive that publishing would upload, without contacting the registry. Go back to your ontologies folder first, because my-ontology is there:

cd ~/ontologies
erden pack 0.1.0 my-ontology

What you should see:

$ erden pack 0.1.0 my-ontology
Packed @example/project@0.1.0 (https://example.invalid/erden/project)
Output: ~/ontologies/example-project-0.1.0.erdenpkg (written; clean)
Archive SHA-256: 7a75f09ef03b296f1137353120a1c271d24e18243fd97ecb96ad81f3a9e0b78e
Archive bytes: 7703; files: 3; direct dependencies: 0

The archive lands next to the project folder, not inside it. Packing the same files again gives the same SHA-256.

What the result means

Exit codeMeaning
0Passed. Warnings may still be listed.
1A semantic failure: a stage found a real problem in the ontology, or refused shapes it cannot check.
2A usage mistake: a wrong command, flag, or path.
3An operational problem: for example, a file could not be read.

Add --json to any of these commands for machine-readable output.

If it looks different

erden init says the target already exists

erden init never overwrites. Pick a new folder name, or delete the old folder first.

A stage says failed

The lines under the stage list name the problem, for example [core] borrowed term lacks a declaration: …. Fix the named file and run erden check again.

The check could not complete, or reasoning failed with budget-exhausted

The first line names a code. When a check is refused explains each one: the reasoner's time and size limits, statements it does not reason over yet, refused source files, unsupported computers, and an interrupted install.

Citations warns not-in-git instead of no-commit-cited

Both are fine. not-in-git means the project folder is not inside a Git repository, so the cited file's history could not be checked.

Next

On this page