Mass Block [bsky] Reposts [and more]

Files
README.md

MBR #

This is a personal CLI tool I've used to block any of reposts, quotes, replies, likes, and post author's followers and following. It can also add those accounts to a specific list you own, or unblock them. It uses oauth for authentication and batches writes (accidentally banned my PDS on relays for not doing this oops).

Using #

You can run this with Bun 1.4.2+ or Node 22+. The release executable should be standalone with no needed dependencies.

The way I run it is by doing:

bun install --frozen-lockfile
bun start

With Node: use npm ci, then either npm run start:node or node index.js.

This script is interactive

For several posts at once, choose multiple posts, then paste the links one per line, then press Tab and then Enter. Space-separated links and at:// post URIs also work.

To add people to a specific existing list, you can choose add accounts to a list and select one of your lists, or pass its URL directly:

bun index.js --list 'https://bsky.app/profile/you.bsky.social/lists/your-list-rkey'
# To preview candidates and save their DIDs without writing anything:
node index.js --list 'at://did:plc:your-did/app.bsky.graph.list/your-list-rkey' --dry-run --output candidates.txt

The destination has to be a moderation list or user list owned by the account you sign in as. Current list members and your own account are skipped.

OAuth permissions are requested only the selected operation: repo:app.bsky.graph.block?action=create for blocks, repo:app.bsky.graph.block?action=delete for unblocks, and repo:app.bsky.graph.listitem?action=create for list additions. Switching operations may require reauthorization. Dry runs don't authenticate or write records.

Reset of the options you can run it with:

mbr: interactively block, unblock, or list engagement on an atproto post or profile

usage:
  mbr [options]
  bun start [options]
  bun index.js [options]
  node index.js [options]

options:
  --delay <ms>       delay between batches in ms (default: 150)
  --batch <n>        writes per applyWrites call, 1–200 (default: 200)
  --dry-run          show candidates without writing records or authenticating
  --no-block-target  exclude all target accounts (also in list/unblock mode)
  --output <file>    write candidate DIDs to file (one per line)
  --unblock          remove blocks instead of adding them
  --list <URL/URI>   add accounts to an existing list you own instead of blocking
  -v, --version      show the version
  -h, --help         show this help

Note: if blocking doesn't work right, try setting it to a lower value. From what I know, bsky mushroom PDSs (if you don't know what a PDS is you're probably on one of these) have much lower limits for writes.

Configuration #

There's no config file, but there are a couple environment variables

env var info default
CONSTELLATION_BASE constellation instance to use https://constellation.microcosm.blue
SLINGSHOT_BASE slingshot instance to use https://slingshot.microcosm.blue
XDG_STATE_HOME base directory for cached OAuth sessions ~/.local/state

Sessions are saved in mbr/sessions.json in the state directory.