OntoCode
OntoCode brings OWL/RDF ontology editing into VS Code and Git — browse classes, edit Turtle, run EL reasoning, and validate in CI without Protégé.
OntoIndex is the Rust engine behind it: a local CLI and language server that indexes your workspace and exposes SQL, SPARQL, and patch APIs.
Start here: Documentation — Start here · First success tutorial · cargo install ontoindex-cli. You do not need to clone this repo.
Naming: OntoCode is the VS Code extension (product UI). OntoIndex is the Rust engine (
ontoindexCLI,ontoindex-*crates,ontoindex-lsp). This repo contains both.
Documentation: Read the Docs — What ships today
Choose your path
Use the CLI (OntoIndex)
Note:
./fixturesexists only in a git clone. Aftercargo install, point at your own ontology folder (see getting started guide).
From a clone, cargo run -- runs the ontoindex binary (workspace default-member is ontoindex-cli):
Use VS Code (OntoCode Explorer)
- Install OntoCode from the Marketplace, or download a VSIX from GitHub Releases.
- Open a folder with
.ttl,.owl,.rdf, or other supported ontology files. - Use the OntoCode activity bar to browse entities, edit in the inspector, and open diagnostics.
Full install and troubleshooting: install guide. Editing guide: authoring guide.

Two-layer architecture
OntoCode is designed as two products that ship together:
| Layer | What it is | Status in v0.6.0 |
|---|---|---|
| OntoCode | VS Code extension (explorer, entity inspector, diagnostics, authoring, query workbench, Manchester editor, reasoner) | Shipping |
| OntoIndex | Rust library + CLI + LSP (scan, parse, catalog, query, validate, diagnostics, write-back, classify) | Shipping |
┌─────────────────────────────────────┐
│ OntoCode (v0.6.0) │
│ VS Code extension + explorer UI │
└─────────────────┬───────────────────┘
│ ontoindex-lsp (stdio)
┌─────────────────▼───────────────────┐
│ OntoIndex (v0.6.0) │
│ Rust index, catalog, query, CLI, LSP │
└─────────────────┬───────────────────┘
│ Oxigraph / Horned-OWL / OntoLogos
┌─────────────────▼───────────────────┐
│ Your ontology repo │
│ .ttl .owl .rdf .jsonld … │
└─────────────────────────────────────┘
OntoIndex is useful on its own today (CLI, CI, local analysis). The extension calls into the same engine via a language server rather than reimplementing ontology logic in TypeScript.
What ships in v0.6.0
See the full capability matrix: What ships today (updated each release).
Earlier releases: Changelog · CHANGELOG.md on GitHub.
Why OntoCode?
Protégé is strong for traditional ontology editing, but most engineering teams live in Git, pull requests, and VS Code. OntoCode targets that workflow:
| Shipped in v0.6 | Planned (v1.0 target) |
|---|---|
| Browse ontologies in VS Code | Full OWL 2 DL axiom catalog |
| Entity inspector with edit labels, parents, create/delete | Multi-format write-back |
| Query workbench (SQL + SPARQL) in VS Code | Inline SQL/SPARQL editor autocomplete |
| Manchester editor (complex subclass + equivalent) | Full Manchester catalog (disjoint, chains, …) |
| EL/RL/RDFS reasoning + inferred hierarchy | Full OWL 2 DL reasoning (dl / auto) |
| EL explanations (where OntoLogos supports) | Full DL clash-trace explanations |
Patch write-back for Turtle (.ttl) |
OBO format + ROBOT interop |
| Horned-OWL catalog for Turtle axioms | Semantic Git diff, LSP completion/rename |
| Inline diagnostics (Problems panel + explorer) | SHACL validation (rudof) |
ontoindex validate, classify, and patch for CI |
ontologos-watch hook |
| SQL-like and SPARQL queries via CLI and LSP |
Long-term goal: Protégé-competitive OWL 2 DL + OBO maintenance in VS Code — see Protégé parity checklist.
Quick start
See Start here or First success in 10 minutes for the canonical onboarding path.
# From a git clone
# Installed CLI (use your ontology path, not ./fixtures)
Reasoning (v0.6)
- EL / RL / RDFS classification via OntoLogos 0.9.0
- CLI:
ontoindex classify,ontoindex explain - LSP:
ontoindex/runReasoner,ontoindex/getExplanation - Explorer hierarchy mode: asserted / inferred / combined
See reasoner guide. DL and auto profiles require OntoLogos 1.0.
Coming in v0.7+
The extension is a thin TypeScript shell over ontoindex-lsp and the OntoIndex crates — not a second ontology stack. v0.7a introduces a React + Vite webview layer for panels (inspector, query workbench, graphs, reasoner); see React UI integration plan.
Roadmap
| Version | Deliverable |
|---|---|
| v0.1 | OntoIndex: scanner, parser, catalog, CLI |
| v0.2 | VS Code extension, explorer, entity inspector, LSP |
| v0.3 | Ontology diagnostics (Problems panel, validate) |
| v0.4.0 | Write-back — Turtle patches, Horned-OWL catalog, editable inspector |
| v0.6.0 (current) | Reasoning — OntoLogos EL/RL/RDFS, inferred hierarchy, explanations |
| v0.7a | React webview foundation — Vite, typed message protocol, CSP |
| v0.7–v0.7b | Graphs (React) + OBO/ROBOT interop |
| v0.8–v0.9 | Full Manchester, refactoring, semantic diff (React panels); ontologos-watch hook |
| v1.0 | Protégé-competitive OWL + OBO in VS Code — DL via OntoLogos 1.0.0, React UI hardening (parity checklist) |
See roadmap, product plan, and Protégé parity checklist for the full product plan.
Built on
OntoIndex delegates to mature Rust libraries — see dependency matrix.
| Layer | Crates | Crate |
|---|---|---|
| RDF / SPARQL | Oxigraph | ontoindex-parser, ontoindex-query |
| SQL queries | sqlparser | ontoindex-query |
| OWL axioms / write-back | horned-owl, horned-functional | ontoindex-owl |
| Reasoning | OntoLogos | ontoindex-reasoner |
| OBO (planned) | fastobo | planned v0.7b |
| LSP | lsp-server, lsp-types | ontoindex-lsp |
Policy: ADR-0016. Third-party licenses (including LGPL for horned-owl): LICENSES.
Repository layout
crates/
├── ontoindex-core # types, workspace scanner
├── ontoindex-parser # RDF parsing and entity extraction
├── ontoindex-owl # Horned-OWL facade, patch write-back, Manchester (v0.5)
├── ontoindex-catalog # index builder and semantic catalog
├── ontoindex-diagnostics # lint rules and diagnostic collection
├── ontoindex-query # SQL-like and SPARQL engines
├── ontoindex-reasoner # OntoLogos EL/RL/RDFS classification (v0.6)
├── ontoindex-cli # `ontoindex` binary
└── ontoindex-lsp # language server for OntoCode
extension/ # VS Code extension (OntoCode Explorer)
fixtures/ # sample ontology for tests
scripts/ # extension packaging helpers
docs/ # user guides (install, SQL, LSP API)
docs/design/ # product specs, ADRs, wireframes, backlog
examples/ # Rust examples and query cookbook
tests/ # integration and golden snapshot tests
Virtual tables
| Table | Description |
|---|---|
ontologies |
Indexed ontology documents |
classes |
OWL/RDFS classes |
object_properties |
OWL object properties |
data_properties |
OWL datatype properties |
annotation_properties |
OWL annotation properties |
individuals |
OWL named individuals |
entities |
All extracted entities |
annotations |
Label/comment and other annotation triples |
axioms |
Extracted axioms (e.g. SubClassOf) |
namespaces |
Namespace prefixes |
imports |
Ontology imports |
diagnostics |
Lint and parse diagnostics |
properties |
Union of all property kinds |
Column schemas: SQL reference. SPARQL: SPARQL reference. LSP methods: LSP API. Workspace limits: workspace limits.
API stability (pre-1.0)
Published ontoindex-* crates are at 0.6.x. Library APIs, LSP wire JSON, and SQL virtual
table columns may change between minor releases until v1.0 stable core
is complete. The CLI validate and classify exit codes are documented in
workspace limits.
Development
See CONTRIBUTING.md or the contributing guide. Quick checks:
&& &&
Update golden snapshots:
ONTOINDEX_UPDATE_GOLDEN=1
Installing from releases
Pre-built artifacts on GitHub Releases:
ontoindexCLI (Linux x64)ontoindex-lspper platform (Linux, macOS, Windows)ontocode-*.vsix(VS Code extension)
Verify downloads: release integrity. Maintainer release process: releasing guide.
Workspace crates publish to crates.io on each v0.6.x release tag: ontoindex-core, ontoindex-parser, ontoindex-owl, ontoindex-diagnostics, ontoindex-catalog, ontoindex-query, ontoindex-reasoner, ontoindex-lsp, ontoindex-cli.
See CHANGELOG.md for release notes. Security: security policy.
License
MIT OR Apache-2.0. Third-party licenses: LICENSES.