Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Define a schema

Choose a surface according to where the schema enters the project. The CLI loads and inspects schema files; the five SDKs construct schemas inside an application.

SurfacePage
schema CLIFrom the CLI
TypeScript SDKFrom TypeScript
Python SDKFrom Python
Rust SDKFrom Rust
Haskell SDKFrom Haskell
Swift SDKFrom Swift

The CLI’s schema-checking commands currently accept panproto’s internal schema JSON and resolve only the atproto protocol. Its shared loaders can parse an ATProto Lexicon when a manifest selects atproto, and its full-AST commands parse supported source files as syntax trees. Use a language SDK’s parseSchemaDocument or parseSchemaSource dispatch for the other external schema languages in the protocol catalog. Start with a language SDK when the application constructs the schema programmatically.

See also