bsctl - A CLI to build collaborative feeds for Bluesky
The purpose of bsctl is to foster micro-communities on Bluesky by making it easy
for communities to collaboratively create and manage feeds that
discover and rank posts relevant to their communities.
bsctl makes it easy to define feeds in GitHub so that communities can
leverage GitHub for collaboration.
The Feed Algorithm
The current feed algorithm is pretty simple.
-
The feed retrieve the posts for all handles in a list
-
We filter the posts down to only show posts that include a keyword
- These keywords are stored in GitHub
How to Collaborate On Feeds
To collaborate on feeds we store the source of truth for both the list of handles and the keywords in GitHub.
bsctl provides a CLI to make it easy to
- Sync the list of handles from GitHub to a bluesky list
- Dump the keywords so they can easily be copied into Bluesky Feed Creator
There are two ways to collaborate and improve the algorithm
- Contribute a PR to update the list of handles or keywords
- Contribute code to bsctl to improve the algorithm programmatically.
How To Setup A New Feed
-
Create a GitHub Repository and create two YAML files
- To define the list of handles
- To define the keywords
-
Use Blusesky feed creator to create the feed
-
Use bsctl to sync the list of handles and keywords to Bluesky
-
Use bsctl to dump the keywords to stdout and then copy and past them into Bluesky Feed Creator
Rather than manually curating a list of handles, we can use algorithms to identify community members.
The algorithm is very simple
- Take a set of seed handles
- Fetch the profile for everyone who follows those accounts
- Use an LLM to decide whether the profile satisfies some criterion
To use this functionality define a CommunityBuilder
resource in a YAML file like the one below.
apiVersion: "bsctl.dev/v1alpha1"
kind: "CommunityBuilder"
metadata:
labels: {}
name: PlatformCommunity
definition:
name: Platform Engineer
criterion:
- They are working on an internal developer platform
- They describe their job role as platform engineer, ml platform engineer, devops, infrastructure engineer or SRE
- They work with technologies used to build platforms; eg. kubernetes, cloud, argo
- They describe practices central to platform engineering; e.g. IAC, configuration, containers, gitops, cicd
examples:
- profile: I'm a platform engineer at acme.co
member: true
explanation: ""
seeds:
- handle: kelseyhightower.com
did: ""
outputFile: /Users/jlewi/git_bskylists//Users/jlewi/git_bskylists/kelseyhightower.followers.platformengineering.yaml
-
Everything in the definition
section is used as input to the LLM Prompt
-
To perform the graph walk first configure your OpenAI APIKey
bsctl config set openai.apiKeyFile=/path/to/openai/apikey
-
You can then perform the graph walk using the CLI
bsctl apply /path/to/your/community.yaml
-
This will write the results to the outputFile you specified
-
The output will contain an AccountList that tells you
- Whether the account is a member of the community
- A reason for the decision
-
For an example of the output see [kelseyhightower.followers.platformengineering.yaml]
License
MIT
Acknowledgement
Originally based on mattn/bsky.
The purpose of this fork is to make the CLI runnable as a client side
web application using WebAssembly and
goapp.