···11+// Example lex-fetch configuration file
22+// This demonstrates the available source types and configuration options
33+44+// Output configuration (required)
55+output {
66+ // Where to save fetched lexicon JSON files
77+ lexicons "lexicons"
88+99+ // Where to generate Rust code
1010+ codegen "src"
1111+1212+ // Path to Cargo.toml for feature generation (optional)
1313+ // cargo-toml "Cargo.toml"
1414+1515+ // NOTE: root-module option is currently disabled due to issues when set to non-"crate" values
1616+ // It will always use "crate" as the root module name
1717+}
1818+1919+// Fetch ATProto and Bluesky lexicons from official repo
2020+// Higher priority (101) means these override conflicts from other sources
2121+source "atproto" type="git" priority=101 {
2222+ repo "https://github.com/bluesky-social/atproto"
2323+ pattern "lexicons/**/*.json"
2424+}
2525+2626+// Fetch lexicons from a Git repository
2727+source "my-lexicons" type="git" priority=100 {
2828+ repo "https://github.com/example/my-lexicons"
2929+3030+ // Optional: specific branch/tag/commit
3131+ // ref "main"
3232+3333+ // Glob pattern for finding lexicon files (defaults to **/*.json)
3434+ pattern "**/*.json"
3535+}
3636+3737+// Use local directory for custom/in-development lexicons
3838+source "local-dev" type="local" priority=200 {
3939+ path "./my-lexicons"
4040+4141+ // Optional pattern (omit to use **/*.json)
4242+ pattern "*.json"
4343+}
4444+4545+// Fetch from an AT Protocol endpoint (user's repo)
4646+source "custom-user" type="atproto" {
4747+ endpoint "did:plc:example123456789"
4848+4949+ // Optional: specific slice within their repo
5050+ // slice "app.example.slice"
5151+}
5252+5353+// Fetch from HTTP endpoint returning lexicon array
5454+// source "http-lexicons" type="http" {
5555+// url "https://api.example.com/lexicons"
5656+// }
5757+5858+// Fetch from network.slices
5959+// source "slices-example" type="slices" {
6060+// slice "at://did:plc:example/network.slices.slice/record123"
6161+// }
6262+6363+// Load a single JSON file containing multiple lexicons
6464+// source "single-file" type="jsonfile" {
6565+// path "./lexicons-bundle.json"
6666+// }
6767+6868+// Priority notes:
6969+// - Higher numbers override lower numbers when lexicons conflict
7070+// - Useful for preferring official schemas over community forks
7171+// - Default priority if not specified: 50