{"id":24505504,"url":"https://github.com/thatonecalculator/coffee-labeler","last_synced_at":"2025-06-14T03:07:15.764Z","repository":{"id":263650620,"uuid":"891059939","full_name":"ThatOneCalculator/coffee-labeler","owner":"ThatOneCalculator","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-19T17:39:36.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T19:41:02.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThatOneCalculator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"aliceisjustplaying","buy_me_a_coffee":"aliceisjustplaying"}},"created_at":"2024-11-19T16:51:08.000Z","updated_at":"2025-03-20T22:58:04.000Z","dependencies_parsed_at":"2024-11-19T18:19:01.341Z","dependency_job_id":"de643a92-6c0b-44e2-949e-d16a839e7891","html_url":"https://github.com/ThatOneCalculator/coffee-labeler","commit_stats":null,"previous_names":["thatonecalculator/coffee-labeler"],"tags_count":0,"template":false,"template_full_name":"aliceisjustplaying/labeler-starter-kit-bsky","purl":"pkg:github/ThatOneCalculator/coffee-labeler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatOneCalculator%2Fcoffee-labeler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatOneCalculator%2Fcoffee-labeler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatOneCalculator%2Fcoffee-labeler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatOneCalculator%2Fcoffee-labeler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThatOneCalculator","download_url":"https://codeload.github.com/ThatOneCalculator/coffee-labeler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThatOneCalculator%2Fcoffee-labeler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259752078,"owners_count":22905972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T23:30:09.027Z","updated_at":"2025-06-14T03:07:15.741Z","avatar_url":"https://github.com/ThatOneCalculator.png","language":"TypeScript","funding_links":["https://github.com/sponsors/aliceisjustplaying","https://buymeacoffee.com/aliceisjustplaying"],"categories":[],"sub_categories":[],"readme":"# Bluesky Labeler Starter Kit\n\nUse this repository to get started with your own Bluesky Labeler. Click the \"Use this template\" button above to create a new repository, and then follow the instructions below.\n\nAs an example, this repository includes a labeler for setting your favorite of the five elements (Earth, Fire, Air, Water, Love) to your profile. You can edit the labels, descriptions, and other parameters in the `src/constants.ts` file.\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) 21 or later\n- [Bun](https://bun.sh/)\n\n## Setup\n\nClone the repo and run `bun i` to install the dependencies. This project uses [Bun](https://bun.sh/) for package management.\n\nRun `bunx @skyware/labeler setup` to convert an existing account into a labeler. You can exit after converting the account; there's no need to add the labels with the wizard. We'll do that from code.\n\nCopy the `.env.example` file to `.env` and fill in the values:\n\n```Dotenv\nDID=did:plc:xxx\nSIGNING_KEY=xxx\nBSKY_IDENTIFIER=xxx\nBSKY_PASSWORD=xxx\nPORT=4100\nMETRICS_PORT=4101\nFIREHOSE_URL=wss://jetstream.atproto.tools/subscribe\nCURSOR_UPDATE_INTERVAL=10000\n```\n\nA `cursor.txt` file containing the time in microseconds also needs to be present. If it doesn't exist, it will be created with the current time.\n\nFill out the label IDs, names, descriptions etc. in `src/constants.ts` to your heart's desire. Run `bun set-posts` to create/update all posts at once, then copy/paste the related post rkeys ([record keys](https://atproto.com/specs/record-key)) into `src/constants.ts`. Run `bun set-labels` to create/update all labels at once.\n\nAlternatively, create the posts by hand, edit `src/constants.ts` and use `bunx @skyware/labeler label add` to add the labels.\n\nThe server connects to [Jetstream](https://github.com/bluesky-social/jetstream), which provides a WebSocket endpoint that emits ATProto events in JSON. There are [many public instances](https://github.com/bluesky-social/jetstream/blob/main/README.md#public-instances) available:\n\n| Hostname                          | Region  |\n| --------------------------------- | ------- |\n| `jetstream1.us-east.bsky.network` | US-East |\n| `jetstream2.us-east.bsky.network` | US-East |\n| `jetstream1.us-west.bsky.network` | US-West |\n| `jetstream2.us-west.bsky.network` | US-West |\n\nThe server needs to be reachable outside your local network using the URL you provided during the account setup (typically using a reverse proxy such as [Caddy](https://caddyserver.com/)):\n\n```Caddyfile\nlabeler.example.com {\n\treverse_proxy 127.0.0.1:4100\n}\n```\n\nMetrics are exposed on the defined `METRICS_PORT` for [Prometheus](https://prometheus.io/). [This dashboard](https://grafana.com/grafana/dashboards/11159-nodejs-application-dashboard/) can be used to visualize the metrics in [Grafana](https://grafana.com/grafana/).\n\nStart the project with `bun run start`.\n\nYou can check that the labeler is reachable by checking the `/xrpc/com.atproto.label.queryLabels` endpoint of your labeler's server. A new, empty labeler returns `{\"cursor\":\"0\",\"labels\":[]}`.\n\n## Credits\n\n- [alice](https://bsky.app/profile/did:plc:by3jhwdqgbtrcc7q4tkkv3cf), creator of the [Zodiac Sign Labels](https://github.com/aliceisjustplaying/zodiacsigns)\n- [Juliet](https://bsky.app/profile/did:plc:b3pn34agqqchkaf75v7h43dk), author of the [Pronouns labeler](https://github.com/notjuliet/pronouns-bsky), whose code my labelers were originally based on\n- [futur](https://bsky.app/profile/did:plc:uu5axsmbm2or2dngy4gwchec), creator of the [skyware libraries](https://skyware.js.org/) which make it easier to build things for Bluesky\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatonecalculator%2Fcoffee-labeler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatonecalculator%2Fcoffee-labeler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatonecalculator%2Fcoffee-labeler/lists"}