xschema

CLI Overview

Install and use the xschema command-line interface

The xschema CLI converts JSON Schema files into native validators for your target language. It handles schema discovery, fetching, bundling, and code generation.

Installation

TypeScript

bun add -g xschema
npm install -g xschema
pnpm add -g xschema
yarn global add xschema

Or run directly without installing:

bunx xschema generate
npx xschema generate
pnpm dlx xschema generate
yarn dlx xschema generate

Python

pip install xschema
uv tool install xschema
pipx install xschema

Go

go install github.com/xschemadev/xschema@latest

Version

Check the installed version:

xschema --version

Commands

CommandDescription
generateParse config files, convert schemas, output native validators
complianceRun JSON Schema Test Suite compliance tests for adapters

On this page