bluesky-cli v1.0.7
š Bluesky CLI
Bluesky CLI now offers two modes:
Features
Search Mode
- Authenticate using your Bluesky handle and App Password.
- Search posts by entering keyword(s) and number of posts to fetch.
- Results are saved as JSON (
posts.json
) and CSV (posts.csv
).
Firehose Mode
- Stream live posts from the Bluesky Jetstream API.
- Filter posts using comma-separated keywords.
- New: If a keyword contains an underscore (e.g.,
bike_commute
), underscores are replaced with spaces so that the tool filters for the exact phrase (i.e. "bike commute").
- New: If a keyword contains an underscore (e.g.,
- Captured posts are stored in an SQLite database (
bluesky_posts.db
).
āļø Prerequisites
- Node.js & NPM installed.
- Valid Bluesky account credentials.
- SQLite support (automatically handled via dependencies).
š„ Installation
Install the CLI globally via NPM:
npm install -g bluesky-cli
š Usage
Navigate to the folder you want to save the response to. And then open a terminal window there.
Search Mode
Run the CLI tool:
bluesky-cli search
š Step-by-Step Walkthrough
Once you run the command, the CLI will prompt you for:
1ļøā£ Bluesky Handle & App Password (for authentication)
2ļøā£ Search Terms (comma-separated keywords)
3ļøā£ Number of Posts to Fetch
4ļøā£ Date Range (Start & End date in YYYY-MM-DD
format)
5ļøā£ Sorting Order (latest
or top
)
6ļøā£ File Name (for saving results)
7ļøā£ Generate HTML Output? (Yes/No)
š Example Usage
$ bluesky-cli search
ā Enter your Bluesky handle: yourname.bsky.social
ā Enter your Bluesky App Password:
ā Enter search terms: AI, Machine Learning
ā How many posts do you want to fetch? 10
š Output Files
bluesky_posts.json
ā JSON file containing search results.bluesky_posts.csv
ā CSV file displaying posts (if selected).
Firehose Mode
Run the CLI tool:
bluesky-cli firehose
š Step-by-Step Walkthrough
Once you run the command, the CLI will prompt you for:
1ļøā£ Bluesky Handle & App Password (for authentication)
2ļøā£ Keywords (comma-separated keywords to filter posts)
3ļøā£ Database File Name (for storing posts)
š Example Usage
$ bluesky-cli firehose
ā Enter keywords: AI, Machine_Learning
š Output Files
bluesky_firehose.db
ā SQLite database file containing captured posts.
ā ļø Notes
- If authentication fails, ensure you use the correct handle and App Password.
- Ensure the date format is correct (
YYYY-MM-DD
). - Sorting order options:
latest
(newest posts first) ortop
(most engaged posts).
š Updating the Package
If you have installed bluesky-cli globally and a new version is released, update it using:
npm update -g bluesky-cli
š License
This project is licensed under the MIT License.
š¤ Contributing
We welcome contributions! If you'd like to contribute, feel free to submit issues or pull requests on the GitHub Repository. š
š” Suggestions? Create an issue or start a discussion!
ā Support & Feedback
If you like this project, don't forget to ā star the repository on GitHub!