A command-line tool for posting messages to Bluesky Social written in Rust.
- Post messages to Bluesky from the command line
- Automatic session management and credential storage
- Returns clickable web URLs for your posts
- Secure credential handling with environment variables
- Rust installed on your system
- A Bluesky account
-
Clone the repository
git clone https://github.com/Zike01/bskwrite.git cd bskwrite -
Build and install
cargo install --path . -
Set up your Bluesky credentials
For first time users, the example env will be created inside your config directory. Navigate to your config dir and edit
.envwith your preferred text editor:nano .env
Add your Bluesky login details:
BSKY_EMAIL=your-email@example.com BSKY_PASSWORD=your-app-password-here
cargo install --git https://github.com/Zike01/bskwrite.gitThen edit your .env file as described above.
Important: Use an app password, not your regular Bluesky password.
- Go to bsky.app and log in
- Navigate to Settings → Privacy and Security → App Passwords
- Click Add App Password
- Give it a name (e.g., "bskwrite CLI")
- Copy the generated password
- Use this app password in your
.envfile
Post a message to Bluesky:
bskwrite "Hello, Bluesky!"The tool will:
- Automatically log you in on first use
- Save your session for future use
- Display a clickable web URL to view your post
# Simple message
bskwrite "Just posted from the command line!"
# Message with quotes (escape them)
bskwrite "This is a \"quoted\" message"The tool uses these environment variables from your .env file:
BSKY_EMAIL- Your Bluesky email addressBSKY_PASSWORD- Your Bluesky app password (not your regular password)
After your first successful login, the tool saves your session in config.json. This file is automatically created and managed - you don't need to edit it manually.
If you encounter issues:
- Check that your
.envfile is properly configured - Verify your app password is valid
- Try deleting
config.jsonto force a fresh login - Make sure you have the latest version of Rust
- Built with bsky_sdk for Bluesky API integration
- Uses atrium-api for AT Protocol support