bsky-tldr
v3.0.2
Published
A JavaScript package for creating daily summaries of Bluesky posts for those you follow.
Maintainers
Readme
bsky-tldr
Retrieve your daily Bluesky feed as simplified JSON, perfect for building feed readers or AI-powered summarization tools.
For example Building an MCP Server to Explore My Bluesky Feed with code available at https://github.com/briangershon/bluesky-daily-mcp.
Features
- Posts are retrieved for a specific day, with ability to specify the timezone offset.
- Posts from Bluesky feed are in a simplified JSON format.
- API:
retrieveFollows()retrieves follows from an author.retrieveAuthorFeed()retrieves posts from an author, for a specific day.uriToUrlconverts a post uri to a public url to view post on the web.
Information returned for each post:
{
"uri": "at://did:plc:oeio7zuhrsvmlyhia7e44nk6/app.bsky.feed.post/3lgzvm46vhu2c",
"content": "TIL about process.exitCode = 1;\n\nUseful if you want to mark a process as failed without immediately exiting it",
"createdAt": "2025-01-31T11:32:00.769Z",
"isRepost": false,
"links": ["https://example.com"]
}How to integrate into your own project
Walk through the working code that retrieves posts for follows in ./scripts/retrieve-posts.ts.
How to run it:
- Create a new App password in Bluesky, and provide your
BLUESKY_USERNAMEandBLUESKY_PASSWORDin an.envfile in your root directory. You can create these viaBluesky account settings > Privacy & Security > App passwords.
BLUESKY_USERNAME=
BLUESKY_PASSWORD=- Update script
Change SOURCE_ACTOR, TARGET_DATE and TIMEZONE_OFFSET in ./src/scripts/retrieve-posts.ts to your Bluesky handle or did, a date in yyyymmdd format and a timezone offset in hours (e.g. -8 for PST).
- Run the script
npm install
npm run retrievePostsHow to integrate into your own project
npm install @atproto/api
npm install bsky-tldrGrab sample code from ./scripts/retrieve-posts.ts.
Data Structure
Here's the post data structure returned from our retrieveAuthorFeed function for viewing posts for a specific author:
{
"uri": "at://did:plc:oeio7zuhrsvmlyhia7e44nk6/app.bsky.feed.post/3lgzvm46vhu2c",
"content": "TIL about process.exitCode = 1;\n\nUseful if you want to mark a process as failed without immediately exiting it",
"createdAt": "2025-01-31T11:32:00.769Z",
"isRepost": false,
"links": []
}Posts that include uri, content, createdAt, isRepost (false means it's an original by the author) and links which are the full links mentioned in the post.
If you need more information in your app, use @atproto/api library directly to retrieve the author's profile using their did, or the full post and replies via its uri.
Help for Contributors to this project
Local Development with watch mode
npm install
npm run devRun tests or coverage reports
npm run test:watch
npm run coverageTesting package in another project
If you want to make changes to this package while testing it with another project:
# In your package directory
npm link
# In your test project directory
npm link your-package-nameSteps for publishing package to NPM
After merging latest code to main branch:
- Locally,
git checkout main && git pull npm version patch# or minor, or majorgit push --follow-tags- A GitHub release is automatically written and published
