Skip to main content
twitter-cli can be installed in multiple ways depending on your workflow preferences. All methods provide the same functionality.

Prerequisites

Python Version: twitter-cli requires Python 3.8 or higher.
Verify your Python version:
python3 --version

Installation Methods

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:
uv tool upgrade twitter-cli

Uninstalling

To remove twitter-cli:
uv tool uninstall twitter-cli

Troubleshooting Installation

After installing with uv or pipx, the twitter command might not be in your PATH.Solution: Restart your terminal or run:
# For uv
export PATH="$HOME/.local/bin:$PATH"

# For pipx
pipx ensurepath
Add the export line to your shell config (~/.bashrc, ~/.zshrc, etc.) to make it permanent.
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.
twitter-cli requires Python 3.8 or higher.Solution: Check your Python version:
python3 --version
If it’s too old, install a newer version:
# On macOS
brew install [email protected]

# On Ubuntu/Debian
sudo apt install python3.11
On some systems, you might encounter SSL certificate verification errors.Solution: Update your system’s CA certificates:
# On macOS
/Applications/Python\ 3.x/Install\ Certificates.command

# On Ubuntu/Debian
sudo apt install ca-certificates
sudo update-ca-certificates

Next Steps

Quick Start

Now that you have twitter-cli installed, let’s get you from zero to your first successful command.

Build docs developers (and LLMs) love