Basic ATproto labeler and a toolkit to make your own
This is an implementation of a basic labeler. It does not have any UI and does not impose any workflow on you. Labels can be created via an API, or any other way you implement.
example.env
to .env
and at the very least uncomment and edit DATA_DIR
variable there.example_config.yaml
to config.yaml
. Generate and put there a private key. Edit or simply remove everything after the line with the private key.docker compose up --build -d
Congratulations! You've got yourself a perfectly useless labeler :) (by default there's no way to create any labels)
Copy docker-compose.override.example.yaml
to docker-compose.override.yaml
and run docker compose up -d
.
Now you can create labels by sending them as a POST request to http://127.0.0.1:8081/label, e.g.:
curl -X POST --json '{"uri": "did:plc:foobar","val": "!hide"}' http://127.0.0.1:8081/label
Note that there's no authentication whatsoever, so you should not expose this port to outside world. This API is intended only as an example. If you insist on using it anyway - at least put it behind a reverse proxy with authentication.
For someone to be able to subscribe to your labeler and see the labels, two things need to happen:
did
, password
, private_key
and endpoint
set in your config.docker compose exec labeler ./update-plc --config=/config.yaml
.--token
flaglabeler
and list-labeler
automatically do it at startup. Just make sure that in your config
you have labels
set up the way you want them, and that did
and password
are specified too.
[!WARNING] This wasn't tested yet on any live instance, please report any issues if you do this.
[!WARNING] I reiterate - there's no web UI of any kind in this repo, you need to bring your own before switching from Ozone if you plan to do any manual labeling.
cmd/clone
implements making a copy of a labeler with the same sequence numbers, so cursor values
any consumers have will remain valid and point to the same data.
docker compose run --entrypoint=./clone labeler --config=/config.yaml --from=https://your.ozone.instance
docker compose up -d
There's an implementation of a labeler that takes a list and converts it into a label in cmd/list-labeler
directory.
lists
entry to your config file. It should be a mapping from label name to a list URI.docker-compose.override.example.yaml
to docker-compose.override.yaml
, if you haven't yet.entrypoint
line and comment out admin API from both ports
and command
sections.did
and password
set in your config file.docker compose up -d
.One caveat is that it uses app.bsky.graph.getList
call to fetch the list members. Due to that, if someone blocks your account - they won't be returned in the response and list-labeler
would think that they have been removed from the list.
You can use cmd/labeler
as a starting point for implementing your own labeler. You don't necessarily even need to fork this repo. Just copy cmd/labeler/main.go
and import bsky.watch/labeler
module.
Go source code for Bluesky's atproto services.
A simplified JSON event stream for AT Proto
ATproto PDS indexer
Simple golang firehose for Bluesky.
Bluesky Bot library in Go
A minimal implementation of a BlueSky Feed Generator in Go
Your Brand Here!
50K+ engaged viewers every month
Limited spots available!
📧 Contact us via email🦋 Contact us on Bluesky