Publishing Lexicons

Sharing your lexicons with the world

Using goat

Lexicons are designed to be machine-readable and network-accessible. While it is not currently required that a lexicon is available on the network, it is strongly advised to publish lexicon so that a single canonical & authoritative representation is available to consumers of the method.

You can use goat, our command line tool, for creating and publishing Lexicons. The Lexicon-related features are available under goat lex :

  • publishing schemas to and synchronizing from the AT network
  • diffing, linting, and verifying schema evolution rules

goat can be installed from Homebrew on macOS and Linux:

brew install goat

In a project directory, you can download some existing Lexicons, which will get saved as JSON files in ./lexicons/:

$ goat lex pull com.atproto.repo.strongRef com.atproto.moderation. app.bsky.actor.profile
 🟢 com.atproto.repo.strongRef
 🟢 com.atproto.moderation.defs
 🟢 com.atproto.moderation.createReport
 🟢 app.bsky.actor.profile

You can also create a new Lexicon record with goat lex new record:

$ goat lex new record dev.project.thing

$ open ./lexicons/dev/project/thing.json

And eventually publish it with goat lex publish:

$ goat lex publish
 🟢 dev.project.thing

Refer to the Lexicon Style Guide for guidance on creating new Lexicons.

Further Reading and Resources