Post the same message to Twitter π¦, Hachyderm π, and Blueskyπ€οΈ.
Compatibility:
- MacOS: β
- *nix: π€·πΌββοΈ (probably works)
- Windows: β
- Clone this repo over HTTPS or SSH.
Clone over HTTPS:
git clone https://github.com/goingforbrooke/yappily.gitClone with SSH:
git clone git@github.com:goingforbrooke/yappily.git- Get credentials.
You need to get API keys from Twitter, Hachyderm, and Bluesky.
Paste each one into their corresponding text files at the paths noted below.
The *_creds already exist for your convenience.
Each site needs a different set of credentials:
- Twitter/X
- requires a "Developer Portal" account
- (different from your main account)
- setup
- set up for "User Authentication"
- Type of App: "Web App, Automated App, or Bot"
- callback uri: up to you, but we won't be using it
- website url: your website's URL
- required keys
- consumer key
- sometimes known as "API Key" in "Projects and Apps"
- create
yappily/twitter_creds/api_key.txt
- consumer secret
- sometimes known as "API Key" in "Projects and Apps."
- create
yappily/twitter_creds/api_key_secret.txt
- access token
- create
yappily/twitter_creds/access_token.txt
- create
- access token secret
- create
yappily/twitter_creds/access_token_secret.txt
- create
- consumer key
- requires a "Developer Portal" account
- Hachyderm
- hachyderm.io/home
- Development Tab
- "New Application"
- permissions
- βοΈ
write:statuses: publish posts
- βοΈ
- required keys
- client ID
- also known as "Client Key" on the "Development β‘οΈ Application" page
- create
yappily/hachyderm_creds/client_id.txt
- client secret
- create
yappily/hachyderm_creds/client_secret.txt
- create
- access token
- also known as "Your access token" on the "Development β‘οΈ Application" page
- create
yappily/hachyderm_creds/access_token.txt
- client ID
- Bluesky
- "Settings"
- "Privacy and Security"
- "App passwords"
- "Add App Password"
- don't check "Allow access to your direct messages"
- necessary keys
- username
- should be in the format
your.username.bsky.social - create
yappily/bluesky_creds/bluesky_username.txt
- should be in the format
- password
- create
yappily/bluesky_creds/bluesky_password.txt
- create
- username
Caution
Twitter/X's free tier has very low limits. As of 25-1-26, you get 100 posts each month, which may be insufficient for profific posters.
- Install Dependencies
Tip
Avoid manually installing dependencies and skip to uv run.
Tip
Zsh users can run Yappily from anywhere by adding this file as yapply to ~/bin:
#!/bin/zsh
uv run ~/path/to/where/you/clone/repos/yappily/main.py "$@"Install with uv
This isn't necessary for uv run, but is included here for those who would like to set up a virtual environment.
Install with pip
pip install -r requirements.txtYou can run Yappily with any requirements.txt-friendly project manager, but we recommenduv
Use uv run:
uv run main.py "<some_awesome_text>"`Surrounding the post text is optional, but recommended. It prevents your shell from interpreting special characters. For example, the ' in uv run main.py Yappily's awesome will cause issues in zsh. Using uv run main.py "Yappily's awesome" instead.
Example:
uv run main.py "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"π
Yapping "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"
π¦ Tweeted on X/Twitter: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
π Posted to Hachyderm: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
π€οΈ Posted to Bluesky: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
β
DoneThis works the same as the uv run, but replace uv run with python.
Important
Install dependencies and/or activate a virtual environment first.
python main.pypython main.py "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"π
Yapping "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"
π¦ Tweeted on X/Twitter: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
π Posted to Hachyderm: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
π€οΈ Posted to Bluesky: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
β
Done- check for Bluesky's 300 grapheme limit
- post to Insta Threads π§΅
- allow posting to fewer than all sites π§
- right now, it fails if you don't provide credentials for each one
- RIIW (Rewrite in Rust) π¦
- make mobile app π€³π»
- use oAuth for credentials? π
- add image uploads πΈ
- aspect ratio cropping would be nice
- parallel posting ποΈ
- post to YouTube communities π½οΈ
- allow threads? π§΅
- add logging πͺ΅
- slick packaging π¦
- collect stats π
- 30 day averages in terminal
- matplotlib graphs in webpage
Dependencies are tracked in three locations:
uv'spyproject.toml
- source of truth
- created by
uv init
- inline script metadata dependencies (at the top of
main.py)
- fuels our preferred way to execute Yappily (with
uv runmain.py`)
requirements.txt
- for compatibility
Important
Update requirements.txt with the latest from uv:
uv export --format requirements-txt > requirements.txt