···5566- `cmd/bigsky`: BGS+indexer daemon
77- `cmd/gosky`: client CLI for talking to a PDS
88-- `cmd/lexgen`: codegen tool for lexicons (Lexicon JSON to golang package)
88+- `cmd/lexgen`: codegen tool for lexicons (Lexicon JSON to Go package)
99- `cmd/laputa`: PDS daemon
1010- `cmd/stress`: connects to local/default PDS and creates a ton of random posts
1111- `cmd/beemo`: slack bot for moderation reporting (Bluesky Moderation Observer)
···6363 go run ./gen
64646565To run codegen for new or updated Lexicons, using lexgen, first place (or git
6666-checout) the JSON lexicon files at `../atproto/`. Also, install the `goimports`
6767-tool. Then, in *this* repository (indigo), run commands like:
6666+checkout) the JSON lexicon files at `../atproto/`.
6767+Then, in *this* repository (indigo), run commands like:
68686969 go run ./cmd/lexgen/ --package bsky --prefix app.bsky --outdir api/bsky ../atproto/lexicons/app/bsky/
7070 go run ./cmd/lexgen/ --package atproto --prefix com.atproto --outdir api/atproto ../atproto/lexicons/com/atproto/
···7272You may want to delete all the codegen files before re-generating, to detect deleted files.
73737474It can require some manual munging between the lexgen step and a later `go run ./gen` to make sure things compile at least temporarily; otherwise the `gen` will not run.
7575+In some cases, you might also need to add new types to ./gen/main.go.
75767677To generate server stubs and handlers, push them in a temporary directory
7778first, then merge changes in to the actual PDS code:
···180181 # create posts, including mentions and image uploads
181182 go run ./cmd/fakermaker/ gen-posts
182183183183- # create more interations, such as likes, between accounts
184184+ # create more interactions, such as likes, between accounts
184185 go run ./cmd/fakermaker/ gen-interactions
185186186187 # lastly, read-only queries, including timelines, notifications, and post threads
+1-1
Makefile
···5656 go build ./...
57575858.PHONY: lexgen
5959-lexgen: ## Run syntax re-formatting (modify in place)
5959+lexgen: ## Run codegen tool for lexicons (lexicon JSON to Go packages)
6060 go run ./cmd/lexgen/ --package bsky --prefix app.bsky --outdir api/bsky $(LEXDIR)
6161 go run ./cmd/lexgen/ --package atproto --prefix com.atproto --outdir api/atproto $(LEXDIR)
6262