nix run github:andrewgazelka/post
Warning
With the Claude extension for Chrome, Claude Code can now control your browser directly, which may make this tool less necessary for X/Twitter. However, Reddit is explicitly banned by the Chrome extension (likely for legal reasons), so this tool remains useful for Reddit posting.
A minimal CLI for posting to social media.
- OAuth 2.0: Secure authentication with automatic token refresh
- Simple:
post x post "Hello"orpost reddit post -r rust -t "Title" - Fast: Written in Rust, single binary
- X (Twitter)
- Create an app at developer.x.com
- Enable OAuth 2.0 with callback URL
http://localhost:8080/callback - Authenticate:
post x auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRETOr set environment variables X_CLIENT_ID and X_CLIENT_SECRET.
- Create a "script" app at reddit.com/prefs/apps
- Authenticate:
post reddit auth \
--client-id YOUR_CLIENT_ID \
--client-secret YOUR_CLIENT_SECRET \
--username YOUR_USERNAME \
--password YOUR_PASSWORDOr set environment variables REDDIT_CLIENT_ID, REDDIT_CLIENT_SECRET, REDDIT_USERNAME, REDDIT_PASSWORD.
# Post a tweet
post x post "Hello from post!"
# Check auth status
post x status
# Logout
post x logout# Submit a text post
post reddit post -r rust -t "Check out my crate" -b "Body text here"
# Submit a link post
post reddit post -r rust -t "Check out my crate" -l "https://example.com"
# Check auth status
post reddit status
# Logout
post reddit logout# With Nix
nix run github:andrewgazelka/post
# Or install
nix profile install github:andrewgazelka/post
# With Cargo
cargo install --git https://github.com/andrewgazelka/post