| name | twitterapi-cli |
| description | How to use the twitterapi-cli command-line tool to interact with Twitter (X). Use this skill whenever the user asks to search tweets, look up Twitter user profiles, post tweets, check trends, explore communities or spaces, look up lists, or do anything related to Twitter/X data. Also use this skill when the user mentions twitterapi-cli by name, asks about Twitter API queries, wants to find out what someone tweeted, wants to check follower relationships, or needs to retrieve tweet replies, quotes, or threads. |
twitterapi-cli
A CLI tool that wraps the TwitterAPI.io REST API. It lets you search tweets, look up users, post tweets, explore communities, spaces, lists, and trends — all from the terminal.
Binary location: twitterapi-cli
If the binary is not on $PATH, check the project directory at ./target/release/twitterapi-cli or ./target/debug/twitterapi-cli.
Credential Security — Important for AI Agents
Credentials should already be stored in the system keychain via setup. Never pass API keys, login cookies, or proxy URLs as CLI flags or environment variables. When an AI agent passes secrets as --api-key <KEY> or sets export TWITTER_API_KEY=..., those values appear in shell history, process listings, agent context windows, and generated outputs — creating a serious leak risk.
If a command fails with "API Key is not configured", ask the user to run setup themselves in a separate terminal:
twitterapi-cli setup api-key <KEY>
twitterapi-cli setup login <COOKIES>
twitterapi-cli setup proxy <URL>
The agent must not run setup directly because doing so would expose the secret value in the agent's context.
Always Use --json
When executing commands as an AI agent, always include the flag. This outputs the raw API JSON response instead of human-readable formatted text, making it possible to parse and reason about the data programmatically.