Interact with Twitter/X from the command line to read timelines, manage tweets, and export data without an API key.
twitter-cli is a command-line interface for interacting with Twitter/X. Developed by the public-clis project, it solves the problem of accessing Twitter data and functionality without official API keys, which are often restricted or costly. The tool allows users to read timelines, post tweets, search, and manage bookmarks directly from the terminal. It's designed for developers, researchers, and power users who need to script interactions or export data from the platform in structured formats like JSON or YAML.
twitter-cli is a free, open-source command-line tool installed via pipx or uv. It works by automatically extracting authentication cookies from a user's web browser, allowing it to make requests to Twitter's internal APIs without a formal developer key. Users issue commands like twitter search "topic" in their terminal. The tool outputs results as formatted tables directly in the console or can export the data as structured JSON or YAML files for use in scripts and other applications.
This tool is best for developers and researchers who need to programmatically interact with Twitter/X or pull structured data for analysis without dealing with the limitations of the official API.
The tool relies on unofficial methods to access Twitter, which could break with platform updates. Users should be cautious with request volume and use proxies to minimize the risk of rate-limiting or account suspension, as advised by the developer.