Skip to content

Install CLI & CI (detail)

Prefer the canonical Install page (extension first, optional CLI). This page is CLI/CI only.

IDE tutorial: First success (~10 min). Canonical product install: Install.

First cargo install or clone build

A cold Rust toolchain may take 15–30+ minutes to compile OntoCore on first run. The VS Code extension bundles ontocore-lsp and does not require Rust. Linux x64 CI should prefer the release tarball (CI integration) over cargo install.

Linux arm64 and non-x64

Prebuilt CLI tarballs are x86_64-unknown-linux-gnu only. On Linux arm64 (and other unsupported targets), use cargo install ontocore-cli --locked --version 0.26.2 or the language server bundled in the VSIX — see platform compatibility.

Install matrix (CLI)

Method Linux x64 macOS Windows Needs Rust?
cargo install ontocore-cli --locked --version 0.26.2 Yes Yes Yes Yes (1.88+)
Release CLI tarball (ontocore-v*-x86_64-unknown-linux-gnu) Yes No No No
Git clone + cargo run -- Yes Yes Yes Yes (1.88+)

SQL-like queries

ontocore query uses catalog SQL (subset) — single-table SELECT, limited WHERE. Not full SQL — see SQL reference and Known limitations.

Prerequisites

Path Requires
cargo install CLI Rust 1.88+; ~/.cargo/bin on your PATH
Git clone + cargo run Rust 1.88+
Release CLI binaries No Rust; Linux x64 only (download from GitHub Releases). macOS/Windows: use cargo install or the VS Code extension.

Native toolchain (when using cargo):

OS Extra requirement
Windows MSVC Build Tools (C++ workload) — linkers fail without them
macOS Xcode Command Line Tools: xcode-select --install
Linux Usually covered by distro build-essential / equivalent

After cargo install, ensure ~/.cargo/bin is on your PATH. If you see ontocore: command not found, run:

export PATH="$HOME/.cargo/bin:$PATH"

Add that line to your shell profile (~/.bashrc, ~/.zshrc, etc.) for persistence. If install fails with an MSRV error, run rustup update stable and confirm rustc --version is 1.88 or newer.

Clone + CLI (development)

git clone https://github.com/eddiethedean/ontocode.git
cd ontocode

# Sample fixture ontology (debug build is fine for smoke tests)
cargo run -- inspect fixtures
cargo run -- query fixtures "SELECT short_name, labels FROM classes"
cargo run -- validate fixtures

The fixtures/ directory is included in the repository for examples and tests.

cargo install (no clone)

cargo install ontocore-cli --locked --version 0.26.2

Version pinning: Always pin an exact release in CI with --version 0.26.2 (see TAGGED_RELEASE). Prefer --locked for reproducible crates.io installs — see API stability and release integrity. For a longer macOS/Windows walkthrough, see Install CLI.

Use your own ontology directory — there is no fixtures/ folder outside a clone:

ontocore inspect /path/to/your/ontologies
ontocore query /path/to/your/ontologies "SELECT * FROM classes"
ontocore validate /path/to/your/ontologies

Release binaries (no Rust)

CLI pre-builds are Linux x64 only. On macOS or Windows, use cargo install ontocore-cli or install the VS Code extension (bundled LSP). Full CI copy-paste: CI integration.

  1. Open GitHub Releases for the latest v0.26.x tag.
  2. Download ontocore-v<version>-x86_64-unknown-linux-gnu.tar.gz.
  3. Verify with SHA256SUMS — see release-integrity.md.
  4. Extract and run (replace 0.26.2 with your tag):
VERSION=0.26.2
ASSET="ontocore-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz"
BIN="ontocore-v${VERSION}-x86_64-unknown-linux-gnu"
tar xzf "${ASSET}"
chmod +x "${BIN}"
./"${BIN}" query /path/to/ontologies "SELECT * FROM classes"
./"${BIN}" validate /path/to/ontologies

Note: The extracted binary is versioned (not plain ontocore).

Air-gapped / offline CLI

  1. Download the Linux CLI tarball (and SHA256SUMS / NOTICES) from GitHub Releases on a connected machine.
  2. Transfer artifacts to the offline environment.
  3. Extract and run the versioned binary as above — see Enterprise deployment.

For offline extension install, see vscode-install.md.

Next steps

Goal Document
What ships today SHIPPED.md
CI validation ci-integration.md
SQL queries sql-reference.md · query cookbook
SPARQL sparql-reference.md
DL Query examples/dl-query.md
Plugins CLI examples/plugins.md
Patch / authoring patch-reference.md
LSP integration lsp-api.md
Troubleshooting troubleshooting.md · faq.md