🚀 xeto.dev is coming soon  — Follow our progress and be the first to know at launch.
SDKs Java Python JavaScript TypeScript
⌨️ CLI Tool

Build with Xeto

The Xeto SDK family lets you load, validate, traverse, and serialize Xeto libraries and specs directly in your language of choice. Parse typed ontologies, resolve dependency graphs, and query specs — all from native code. SDKs are currently in development and will be released alongside the xeto.dev registry launch.

Java SDK

Full-featured Xeto runtime for JVM applications

v0.4.0-alpha
Coming Soon
<!-- pom.xml --> <dependency> <groupId>dev.xeto</groupId> <artifactId>xeto-java</artifactId> <version>0.4.0-alpha</version> </dependency>
// Load a library and query specs import dev.xeto.sdk.*; XetoEnv env = XetoEnv.load("project-haystack:3.9.13"); XetoLib lib = env.lib("project-haystack"); // Iterate all specs lib.specs().each(spec -> { System.out.println(spec.name() + " extends " + spec.base()); }); // Validate data against a spec Dict site = Dict.of("dis", "Main Campus", "tz", "New_York"); env.validate(lib.spec("Site"), site);
MethodDescription
XetoEnv.load(libRef)Load a library and its full dependency graph
env.lib(name)Get a loaded library by name
lib.specs()Iterate all top-level specs in the library
lib.spec(name)Look up a spec by name
env.validate(spec, data)Validate a Dict against a spec, returns ValidationResult
spec.slots()List all slot definitions on a spec
🐍

Python SDK

Lightweight Xeto library for Python 3.10+

v0.2.1-alpha
Coming Soon
pip install xeto-python
from xeto import XetoEnv # Load library from registry env = XetoEnv.load("project-haystack:3.9.13") lib = env.lib("project-haystack") # List all spec names for spec in lib.specs(): print(f"{spec.name} extends {spec.base}") # Validate a dict against the Site spec site_data = {"dis": "Main Campus", "tz": "America/New_York"} result = env.validate("Site", site_data) if result.is_valid: print("Valid site!")
MethodDescription
XetoEnv.load(lib_ref)Load a library by name and version string
env.lib(name)Get a library object by name
lib.specs()Returns an iterable of Spec objects
env.validate(spec_name, data)Validate a dict against a named spec
spec.slotsDict of slot name → SlotDef
🟨

JavaScript SDK

Browser and Node.js compatible Xeto runtime

v0.3.0-alpha
Coming Soon
npm install @xeto/sdk
import { XetoEnv } from '@xeto/sdk'; // Load library (async — fetches from registry) const env = await XetoEnv.load('project-haystack:3.9.13'); const lib = env.lib('project-haystack'); // Get a spec and inspect its slots const site = lib.spec('Site'); site.slots().forEach(slot => { console.log(`${slot.name}: ${slot.type}`); }); // Validate data const result = env.validate('Site', { dis: 'HQ', tz: 'UTC' }); console.log(result.valid); // true
MethodDescription
XetoEnv.load(libRef)Async — fetches and loads a library from the registry
env.lib(name)Get a loaded library instance
lib.spec(name)Look up a spec by name, returns Spec | null
spec.slots()Returns array of SlotDef objects
env.validate(specName, data)Validate a plain object against a spec
🔷

TypeScript SDK

Fully typed Xeto client with generated type definitions

v0.3.0-alpha
Coming Soon
npm install @xeto/sdk # TypeScript types are bundled — no @types package needed
import { XetoEnv, Spec, SlotDef, ValidationResult } from '@xeto/sdk'; // Full TypeScript types on all SDK objects const env: XetoEnv = await XetoEnv.load('project-haystack:3.9.13'); const spec: Spec = env.lib('project-haystack').spec('Site')!; // Generate TypeScript interfaces from specs: // xeto codegen --lib project-haystack --out ./types/ // Example generated output: interface Site { dis: string; geoAddr?: string; area?: number; tz: string; }
✦ TypeScript Codegen — The TS SDK includes a code generator that produces native TypeScript interfaces from any Xeto spec library, so your data models stay in sync with the registry automatically.
⌨️

CLI Tool

Install, validate, and manage Xeto libraries from the terminal

Coming Soon
# Install the CLI npm install -g @xeto/cli # Install a library xeto install project-haystack # Search the registry xeto search "building automation" # Validate a xeto file xeto validate ./my-library.xeto # Publish a library xeto publish # Generate TypeScript types from a spec library xeto codegen --lib project-haystack --lang ts --out ./types/