Python Twitter automation bot — auto-tweet, auto-follow, auto-retweet, and more.
Note: Built against Twitter API v1.1. Twitter deprecated free v1.1 access in 2023 — a Twitter developer account with Elevated or Basic access is now required.
- Auto-tweet on a timer
- Auto-follow back followers
- Tweet from a text file (skips duplicates)
- Auto favorite & retweet by hashtag
- Auto-reply when mentioned
Create an app at developer.twitter.com and copy your keys.
cp .env.example .env
# Fill in your Twitter keys in .envpip install tweepy python-dotenv
python main.py| File | Purpose |
|---|---|
credentials.py |
Loads API keys from env vars |
config.py |
Creates authenticated Tweepy API instance |
main.py |
Entry point |
autotweet.py |
Scheduled tweeting |
autoreply.py |
Mention auto-reply |
favretweet.py |
Auto like & retweet by hashtag |
followingfollowers.py |
Auto follow-back |
.env.example |
Credential template |
MIT © DomainWarrior