Skip to content

Repository files navigation

Pronoun Picker

Pronoun Picker is a Bluesky Jetstream consumer that automatically assigns pronoun labels to users based on their interactions (likes) with specific "anchor" posts. It allows users to self-identify by liking a post corresponding to their pronouns.

Features

  • Jetstream Integration: Efficiently consumes events from the Bluesky network.
  • Automated Labeling: Assigns labels via Ozone when a user likes a designated post.
  • Reset Functionality: Allows users to clear their pronoun labels by liking a specific reset post.
  • Docker Support: Easy deployment using Docker and Docker Compose.

Requirements

  • Node.js v20 or higher
  • npm or pnpm
  • A Bluesky account with labeling permissions (Ozone)
  • Access to a Bluesky Jetstream endpoint

Setup & Installation

  1. Clone the repository:

    git clone https://github.com/TheRipperoni/PronounPicker.git
    cd pronoun-picker
  2. Install dependencies:

    npm install
    # or
    pnpm install
  3. Configure environment variables: Copy the example environment file and fill in your details:

    cp .env.example .env

    See Environment Variables for details.

  4. Build the project:

    npm run build

Usage

Development

To run the project using tsx (direct TypeScript execution):

npm start

Production

After building the project:

node dist/index.js

Docker

You can also run the application using Docker:

docker-compose up -d

Scripts

  • npm start: Runs the application using tsx.
  • npm run build: Compiles TypeScript to JavaScript in the dist folder.
  • npm run lint: Runs ESLint for code quality.
  • npm run format: Formats code using Prettier.

Environment Variables

The following variables should be defined in your .env file:

Variable Description Example
JETSTREAM_SUBSCRIPTION_ENDPOINT Jetstream WebSocket endpoint wss://jetstream1.us-west.bsky.network/subscribe
JETSTREAM_SUBSCRIPTION_RECONNECT_DELAY Reconnect delay in ms 3000
AGENT_SERVICE Bluesky API service URL https://bsky.social
AGENT_IDENTIFIER Your bot's handle or DID bot.bsky.social
AGENT_PASSWORD Your bot's app password your-app-password
OZONE_SERVICE Ozone service URL https://ozone.bsky.social
DID The DID of the labeler did:plc:...
LOG_LEVEL Logging verbosity info

Note: Check src/subscription.ts for the mapping of post URIs to pronoun labels.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages