A sleek command-line tool that lets you post tweets directly from your terminal. Simple, fast, and developer-friendly!
- 🚀 Post tweets directly from your terminal
- 🔐 Secure authentication using Twitter API v2
- 💻 Simple and intuitive command-line interface
- ⚡ Fast and lightweight
sudo pacman -S python-pipxsudo apt update
sudo apt install python3-pip
python3 -m pip install --user pipx
python3 -m pipx ensurepathsudo dnf install pipxAfter installing pipx:
-
Clone the repository:
git clone https://github.com/surajssc1232/xeeter.git cd xeeter -
Install using pipx:
pipx install .
-
Install Python and pip (if not already installed)
sudo pacman -S python python-pip
sudo apt update sudo apt install python3 python3-pip python3-venv
sudo dnf install python3 python3-pip
-
Clone and setup:
git clone https://github.com/surajssc1232/xeeter.git cd xeeter python3 -m venv venv source venv/bin/activate pip install -e .
-
Create a Twitter Developer Account at developer.twitter.com
-
Create a new project and app (select "Native App")
-
Enable "Read and Write" permissions for your app
-
Generate API Keys and Access Tokens
-
Set up your environment variables by adding these to your shell config file:
- For bash:
~/.bashrc - For zsh:
~/.zshrc - For fish:
~/.config/fish/config.fish
export TWITTER_API_KEY="your_api_key" export TWITTER_API_SECRET_KEY="your_api_secret_key" export TWITTER_ACCESS_TOKEN="your_access_token" export TWITTER_ACCESS_TOKEN_SECRET="your_access_token_secret"
- For bash:
-
Apply the changes:
source ~/.bashrc # or source ~/.zshrc
Post a tweet:
tweet "Hello, Twitter! 🚀"Note: Twitter doesn't allow posting identical tweets. Add small variations to post similar content:
tweet "Hello World!"
tweet "Hello World!!" # Different punctuation
tweet "Hello World $(date)" # With timestamptweet_cli_tool/
├── README.md
├── requirements.txt
├── setup.py
└── tweet_cli_tool/
├── __init__.py
├── cli.py # Command-line interface
└── twitter/
├── __init__.py
└── client.py # Twitter API client
Want to contribute? Great! Here's how to set up the development environment:
- Fork the repository
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -r requirements.txt pip install -e . - Make your changes
- Submit a pull request
-
Command Not Found
# For pipx installations, ensure pipx is in your PATH pipx ensurepath # For venv installations, make sure you're in the virtual environment source venv/bin/activate # Restart your terminal or source your shell config source ~/.bashrc # or ~/.zshrc
-
Permission Issues
# If pip install fails with permission error pip install --user -e . # If pipx command not found after installation export PATH="$HOME/.local/bin:$PATH"
-
"Unauthorized" Error
- Verify your API keys and tokens are correct
- Check if environment variables are set:
echo $TWITTER_API_KEY # Should show your key
- Ensure your app has "Read and Write" permissions
This project is licensed under the MIT License - see the LICENSE file for details.
- Tweepy - The awesome Python library for accessing the Twitter API
- Twitter API v2 - For providing the API
For any questions or feedback, feel free to reach out:
- Create an issue in this repository
- Follow me on Twitter: @surajkhahai
Made with ❤️ by suraj <3.