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.
| Surface | Page |
|---|---|
schema CLI | From the CLI |
| TypeScript SDK | From TypeScript |
| Python SDK | From Python |
| Rust SDK | From Rust |
| Haskell SDK | From Haskell |
| Swift SDK | From 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
- Reference: protocol catalog for the list of supported protocols.
- Schemas as theories for the model.