Stencila Schema

Build Code coverage Netlify Docs Community

This repository aims to document, and provide reference implementations for, the schemas, protocols and other specifications used in Stencila.

As much as possible, we use existing specifications, and avoid defining any new ones. External specifications that we currently use, or plan to use, include Apache Avro, JSON-LD, JSON-RPC, JSON-Schema,, BioSchemas, CodeMeta and OpenSchemas. In many ways, this repository simply documents how these existing standards are utilised within Stencila.


Documentation is available at

Language Specific Packages

Stencila Schema supports Python, R, and TypeScript with their respective packages. Depending on the language capabilities, these packages expose type definitions as well as utility functions for constructing valid Stencila Schema nodes. Each packages has its own documentation auto-generated, and they can be found at:

JSON Schema definitions

JSON Schemas are defined in the schema directory.

JSON-LD context

A JSON-LD @context is generated from the JSON Schema sources is available at

Typescript type definitions

Typescript type definitions are generated from the JSON Schema sources and can be used by installing the Node.js package:

npm install @stencila/schema --save

Available types

Schemas marked with “U” are considered unstable and have a higher likelihood of changes.