Prerequisites
Python Version: twitter-cli requires Python 3.8 or higher.
Installation Methods
- uv (Recommended)
- pipx
- From Source
- pip (Not Recommended)
Install with uv tool
uv is a fast Python package installer and resolver. This is the recommended installation method as it provides isolated environments and fast installation.Install twitter-cli
twitter command available globally.uv automatically manages dependencies and creates isolated environments, preventing conflicts with other Python packages.
Dependencies
twitter-cli automatically installs the following dependencies:- browser-cookie3 (≥0.19): Extracts cookies from browsers
- click (≥8.0): Command-line interface framework
- rich (≥13.0): Terminal formatting and output
- PyYAML (≥6.0): Configuration file parsing
- curl_cffi (≥0.7): TLS fingerprint impersonation
- xclienttransaction (≥1.0.1): Twitter transaction ID generation
- beautifulsoup4 (≥4.12): HTML parsing
All dependencies are managed automatically. You don’t need to install them manually.
Upgrading
To upgrade to the latest version:Uninstalling
To remove twitter-cli:Troubleshooting Installation
Command not found after installation
Command not found after installation
After installing with uv or pipx, the Add the export line to your shell config (
twitter command might not be in your PATH.Solution: Restart your terminal or run:~/.bashrc, ~/.zshrc, etc.) to make it permanent.Permission denied errors
Permission denied errors
If you see permission errors during installation:Solution: Never use
sudo with pip. Instead, use uv or pipx which install to user directories, or use a virtual environment.Python version mismatch
Python version mismatch
twitter-cli requires Python 3.8 or higher.Solution: Check your Python version:If it’s too old, install a newer version:
SSL certificate errors
SSL certificate errors
On some systems, you might encounter SSL certificate verification errors.Solution: Update your system’s CA certificates:
Next Steps
Quick Start
Now that you have twitter-cli installed, let’s get you from zero to your first successful command.
