Biook#
Automatically update your Bluesky bio with your currently reading books from Hardcover.
What it does#
- Fetches your 3 most recently updated books from Hardcover
- Updates a "Currently Reading" section in your Bluesky bio
- Runs hourly via cron (only updates when your reading list changes)
Setup#
Prerequisites#
- Node.js 18+
- A Hardcover account with API token
- A Bluesky account
Installation#
- Clone the repo:
git clone https://tangled.org/modamo.xyz/biook
cd biook
npm install
- Create a
.envfile:
HARDCOVER_TOKEN="your_hardcover_token_here"
IDENTIFIER="did:plc:yourDID"
PASSWORD="your-app-password"
PDS_URL="https://blacksky.app"
-
Get your Hardcover API token:
- Go to Hardcover API
- Copy the value in the first text field box, the string after "Bearer"
- Replace "your_hardcover_token_here" with that value
-
Get your Bluesky Identifier:
- Clicking on the Profile tab in Bluesky will direct you to your profile
- In the URL bar, copy the part after profile/
- Replace "did:plc:yourDID"
-
Get your Bluesky App Password:
- On Bluesky, click Settings in the sidebar
- Click Privacy and Security
- Click App passwords
- Click "+ Add App Password"
- (Optional) Name it biook
- Click Next
- Copy the value
- Replace "your-app-password"
-
Get your PDS URL
- Most users are on https://bsky.social (the default)
- If you're self-hosting or using an alternative PDS like https://blacksky.app, use that instead
- If unsure, use https://bsky.social
-
Build and test:
npx tsc
node script.js
Running with PM2 (recommended)#
pm2 start script.js --name biook --cron "0 * * * *"
pm2 save
pm2 startup
Bio Format#
The script looks for and updates a section like:
Currently Reading
📚
Book Title by Author Name
Another Book by Another Author
📚
If this section doesn't exist, it will be added to the end of your bio.
License#
MIT